diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 57df1b4a2..51090237b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -496,6 +496,8 @@ BattleScript_CorrosiveGasFail: goto BattleScript_MoveEnd BattleScript_EffectMakeItRain: + jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_MakeItRainDoubles +BattleScript_MakeItRainContinuous: setmoveeffect MOVE_EFFECT_PAYDAY call BattleScript_EffectHit_Ret seteffectwithchance @@ -503,6 +505,9 @@ BattleScript_EffectMakeItRain: setmoveeffect MOVE_EFFECT_SP_ATK_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN seteffectprimary goto BattleScript_MoveEnd +BattleScript_MakeItRainDoubles: + jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING | HITMARKER_NO_PPDEDUCT, BattleScript_NoMoveEffect + goto BattleScript_MakeItRainContinuous BattleScript_EffectSpinOut:: setmoveeffect MOVE_EFFECT_SPD_MINUS_2 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN diff --git a/test/battle/move_effect/make_it_rain.c b/test/battle/move_effect/make_it_rain.c index 42046c145..560bcffa7 100644 --- a/test/battle/move_effect/make_it_rain.c +++ b/test/battle/move_effect/make_it_rain.c @@ -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]); } } + +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!"); + } +}