Fixes Make it Rain in double battles (#3441)

This commit is contained in:
Alex 2023-10-21 23:42:19 +02:00 committed by GitHub
parent 70985ed3d6
commit 0a6c0261fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -496,6 +496,8 @@ BattleScript_CorrosiveGasFail:
goto BattleScript_MoveEnd goto BattleScript_MoveEnd
BattleScript_EffectMakeItRain: BattleScript_EffectMakeItRain:
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_MakeItRainDoubles
BattleScript_MakeItRainContinuous:
setmoveeffect MOVE_EFFECT_PAYDAY setmoveeffect MOVE_EFFECT_PAYDAY
call BattleScript_EffectHit_Ret call BattleScript_EffectHit_Ret
seteffectwithchance seteffectwithchance
@ -503,6 +505,9 @@ BattleScript_EffectMakeItRain:
setmoveeffect MOVE_EFFECT_SP_ATK_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN setmoveeffect MOVE_EFFECT_SP_ATK_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
seteffectprimary seteffectprimary
goto BattleScript_MoveEnd goto BattleScript_MoveEnd
BattleScript_MakeItRainDoubles:
jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING | HITMARKER_NO_PPDEDUCT, BattleScript_NoMoveEffect
goto BattleScript_MakeItRainContinuous
BattleScript_EffectSpinOut:: BattleScript_EffectSpinOut::
setmoveeffect MOVE_EFFECT_SPD_MINUS_2 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN setmoveeffect MOVE_EFFECT_SPD_MINUS_2 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN

View File

@ -32,3 +32,27 @@ SINGLE_BATTLE_TEST("Make It Rain lowers special attack by one stage")
EXPECT_MUL_EQ(damage[0], Q_4_12(0.66), damage[1]); EXPECT_MUL_EQ(damage[0], Q_4_12(0.66), damage[1]);
} }
} }
DOUBLE_BATTLE_TEST("Make It Rain lowers special attack by one stage if it hits both targets")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET)
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(playerLeft, MOVE_MAKE_IT_RAIN); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAKE_IT_RAIN, playerLeft);
HP_BAR(opponentLeft);
NONE_OF {
MESSAGE("Coins scattered everywhere!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
MESSAGE("Wobbuffet's Sp. Atk fell!");
}
HP_BAR(opponentRight);
MESSAGE("Coins scattered everywhere!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
MESSAGE("Wobbuffet's Sp. Atk fell!");
}
}