Fix Heavy Rain check to account for weather suppression

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
PigeonBar 2024-12-02 22:01:26 -05:00 committed by GitHub
parent 83ab823bde
commit 0ccb9df405
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -885,7 +885,8 @@ export class PowderTag extends BattlerTag {
const movePhase = pokemon.scene.getCurrentPhase(); const movePhase = pokemon.scene.getCurrentPhase();
if (movePhase instanceof MovePhase) { if (movePhase instanceof MovePhase) {
const move = movePhase.move.getMove(); const move = movePhase.move.getMove();
if (pokemon.getMoveType(move) === Type.FIRE && pokemon.scene.arena.weather?.weatherType !== WeatherType.HEAVY_RAIN) { const weather = pokemon.scene.arena.weather;
if (pokemon.getMoveType(move) === Type.FIRE && !(weather && weather.weatherType === WeatherType.HEAVY_RAIN && !weather.isEffectSuppressed(pokemon.scene))) {
movePhase.fail(); movePhase.fail();
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.POWDER)); pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.POWDER));