mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Fixes
Files didn't want to cooperate when they transferred over because yes
This commit is contained in:
parent
dfcc5c9e87
commit
a5dac6b779
@ -4308,11 +4308,10 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (this.aiType) {
|
switch (this.aiType) {
|
||||||
case AiType.RANDOM:
|
case AiType.RANDOM: // No enemy should spawn with this AI type in-game
|
||||||
var i = this.scene.randBattleSeedInt(movePool.length, undefined, "Move selection roll (RANDOM)")
|
var i = this.scene.randBattleSeedInt(movePool.length, undefined, "Move selection roll (RANDOM)")
|
||||||
const moveId = movePool[i]!.moveId;
|
const moveId = movePool[i]!.moveId;
|
||||||
this.flyout.setText(i)
|
this.flyout.setText(i)
|
||||||
case AiType.RANDOM: // No enemy should spawn with this AI type in-game
|
|
||||||
return { move: moveId, targets: this.getNextTargets(moveId) };
|
return { move: moveId, targets: this.getNextTargets(moveId) };
|
||||||
case AiType.SMART_RANDOM:
|
case AiType.SMART_RANDOM:
|
||||||
case AiType.SMART:
|
case AiType.SMART:
|
||||||
|
@ -1233,8 +1233,8 @@ class TmModifierTypeGenerator extends ModifierTypeGenerator {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//console.log(tierUniqueCompatibleTms.map((v, i) => i == randTmIndex ? `> ${Utils.getEnumKeys(Moves)[v].toUpperCase() + Utils.getEnumKeys(Moves)[v].substring(1).toLowerCase()} <` : `${Utils.getEnumKeys(Moves)[v].toUpperCase() + Utils.getEnumKeys(Moves)[v].substring(1).toLowerCase()}`))
|
//console.log(tierUniqueCompatibleTms.map((v, i) => i == randTmIndex ? `> ${Utils.getEnumKeys(Moves)[v].toUpperCase() + Utils.getEnumKeys(Moves)[v].substring(1).toLowerCase()} <` : `${Utils.getEnumKeys(Moves)[v].toUpperCase() + Utils.getEnumKeys(Moves)[v].substring(1).toLowerCase()}`))
|
||||||
return new TmModifierType(tierUniqueCompatibleTms[randTmIndex], tier);
|
|
||||||
const randTmIndex = Utils.randSeedInt(tierUniqueCompatibleTms.length, undefined, "Choosing a TM to give");
|
const randTmIndex = Utils.randSeedInt(tierUniqueCompatibleTms.length, undefined, "Choosing a TM to give");
|
||||||
|
return new TmModifierType(tierUniqueCompatibleTms[randTmIndex], tier);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ export function randInt(range: integer, min: integer = 0, reason?: string): inte
|
|||||||
}
|
}
|
||||||
let V = Math.floor(Math.random() * range) + min;
|
let V = Math.floor(Math.random() * range) + min;
|
||||||
if (reason != "%HIDE") {
|
if (reason != "%HIDE") {
|
||||||
console.log("[unseeded] " + (reason ? reason : "randInt"), V)
|
//console.log("[unseeded] " + (reason ? reason : "randInt"), V)
|
||||||
}
|
}
|
||||||
return V;
|
return V;
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ export function randSeedItem<T>(items: T[], reason?: string): T {
|
|||||||
export function randSeedWeightedItem<T>(items: T[], reason?: string): T {
|
export function randSeedWeightedItem<T>(items: T[], reason?: string): T {
|
||||||
function rpick() {
|
function rpick() {
|
||||||
let V = Phaser.Math.RND.weightedPick(items);
|
let V = Phaser.Math.RND.weightedPick(items);
|
||||||
//console.log(reason ? reason : "randSeedWeightedItem")
|
console.log(reason ? reason : "randSeedWeightedItem")
|
||||||
return V;
|
return V;
|
||||||
}
|
}
|
||||||
return items.length === 1
|
return items.length === 1
|
||||||
|
Loading…
Reference in New Issue
Block a user