From a5dac6b779ccb27d9bcb531dd0d15da33db922bc Mon Sep 17 00:00:00 2001 From: RedstonewolfX <108761527+RedstonewolfX@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:58:59 -0400 Subject: [PATCH] Fixes Files didn't want to cooperate when they transferred over because yes --- src/field/pokemon.ts | 3 +-- src/modifier/modifier-type.ts | 2 +- src/utils.ts | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 43d259046e7..2a5cf92d17d 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -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: diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 3ac251404ca..187d0507731 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -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); }); } } diff --git a/src/utils.ts b/src/utils.ts index 8a0c56637db..6808ef70961 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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(items: T[], reason?: string): T { export function randSeedWeightedItem(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