diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 825ed3703e..027c344b2d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -4159,6 +4159,7 @@ BattleScript_EffectMinimize:: BattleScript_EffectCurse:: jumpiftype BS_ATTACKER, TYPE_GHOST, BattleScript_GhostCurse attackcanceler + jumpiftype BS_ATTACKER, TYPE_GHOST, BattleScript_DoGhostCurse attackstring ppreduce jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, MIN_STAT_STAGE, BattleScript_CurseTrySpeed diff --git a/test/battle/move_effect/curse.c b/test/battle/move_effect/curse.c index 5fe17d3561..0696dfc4ca 100644 --- a/test/battle/move_effect/curse.c +++ b/test/battle/move_effect/curse.c @@ -34,3 +34,36 @@ SINGLE_BATTLE_TEST("Curse cuts the user's HP in half when used by Ghost-types") HP_BAR(player, hp: maxHP / 2); } } + +SINGLE_BATTLE_TEST("Curse applies to the user if used with Protean") +{ + GIVEN { + PLAYER(SPECIES_KECLEON) { Ability(ABILITY_PROTEAN); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CURSE, target: player); } + } SCENE { + s32 playerMaxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + ABILITY_POPUP(player, ABILITY_PROTEAN); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CURSE, player); + HP_BAR(player, damage: playerMaxHP / 2); + HP_BAR(player, damage: playerMaxHP / 4); + } +} + +SINGLE_BATTLE_TEST("Curse applies to the opponent if user is afflicted by Trick-or-Treat in the same turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TRICK_OR_TREAT); MOVE(player, MOVE_CURSE, target: player); } + } SCENE { + s32 playerMaxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + s32 opponentMaxHP = GetMonData(&OPPONENT_PARTY[0], MON_DATA_MAX_HP); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TRICK_OR_TREAT, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_CURSE, player); + HP_BAR(player, damage: playerMaxHP / 2); + HP_BAR(opponent, damage: opponentMaxHP / 4); + } +}