From d2a2527e3d6777582706ae3fa85f68b05d8c409c Mon Sep 17 00:00:00 2001 From: innerthunder Date: Wed, 11 Sep 2024 02:24:20 -0700 Subject: [PATCH] move sourceTeraType closer to where it's used --- src/field/pokemon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index ef8d96b5c23..78281ee03e1 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2209,7 +2209,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const typeMultiplier = this.getMoveEffectiveness(source, move, ignoreAbility, simulated, cancelled); const isPhysical = moveCategory === MoveCategory.PHYSICAL; - const sourceTeraType = source.getTeraType(); /** Combined damage multiplier from field effects such as weather, terrain, etc. */ const arenaAttackTypeMultiplier = new Utils.NumberHolder(this.scene.arena.getAttackTypeMultiplier(moveType, source.isGrounded())); @@ -2305,6 +2304,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const randomMultiplier = simulated ? 1 : ((this.randSeedIntRange(85, 100)) / 100); const sourceTypes = source.getTypes(); + const sourceTeraType = source.getTeraType(); const matchesSourceType = sourceTypes.includes(moveType); /** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */ const stabMultiplier = new Utils.NumberHolder(1);