From 8cf8ce12589beeb5ccff2bd58a13fe9311479c87 Mon Sep 17 00:00:00 2001 From: LaukkaE Date: Sat, 13 Apr 2024 20:41:59 +0300 Subject: [PATCH] Fix terrain power boosting fix --- src/field/arena.ts | 2 +- src/field/pokemon.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/field/arena.ts b/src/field/arena.ts index 4c712f7f3..11677dc49 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -337,7 +337,7 @@ export class Arena { weatherMultiplier = this.weather.getAttackTypeMultiplier(attackType); let terrainMultiplier = 1; - if (this.terrain && !grounded) + if (this.terrain && grounded) terrainMultiplier = this.terrain.getAttackTypeMultiplier(attackType); return weatherMultiplier * terrainMultiplier; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index e0b351b90..b4ce4f0a0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1159,11 +1159,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { else { if (source.findTag(t => t instanceof TypeBoostTag && (t as TypeBoostTag).boostedType === type)) power.value *= 1.5; - const arenaAttackTypeMultiplier = this.scene.arena.getAttackTypeMultiplier(type, this.isGrounded()); + const arenaAttackTypeMultiplier = this.scene.arena.getAttackTypeMultiplier(type, source.isGrounded()); if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS) power.value /= 2; - else if (this.scene.arena.getTerrainType() === TerrainType.ELECTRIC && source.isGrounded() && type === Type.ELECTRIC) - power.value *= 1.3; applyMoveAttrs(VariablePowerAttr, source, this, move, power); this.scene.applyModifiers(PokemonMultiHitModifier, source.isPlayer(), source, new Utils.IntegerHolder(0), power); if (!typeless) {