Files didn't want to cooperate when they transferred over because yes
This commit is contained in:
RedstonewolfX 2024-09-11 14:58:59 -04:00
parent dfcc5c9e87
commit a5dac6b779
3 changed files with 4 additions and 5 deletions

View File

@ -4308,11 +4308,10 @@ export class EnemyPokemon extends Pokemon {
}
}
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)")
const moveId = movePool[i]!.moveId;
this.flyout.setText(i)
case AiType.RANDOM: // No enemy should spawn with this AI type in-game
return { move: moveId, targets: this.getNextTargets(moveId) };
case AiType.SMART_RANDOM:
case AiType.SMART:

View File

@ -1233,8 +1233,8 @@ class TmModifierTypeGenerator extends ModifierTypeGenerator {
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()}`))
return new TmModifierType(tierUniqueCompatibleTms[randTmIndex], tier);
const randTmIndex = Utils.randSeedInt(tierUniqueCompatibleTms.length, undefined, "Choosing a TM to give");
return new TmModifierType(tierUniqueCompatibleTms[randTmIndex], tier);
});
}
}

View File

@ -86,7 +86,7 @@ export function randInt(range: integer, min: integer = 0, reason?: string): inte
}
let V = Math.floor(Math.random() * range) + min;
if (reason != "%HIDE") {
console.log("[unseeded] " + (reason ? reason : "randInt"), V)
//console.log("[unseeded] " + (reason ? reason : "randInt"), 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 {
function rpick() {
let V = Phaser.Math.RND.weightedPick(items);
//console.log(reason ? reason : "randSeedWeightedItem")
console.log(reason ? reason : "randSeedWeightedItem")
return V;
}
return items.length === 1