From 1590b0cd2654096f3aa6ddce01e170f61f36a782 Mon Sep 17 00:00:00 2001 From: Matthew Ross Date: Sat, 11 May 2024 18:35:41 -0700 Subject: [PATCH] Update variable base power check to original location --- src/data/ability.ts | 3 +-- src/field/pokemon.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 4e13ac21937..2a5f093b10a 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -990,8 +990,7 @@ export class MoveTypeChangeAttr extends PreAttackAbAttr { export class DamageBoostAbAttr extends PreAttackAbAttr { private damageMultiplier: number; - private condition: PokemonAttackCondition - + private condition: PokemonAttackCondition; constructor(damageMultiplier: number, condition: PokemonAttackCondition){ super(true); diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 43642c18dbe..99ba0b4e148 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1314,7 +1314,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const sourceTeraType = source.getTeraType(); if (sourceTeraType !== Type.UNKNOWN && sourceTeraType === type && power.value < 60 && move.priority <= 0 && !move.getAttrs(MultiHitAttr).length && !this.scene.findModifier(m => m instanceof PokemonMultiHitModifier && m.pokemonId === source.id)) power.value = 60; - applyMoveAttrs(VariablePowerAttr, source, this, move, power); applyPreAttackAbAttrs(VariableMovePowerAbAttr, source, this, battlerMove, power); this.scene.getField(true).map(p => applyPreAttackAbAttrs(FieldVariableMovePowerAbAttr, this, source, battlerMove, power)); @@ -1343,6 +1342,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { applyMoveAttrs(IgnoreWeatherTypeDebuffAttr, source, this, move, arenaAttackTypeMultiplier); if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS) power.value /= 2; + applyMoveAttrs(VariablePowerAttr, source, this, move, power); this.scene.applyModifiers(PokemonMultiHitModifier, source.isPlayer(), source, new Utils.IntegerHolder(0), power); if (!typeless) { this.scene.arena.applyTags(WeakenMoveTypeTag, type, power); @@ -1409,7 +1409,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (!burnDamageReductionCancelled.value) damage.value = Math.floor(damage.value / 2); } - + applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage) move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {