From 292b528e70c38c349869c8116c2e48e1e872979f Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Fri, 31 May 2024 21:39:26 -0400 Subject: [PATCH 01/10] First draft --- test/battle/ability/clear_body.c | 214 +++++++++++++++++++++++++++++-- 1 file changed, 203 insertions(+), 11 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 7f167c9fe7a2..0200601bb2df 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -17,7 +17,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents intimidate") } SCENE { HP_BAR(player, captureDamage: &turnOneHit); ABILITY_POPUP(player, ABILITY_INTIMIDATE); - NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } + NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); HP_BAR(player, captureDamage: &turnTwoHit); @@ -26,13 +26,205 @@ SINGLE_BATTLE_TEST("Clear Body prevents intimidate") } } -TO_DO_BATTLE_TEST("Clear Body prevents stat stage reduction from moves"); // Growl, Leer, Confide, Fake Tears, Scary Face, Sweet Scent, Sand Attack (Attack, Defense, Sp. Attack, Sp. Defense, Speed, Evasion, Accuracy -TO_DO_BATTLE_TEST("Clear Body prevents Sticky Web"); -TO_DO_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves used by the user"); // e.g. Superpower -TO_DO_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball"); -TO_DO_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from paralysis"); -TO_DO_BATTLE_TEST("Clear Body doesn't prevent Attack reduction from burn"); -TO_DO_BATTLE_TEST("Clear Body doesn't prevent receiving negative stat changes from Baton Pass"); -TO_DO_BATTLE_TEST("Clear Body doesn't prevent Topsy-Turvy"); -TO_DO_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting positive stat changes"); -TO_DO_BATTLE_TEST("Clear Body is ignored by Mold Breaker"); +SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") +{ + u16 move; + PARAMETRIZE{ move = MOVE_GROWL; } + PARAMETRIZE{ move = MOVE_LEER; } + PARAMETRIZE{ move = MOVE_CONFIDE; } + PARAMETRIZE{ move = MOVE_FAKE_TEARS; } + PARAMETRIZE{ move = MOVE_SCARY_FACE; } + PARAMETRIZE{ move = MOVE_SWEET_SCENT; } + PARAMETRIZE{ move = MOVE_SAND_ATTACK; } + + GIVEN { + ASSUME(gMovesInfo[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); + ASSUME(gMovesInfo[MOVE_LEER].effect == EFFECT_DEFENSE_DOWN); + ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); + ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN); + ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); + ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); + PLAYER(SPECIES_ZIGZAGOON) { Moves(move); } + OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(player, move); } + } SCENE { + NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); + MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); + } +} + +SINGLE_BATTLE_TEST("Clear Body prevents Sticky Web") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_STICKY_WEB].effect == EFFECT_STICKY_WEB); + ASSUME(gMovesInfo[MOVE_SELF_DESTRUCT].effect == EFFECT_EXPLOSION); + PLAYER(SPECIES_ARIADOS) { Speed(2); Moves(MOVE_STICKY_WEB, MOVE_PROTECT); } + OPPONENT(SPECIES_SNORLAX) { Speed(1); Moves(MOVE_CELEBRATE, MOVE_SELF_DESTRUCT); } + OPPONENT(SPECIES_BELDUM) { Speed(1); Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(player, MOVE_STICKY_WEB); MOVE(opponent, MOVE_CELEBRATE); } + TURN{ MOVE(player, MOVE_PROTECT); MOVE(opponent, MOVE_SELF_DESTRUCT); SEND_OUT(opponent, 1); } + } SCENE { + NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); + MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves used by the user") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_SUPERPOWER].additionalEffects->moveEffect == MOVE_EFFECT_ATK_DEF_DOWN); + PLAYER(SPECIES_ODDISH) + OPPONENT(SPECIES_BELDUM) { Moves(MOVE_SUPERPOWER); Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(opponent, MOVE_SUPERPOWER); } + } SCENE { + NONE_OF { ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } + } +} + +SINGLE_BATTLE_TEST("Clear Body is ignored by Mold Breaker") +{ + u16 move; + PARAMETRIZE{ move = MOVE_GROWL; } + PARAMETRIZE{ move = MOVE_LEER; } + PARAMETRIZE{ move = MOVE_CONFIDE; } + PARAMETRIZE{ move = MOVE_FAKE_TEARS; } + PARAMETRIZE{ move = MOVE_SCARY_FACE; } + PARAMETRIZE{ move = MOVE_SWEET_SCENT; } + PARAMETRIZE{ move = MOVE_SAND_ATTACK; } + + GIVEN { + PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_MOLD_BREAKER); Moves(move); } + OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(player, move); } + } SCENE { + NONE_OF { ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") +{ + u16 heldItem; + PARAMETRIZE{ heldItem = ITEM_NONE; } + PARAMETRIZE{ heldItem = ITEM_IRON_BALL; } + GIVEN { + ASSUME(gItemsInfo[ITEM_IRON_BALL].holdEffect == HOLD_EFFECT_IRON_BALL); + PLAYER(SPECIES_ZIGZAGOON) { Speed(4); } + OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); Item(heldItem); } + } WHEN { + TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + if (heldItem == ITEM_IRON_BALL) + { + MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); + } + else + { + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Zigzagoon used Celebrate!"); + } + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from paralysis") +{ + GIVEN { + PLAYER(SPECIES_ZIGZAGOON) { Speed(4); Moves(MOVE_THUNDER_WAVE); } + OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(player, MOVE_THUNDER_WAVE); MOVE(opponent, MOVE_CELEBRATE); } + TURN{ MOVE(player, MOVE_THUNDER_WAVE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Zigzagoon used Thunder Wave!"); + MESSAGE("Zigzagoon used Thunder Wave!"); + ONE_OF { + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Foe Beldum is paralyzed! It can't move!"); + } + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent Attack reduction from burn", s16 damage) +{ + bool32 burned; + PARAMETRIZE{ burned = FALSE; } + PARAMETRIZE{ burned = TRUE; } + GIVEN { + ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL); + PLAYER(SPECIES_WOBBUFFET) + OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); if (burned) Status1(STATUS1_BURN); } + } WHEN { + TURN{ MOVE(opponent, MOVE_TACKLE); } + } SCENE { + HP_BAR(player, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent receiving negative stat changes from Baton Pass") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); + ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS); + PLAYER(SPECIES_ZIGZAGOON) { Speed(4); Moves(MOVE_SCARY_FACE); } + OPPONENT(SPECIES_EEVEE) { Speed(3); Moves(MOVE_BATON_PASS, MOVE_CELEBRATE); } + OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } + TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Zigzagoon used Scary Face!"); + MESSAGE("Foe Beldum used Celebrate!"); + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent Topsy-Turvy") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_TOPSY_TURVY].effect == EFFECT_TOPSY_TURVY); + ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); + ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS); + PLAYER(SPECIES_INKAY) { Speed(4); Moves(MOVE_SCARY_FACE, MOVE_TOPSY_TURVY); } + OPPONENT(SPECIES_EEVEE) { Speed(3); Moves(MOVE_BATON_PASS, MOVE_CELEBRATE); } + OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } + } WHEN { + TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } + TURN{ MOVE(player, MOVE_TOPSY_TURVY); MOVE(opponent, MOVE_CELEBRATE); } + TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Inkay used Topsy-Turvy!"); + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Inkay used Scary Face!"); + } +} + +SINGLE_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting positive stat changes") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_SPECTRAL_THIEF].additionalEffects->moveEffect == MOVE_EFFECT_SPECTRAL_THIEF); + ASSUME(gMovesInfo[MOVE_AGILITY].effect == EFFECT_SPEED_UP_2); + PLAYER(SPECIES_ZIGZAGOON) { Speed(4); Moves(MOVE_SPECTRAL_THIEF, MOVE_CELEBRATE); } + OPPONENT(SPECIES_BELDUM) { Speed(5); Ability(ABILITY_CLEAR_BODY); Moves(MOVE_AGILITY, MOVE_CELEBRATE); } + } WHEN { + TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_AGILITY); } + TURN{ MOVE(player, MOVE_SPECTRAL_THIEF); MOVE(opponent, MOVE_CELEBRATE); } + TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Foe Beldum used Agility!"); + MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Zigzagoon used Spectral Thief!"); + MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); + } +} From 167a898bc06cc6d0b625d70fe26e5b1c8da616d5 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Fri, 31 May 2024 22:05:35 -0400 Subject: [PATCH 02/10] WOBBUFFET + cleanup --- test/battle/ability/clear_body.c | 56 ++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 0200601bb2df..6fb1e127bc98 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -45,7 +45,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); - PLAYER(SPECIES_ZIGZAGOON) { Moves(move); } + PLAYER(SPECIES_WOBBUFFET) { Moves(move); } OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(player, move); } @@ -60,13 +60,12 @@ SINGLE_BATTLE_TEST("Clear Body prevents Sticky Web") { GIVEN { ASSUME(gMovesInfo[MOVE_STICKY_WEB].effect == EFFECT_STICKY_WEB); - ASSUME(gMovesInfo[MOVE_SELF_DESTRUCT].effect == EFFECT_EXPLOSION); - PLAYER(SPECIES_ARIADOS) { Speed(2); Moves(MOVE_STICKY_WEB, MOVE_PROTECT); } - OPPONENT(SPECIES_SNORLAX) { Speed(1); Moves(MOVE_CELEBRATE, MOVE_SELF_DESTRUCT); } - OPPONENT(SPECIES_BELDUM) { Speed(1); Ability(ABILITY_CLEAR_BODY); } + PLAYER(SPECIES_WOBBUFFET) + OPPONENT(SPECIES_WOBBUFFET) + OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(player, MOVE_STICKY_WEB); MOVE(opponent, MOVE_CELEBRATE); } - TURN{ MOVE(player, MOVE_PROTECT); MOVE(opponent, MOVE_SELF_DESTRUCT); SEND_OUT(opponent, 1); } + TURN{ SWITCH(opponent, 1); } } SCENE { NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); @@ -78,7 +77,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves u { GIVEN { ASSUME(gMovesInfo[MOVE_SUPERPOWER].additionalEffects->moveEffect == MOVE_EFFECT_ATK_DEF_DOWN); - PLAYER(SPECIES_ODDISH) + PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Moves(MOVE_SUPERPOWER); Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(opponent, MOVE_SUPERPOWER); } @@ -99,7 +98,14 @@ SINGLE_BATTLE_TEST("Clear Body is ignored by Mold Breaker") PARAMETRIZE{ move = MOVE_SAND_ATTACK; } GIVEN { - PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_MOLD_BREAKER); Moves(move); } + ASSUME(gMovesInfo[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); + ASSUME(gMovesInfo[MOVE_LEER].effect == EFFECT_DEFENSE_DOWN); + ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); + ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN); + ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); + ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); + PLAYER(SPECIES_PINSIR) { Ability(ABILITY_MOLD_BREAKER); Moves(move); } OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(player, move); } @@ -115,20 +121,20 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") PARAMETRIZE{ heldItem = ITEM_IRON_BALL; } GIVEN { ASSUME(gItemsInfo[ITEM_IRON_BALL].holdEffect == HOLD_EFFECT_IRON_BALL); - PLAYER(SPECIES_ZIGZAGOON) { Speed(4); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); Item(heldItem); } } WHEN { TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } } SCENE { if (heldItem == ITEM_IRON_BALL) { - MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); } else { MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Wobbuffet used Celebrate!"); } } } @@ -136,15 +142,15 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from paralysis") { GIVEN { - PLAYER(SPECIES_ZIGZAGOON) { Speed(4); Moves(MOVE_THUNDER_WAVE); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_THUNDER_WAVE); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(player, MOVE_THUNDER_WAVE); MOVE(opponent, MOVE_CELEBRATE); } TURN{ MOVE(player, MOVE_THUNDER_WAVE); MOVE(opponent, MOVE_CELEBRATE); } } SCENE { MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Zigzagoon used Thunder Wave!"); - MESSAGE("Zigzagoon used Thunder Wave!"); + MESSAGE("Wobbuffet used Thunder Wave!"); + MESSAGE("Wobbuffet used Thunder Wave!"); ONE_OF { MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Foe Beldum is paralyzed! It can't move!"); @@ -175,14 +181,14 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent receiving negative stat changes f GIVEN { ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS); - PLAYER(SPECIES_ZIGZAGOON) { Speed(4); Moves(MOVE_SCARY_FACE); } - OPPONENT(SPECIES_EEVEE) { Speed(3); Moves(MOVE_BATON_PASS, MOVE_CELEBRATE); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SCARY_FACE); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(3); Moves(MOVE_BATON_PASS); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_CELEBRATE); } } SCENE { - MESSAGE("Zigzagoon used Scary Face!"); + MESSAGE("Wobbuffet used Scary Face!"); MESSAGE("Foe Beldum used Celebrate!"); } } @@ -193,18 +199,18 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Topsy-Turvy") ASSUME(gMovesInfo[MOVE_TOPSY_TURVY].effect == EFFECT_TOPSY_TURVY); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS); - PLAYER(SPECIES_INKAY) { Speed(4); Moves(MOVE_SCARY_FACE, MOVE_TOPSY_TURVY); } - OPPONENT(SPECIES_EEVEE) { Speed(3); Moves(MOVE_BATON_PASS, MOVE_CELEBRATE); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SCARY_FACE, MOVE_TOPSY_TURVY); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(3); Moves(MOVE_BATON_PASS); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } TURN{ MOVE(player, MOVE_TOPSY_TURVY); MOVE(opponent, MOVE_CELEBRATE); } TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_CELEBRATE); } } SCENE { - MESSAGE("Inkay used Topsy-Turvy!"); + MESSAGE("Wobbuffet used Topsy-Turvy!"); MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Inkay used Scary Face!"); + MESSAGE("Wobbuffet used Scary Face!"); } } @@ -213,7 +219,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting pos GIVEN { ASSUME(gMovesInfo[MOVE_SPECTRAL_THIEF].additionalEffects->moveEffect == MOVE_EFFECT_SPECTRAL_THIEF); ASSUME(gMovesInfo[MOVE_AGILITY].effect == EFFECT_SPEED_UP_2); - PLAYER(SPECIES_ZIGZAGOON) { Speed(4); Moves(MOVE_SPECTRAL_THIEF, MOVE_CELEBRATE); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SPECTRAL_THIEF, MOVE_CELEBRATE); } OPPONENT(SPECIES_BELDUM) { Speed(5); Ability(ABILITY_CLEAR_BODY); Moves(MOVE_AGILITY, MOVE_CELEBRATE); } } WHEN { TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_AGILITY); } @@ -221,10 +227,10 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting pos TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } } SCENE { MESSAGE("Foe Beldum used Agility!"); - MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Zigzagoon used Spectral Thief!"); - MESSAGE("Zigzagoon used Celebrate!"); + MESSAGE("Wobbuffet used SpectrlThief!"); + MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); } } From 587c3e4a6a876a795e6634b0c50aa3a94a586d4a Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Fri, 31 May 2024 23:20:15 -0400 Subject: [PATCH 03/10] Review + change additionalEffects in tests to use MoveHasAdditionalEffect --- test/battle/ability/clear_body.c | 154 +++++++++++++--------- test/battle/move_effect/smack_down.c | 2 +- test/battle/move_effect/smelling_salts.c | 2 +- test/battle/move_effect/sparkling_aria.c | 2 +- test/battle/move_effect/thousand_arrows.c | 2 +- test/battle/move_effect/wake_up_slap.c | 2 +- 6 files changed, 95 insertions(+), 69 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 6fb1e127bc98..2b25bbc23d11 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -17,7 +17,9 @@ SINGLE_BATTLE_TEST("Clear Body prevents intimidate") } SCENE { HP_BAR(player, captureDamage: &turnOneHit); ABILITY_POPUP(player, ABILITY_INTIMIDATE); - NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + } ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); HP_BAR(player, captureDamage: &turnTwoHit); @@ -41,16 +43,18 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") ASSUME(gMovesInfo[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_LEER].effect == EFFECT_DEFENSE_DOWN); ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); - ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN); + ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); - PLAYER(SPECIES_WOBBUFFET) { Moves(move); } + PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(player, move); } + TURN { MOVE(player, move); } } SCENE { - NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + } ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } @@ -64,10 +68,12 @@ SINGLE_BATTLE_TEST("Clear Body prevents Sticky Web") OPPONENT(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(player, MOVE_STICKY_WEB); MOVE(opponent, MOVE_CELEBRATE); } - TURN{ SWITCH(opponent, 1); } + TURN { MOVE(player, MOVE_STICKY_WEB); } + TURN { SWITCH(opponent, 1); } } SCENE { - NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } + NONE_OF { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + } ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } @@ -76,41 +82,63 @@ SINGLE_BATTLE_TEST("Clear Body prevents Sticky Web") SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves used by the user") { GIVEN { - ASSUME(gMovesInfo[MOVE_SUPERPOWER].additionalEffects->moveEffect == MOVE_EFFECT_ATK_DEF_DOWN); + ASSUME(MoveHasAdditionalEffect(MOVE_SUPERPOWER, MOVE_EFFECT_ATK_DEF_DOWN) == TRUE); PLAYER(SPECIES_WOBBUFFET) - OPPONENT(SPECIES_BELDUM) { Moves(MOVE_SUPERPOWER); Ability(ABILITY_CLEAR_BODY); } + OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(opponent, MOVE_SUPERPOWER); } + TURN { MOVE(opponent, MOVE_SUPERPOWER); } } SCENE { - NONE_OF { ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } + NONE_OF { + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); + } } } -SINGLE_BATTLE_TEST("Clear Body is ignored by Mold Breaker") +SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") { u16 move; - PARAMETRIZE{ move = MOVE_GROWL; } - PARAMETRIZE{ move = MOVE_LEER; } - PARAMETRIZE{ move = MOVE_CONFIDE; } - PARAMETRIZE{ move = MOVE_FAKE_TEARS; } - PARAMETRIZE{ move = MOVE_SCARY_FACE; } - PARAMETRIZE{ move = MOVE_SWEET_SCENT; } - PARAMETRIZE{ move = MOVE_SAND_ATTACK; } + u16 ability; + PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_LEER; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_CONFIDE; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_FAKE_TEARS; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_SCARY_FACE; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_SWEET_SCENT; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_SAND_ATTACK; ability = ABILITY_MOLD_BREAKER; } + PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_MOLD_BREAKER; } + + PARAMETRIZE{ move = MOVE_LEER; ability = ABILITY_TERAVOLT; } + PARAMETRIZE{ move = MOVE_CONFIDE; ability = ABILITY_TERAVOLT; } + PARAMETRIZE{ move = MOVE_FAKE_TEARS; ability = ABILITY_TERAVOLT; } + PARAMETRIZE{ move = MOVE_SCARY_FACE; ability = ABILITY_TERAVOLT; } + PARAMETRIZE{ move = MOVE_SWEET_SCENT; ability = ABILITY_TERAVOLT; } + PARAMETRIZE{ move = MOVE_SAND_ATTACK; ability = ABILITY_TERAVOLT; } + PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_TERAVOLT; } + + PARAMETRIZE{ move = MOVE_LEER; ability = ABILITY_TURBOBLAZE; } + PARAMETRIZE{ move = MOVE_CONFIDE; ability = ABILITY_TURBOBLAZE; } + PARAMETRIZE{ move = MOVE_FAKE_TEARS; ability = ABILITY_TURBOBLAZE; } + PARAMETRIZE{ move = MOVE_SCARY_FACE; ability = ABILITY_TURBOBLAZE; } + PARAMETRIZE{ move = MOVE_SWEET_SCENT; ability = ABILITY_TURBOBLAZE; } + PARAMETRIZE{ move = MOVE_SAND_ATTACK; ability = ABILITY_TURBOBLAZE; } + PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_TURBOBLAZE; } GIVEN { ASSUME(gMovesInfo[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_LEER].effect == EFFECT_DEFENSE_DOWN); ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); - ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN); + ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); - PLAYER(SPECIES_PINSIR) { Ability(ABILITY_MOLD_BREAKER); Moves(move); } + PLAYER(SPECIES_WOBBUFFET) { Ability(ability); } OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(player, move); } + TURN { MOVE(player, move); } } SCENE { - NONE_OF { ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } + NONE_OF { + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); + } } } @@ -124,15 +152,13 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") PLAYER(SPECIES_WOBBUFFET) { Speed(4); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); Item(heldItem); } } WHEN { - TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + TURN { } } SCENE { - if (heldItem == ITEM_IRON_BALL) - { + if (heldItem == ITEM_IRON_BALL) { MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); } - else - { + else { MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Wobbuffet used Celebrate!"); } @@ -142,19 +168,19 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from paralysis") { GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_THUNDER_WAVE); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(player, MOVE_THUNDER_WAVE); MOVE(opponent, MOVE_CELEBRATE); } - TURN{ MOVE(player, MOVE_THUNDER_WAVE); MOVE(opponent, MOVE_CELEBRATE); } + TURN { MOVE(player, MOVE_THUNDER_WAVE); } + TURN { MOVE(player, MOVE_THUNDER_WAVE); } } SCENE { + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Wobbuffet used Thunder Wave!"); + MESSAGE("Wobbuffet used Thunder Wave!"); + ONE_OF { MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Wobbuffet used Thunder Wave!"); - MESSAGE("Wobbuffet used Thunder Wave!"); - ONE_OF { - MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Foe Beldum is paralyzed! It can't move!"); - } + MESSAGE("Foe Beldum is paralyzed! It can't move!"); + } } } @@ -168,7 +194,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Attack reduction from burn", s16 PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); if (burned) Status1(STATUS1_BURN); } } WHEN { - TURN{ MOVE(opponent, MOVE_TACKLE); } + TURN { MOVE(opponent, MOVE_TACKLE); } } SCENE { HP_BAR(player, captureDamage: &results[i].damage); } FINALLY { @@ -181,15 +207,15 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent receiving negative stat changes f GIVEN { ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS); - PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SCARY_FACE); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(3); Moves(MOVE_BATON_PASS); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(3); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } - TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_CELEBRATE); } + TURN { MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } + TURN { MOVE(player, MOVE_SCARY_FACE); } } SCENE { - MESSAGE("Wobbuffet used Scary Face!"); - MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Wobbuffet used Scary Face!"); + MESSAGE("Foe Beldum used Celebrate!"); } } @@ -199,38 +225,38 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Topsy-Turvy") ASSUME(gMovesInfo[MOVE_TOPSY_TURVY].effect == EFFECT_TOPSY_TURVY); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS); - PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SCARY_FACE, MOVE_TOPSY_TURVY); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(3); Moves(MOVE_BATON_PASS); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(3); } OPPONENT(SPECIES_BELDUM) { Speed(6); Ability(ABILITY_CLEAR_BODY); } } WHEN { - TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } - TURN{ MOVE(player, MOVE_TOPSY_TURVY); MOVE(opponent, MOVE_CELEBRATE); } - TURN{ MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_CELEBRATE); } + TURN { MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } + TURN { MOVE(player, MOVE_TOPSY_TURVY); } + TURN { MOVE(player, MOVE_SCARY_FACE); } } SCENE { - MESSAGE("Wobbuffet used Topsy-Turvy!"); - MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Wobbuffet used Scary Face!"); + MESSAGE("Wobbuffet used Topsy-Turvy!"); + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Wobbuffet used Scary Face!"); } } SINGLE_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting positive stat changes") { GIVEN { - ASSUME(gMovesInfo[MOVE_SPECTRAL_THIEF].additionalEffects->moveEffect == MOVE_EFFECT_SPECTRAL_THIEF); + ASSUME(MoveHasAdditionalEffect(MOVE_SPECTRAL_THIEF, MOVE_EFFECT_SPECTRAL_THIEF) == TRUE); ASSUME(gMovesInfo[MOVE_AGILITY].effect == EFFECT_SPEED_UP_2); PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SPECTRAL_THIEF, MOVE_CELEBRATE); } OPPONENT(SPECIES_BELDUM) { Speed(5); Ability(ABILITY_CLEAR_BODY); Moves(MOVE_AGILITY, MOVE_CELEBRATE); } } WHEN { - TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_AGILITY); } - TURN{ MOVE(player, MOVE_SPECTRAL_THIEF); MOVE(opponent, MOVE_CELEBRATE); } - TURN{ MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + TURN{ MOVE(opponent, MOVE_AGILITY); } + TURN{ MOVE(player, MOVE_SPECTRAL_THIEF); } + TURN{ } } SCENE { - MESSAGE("Foe Beldum used Agility!"); - MESSAGE("Wobbuffet used Celebrate!"); - MESSAGE("Foe Beldum used Celebrate!"); - MESSAGE("Wobbuffet used SpectrlThief!"); - MESSAGE("Wobbuffet used Celebrate!"); - MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Foe Beldum used Agility!"); + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Wobbuffet used SpectrlThief!"); + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Foe Beldum used Celebrate!"); } } diff --git a/test/battle/move_effect/smack_down.c b/test/battle/move_effect/smack_down.c index 54bf6885af9e..d68cb75ec331 100644 --- a/test/battle/move_effect/smack_down.c +++ b/test/battle/move_effect/smack_down.c @@ -3,7 +3,7 @@ ASSUMPTIONS { - ASSUME(gMovesInfo[MOVE_SMACK_DOWN].additionalEffects->moveEffect == MOVE_EFFECT_SMACK_DOWN); + ASSUME(MoveHasAdditionalEffect(MOVE_SMACK_DOWN, MOVE_EFFECT_SMACK_DOWN) == TRUE); } SINGLE_BATTLE_TEST("Smack Down does not ground mons behind substitutes") diff --git a/test/battle/move_effect/smelling_salts.c b/test/battle/move_effect/smelling_salts.c index 09168f8a1e75..311024a153ae 100644 --- a/test/battle/move_effect/smelling_salts.c +++ b/test/battle/move_effect/smelling_salts.c @@ -3,7 +3,7 @@ ASSUMPTIONS { - ASSUME(gMovesInfo[MOVE_SMELLING_SALTS].additionalEffects->moveEffect == MOVE_EFFECT_REMOVE_STATUS); + ASSUME(MoveHasAdditionalEffect(MOVE_SMELLING_SALTS, MOVE_EFFECT_REMOVE_STATUS) == TRUE); ASSUME(gMovesInfo[MOVE_SMELLING_SALTS].argument == STATUS1_PARALYSIS); } diff --git a/test/battle/move_effect/sparkling_aria.c b/test/battle/move_effect/sparkling_aria.c index 1bf7de2df487..0cbfdbc3e9de 100644 --- a/test/battle/move_effect/sparkling_aria.c +++ b/test/battle/move_effect/sparkling_aria.c @@ -3,7 +3,7 @@ ASSUMPTIONS { - ASSUME(gMovesInfo[MOVE_SPARKLING_ARIA].additionalEffects->moveEffect == MOVE_EFFECT_REMOVE_STATUS); + ASSUME(MoveHasAdditionalEffect(MOVE_SPARKLING_ARIA, MOVE_EFFECT_REMOVE_STATUS) == TRUE); ASSUME(gMovesInfo[MOVE_SPARKLING_ARIA].argument == STATUS1_BURN); ASSUME(gMovesInfo[MOVE_SPARKLING_ARIA].soundMove == TRUE); } diff --git a/test/battle/move_effect/thousand_arrows.c b/test/battle/move_effect/thousand_arrows.c index bff3706c34fa..ff1b041cba05 100644 --- a/test/battle/move_effect/thousand_arrows.c +++ b/test/battle/move_effect/thousand_arrows.c @@ -3,7 +3,7 @@ ASSUMPTIONS { - ASSUME(gMovesInfo[MOVE_THOUSAND_ARROWS].additionalEffects->moveEffect == MOVE_EFFECT_SMACK_DOWN); + ASSUME(MoveHasAdditionalEffect(MOVE_THOUSAND_ARROWS, MOVE_EFFECT_SMACK_DOWN) == TRUE); ASSUME(gMovesInfo[MOVE_THOUSAND_ARROWS].ignoreTypeIfFlyingAndUngrounded == TRUE); } diff --git a/test/battle/move_effect/wake_up_slap.c b/test/battle/move_effect/wake_up_slap.c index 98bcf95b2027..2c9dd7ed2441 100644 --- a/test/battle/move_effect/wake_up_slap.c +++ b/test/battle/move_effect/wake_up_slap.c @@ -3,7 +3,7 @@ ASSUMPTIONS { - ASSUME(gMovesInfo[MOVE_WAKE_UP_SLAP].additionalEffects->moveEffect == MOVE_EFFECT_REMOVE_STATUS); + ASSUME(MoveHasAdditionalEffect(MOVE_WAKE_UP_SLAP, MOVE_EFFECT_REMOVE_STATUS) == TRUE); ASSUME(gMovesInfo[MOVE_WAKE_UP_SLAP].argument == STATUS1_SLEEP); } From 2e0c653807b2b7cf433f851bb346b2a99f1dee3b Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Sat, 1 Jun 2024 11:39:41 -0400 Subject: [PATCH 04/10] Fix Sweet Scent assume --- test/battle/ability/clear_body.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 2b25bbc23d11..511cd2ab6ff3 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -45,7 +45,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } @@ -129,7 +129,7 @@ SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) { Ability(ability); } OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } From 5fd3532e16eea06777ac62faf0772809aecdb434 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Sat, 1 Jun 2024 12:39:10 -0400 Subject: [PATCH 05/10] Fix assumptions --- test/battle/ability/clear_body.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 511cd2ab6ff3..e3cf2a5161e2 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -45,7 +45,8 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); + ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } @@ -82,7 +83,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents Sticky Web") SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves used by the user") { GIVEN { - ASSUME(MoveHasAdditionalEffect(MOVE_SUPERPOWER, MOVE_EFFECT_ATK_DEF_DOWN) == TRUE); + ASSUME(MoveHasAdditionalEffectSelf(MOVE_SUPERPOWER, MOVE_EFFECT_ATK_DEF_DOWN) == TRUE); PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } } WHEN { @@ -129,7 +130,8 @@ SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); + ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) { Ability(ability); } OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } From 22ee823bc10e8f6c6f32e95a7b62a04202f39146 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Sun, 2 Jun 2024 12:43:21 -0400 Subject: [PATCH 06/10] Review feedback --- test/battle/ability/clear_body.c | 52 +++++++++++++++----------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index e3cf2a5161e2..9dc6ab81478b 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -97,32 +97,31 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves u SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") { - u16 move; - u16 ability; - PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_LEER; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_CONFIDE; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_FAKE_TEARS; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_SCARY_FACE; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_SWEET_SCENT; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_SAND_ATTACK; ability = ABILITY_MOLD_BREAKER; } - PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_MOLD_BREAKER; } - - PARAMETRIZE{ move = MOVE_LEER; ability = ABILITY_TERAVOLT; } - PARAMETRIZE{ move = MOVE_CONFIDE; ability = ABILITY_TERAVOLT; } - PARAMETRIZE{ move = MOVE_FAKE_TEARS; ability = ABILITY_TERAVOLT; } - PARAMETRIZE{ move = MOVE_SCARY_FACE; ability = ABILITY_TERAVOLT; } - PARAMETRIZE{ move = MOVE_SWEET_SCENT; ability = ABILITY_TERAVOLT; } - PARAMETRIZE{ move = MOVE_SAND_ATTACK; ability = ABILITY_TERAVOLT; } - PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_TERAVOLT; } + u32 j, k; + u16 ability = ABILITY_NONE; + u16 move = ABILITY_NONE; + static const u16 breakerAbilities[] = { + ABILITY_MOLD_BREAKER, + ABILITY_TERAVOLT, + ABILITY_TURBOBLAZE, + }; + static const u16 statReductionMoves[] = { + MOVE_GROWL, + MOVE_LEER, + MOVE_CONFIDE, + MOVE_FAKE_TEARS, + MOVE_SCARY_FACE, + MOVE_SWEET_SCENT, + MOVE_SAND_ATTACK, + }; - PARAMETRIZE{ move = MOVE_LEER; ability = ABILITY_TURBOBLAZE; } - PARAMETRIZE{ move = MOVE_CONFIDE; ability = ABILITY_TURBOBLAZE; } - PARAMETRIZE{ move = MOVE_FAKE_TEARS; ability = ABILITY_TURBOBLAZE; } - PARAMETRIZE{ move = MOVE_SCARY_FACE; ability = ABILITY_TURBOBLAZE; } - PARAMETRIZE{ move = MOVE_SWEET_SCENT; ability = ABILITY_TURBOBLAZE; } - PARAMETRIZE{ move = MOVE_SAND_ATTACK; ability = ABILITY_TURBOBLAZE; } - PARAMETRIZE{ move = MOVE_GROWL; ability = ABILITY_TURBOBLAZE; } + for (j = 0; j < ARRAY_COUNT(statReductionMoves); j++) + { + for (k = 0; k < ARRAY_COUNT(breakerAbilities); k++) + { + PARAMETRIZE{ move = statReductionMoves[j]; ability = breakerAbilities[k]; } + } + } GIVEN { ASSUME(gMovesInfo[MOVE_GROWL].effect == EFFECT_ATTACK_DOWN); @@ -159,8 +158,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") if (heldItem == ITEM_IRON_BALL) { MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); - } - else { + } else { MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Wobbuffet used Celebrate!"); } From b8e199ae9e810f5367c909f06717af43536e0129 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Sat, 8 Jun 2024 12:37:59 -0400 Subject: [PATCH 07/10] Review feedback --- test/battle/ability/clear_body.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 9dc6ab81478b..c05a78c45b95 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -155,6 +155,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from Iron Ball") } WHEN { TURN { } } SCENE { + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); if (heldItem == ITEM_IRON_BALL) { MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); @@ -174,6 +175,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from paralysis") TURN { MOVE(player, MOVE_THUNDER_WAVE); } TURN { MOVE(player, MOVE_THUNDER_WAVE); } } SCENE { + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Wobbuffet used Thunder Wave!"); MESSAGE("Wobbuffet used Thunder Wave!"); @@ -196,6 +198,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Attack reduction from burn", s16 } WHEN { TURN { MOVE(opponent, MOVE_TACKLE); } } SCENE { + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); HP_BAR(player, captureDamage: &results[i].damage); } FINALLY { EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); @@ -214,6 +217,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent receiving negative stat changes f TURN { MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } TURN { MOVE(player, MOVE_SCARY_FACE); } } SCENE { + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Wobbuffet used Scary Face!"); MESSAGE("Foe Beldum used Celebrate!"); } @@ -233,6 +237,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Topsy-Turvy") TURN { MOVE(player, MOVE_TOPSY_TURVY); } TURN { MOVE(player, MOVE_SCARY_FACE); } } SCENE { + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Wobbuffet used Topsy-Turvy!"); MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); @@ -245,18 +250,19 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting pos GIVEN { ASSUME(MoveHasAdditionalEffect(MOVE_SPECTRAL_THIEF, MOVE_EFFECT_SPECTRAL_THIEF) == TRUE); ASSUME(gMovesInfo[MOVE_AGILITY].effect == EFFECT_SPEED_UP_2); - PLAYER(SPECIES_WOBBUFFET) { Speed(4); Moves(MOVE_SPECTRAL_THIEF, MOVE_CELEBRATE); } - OPPONENT(SPECIES_BELDUM) { Speed(5); Ability(ABILITY_CLEAR_BODY); Moves(MOVE_AGILITY, MOVE_CELEBRATE); } + PLAYER(SPECIES_WOBBUFFET) { Speed(4); } + OPPONENT(SPECIES_METANG) { Speed(5); Ability(ABILITY_CLEAR_BODY); } } WHEN { TURN{ MOVE(opponent, MOVE_AGILITY); } TURN{ MOVE(player, MOVE_SPECTRAL_THIEF); } TURN{ } } SCENE { - MESSAGE("Foe Beldum used Agility!"); + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); + MESSAGE("Foe Metang used Agility!"); MESSAGE("Wobbuffet used Celebrate!"); - MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Foe Metang used Celebrate!"); MESSAGE("Wobbuffet used SpectrlThief!"); MESSAGE("Wobbuffet used Celebrate!"); - MESSAGE("Foe Beldum used Celebrate!"); + MESSAGE("Foe Metang used Celebrate!"); } } From a7a89df80fd6174f875430dd4439f1e654598e94 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Sat, 8 Jun 2024 20:32:57 -0400 Subject: [PATCH 08/10] Review feedback --- test/battle/ability/clear_body.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index c05a78c45b95..16a419d8c4e5 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -45,7 +45,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); + ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); // For Sweet Scent ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) @@ -90,7 +90,8 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves u TURN { MOVE(opponent, MOVE_SUPERPOWER); } } SCENE { NONE_OF { - ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); + MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } } } @@ -129,7 +130,7 @@ SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); + ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); // For Sweet Scent ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) { Ability(ability); } @@ -138,7 +139,8 @@ SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") TURN { MOVE(player, move); } } SCENE { NONE_OF { - ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); + MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); } } } From 55a2c85d9511bea0df5b949ac4533e2490676ea0 Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Sat, 8 Jun 2024 20:47:19 -0400 Subject: [PATCH 09/10] Review feedback --- test/battle/ability/clear_body.c | 6 ++---- test/battle/hold_effect/clear_amulet.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index 16a419d8c4e5..f265c4ea5c51 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -45,8 +45,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); // For Sweet Scent - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } @@ -130,8 +129,7 @@ SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); // For Sweet Scent - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET) { Ability(ability); } OPPONENT(SPECIES_BELDUM) { Ability(ABILITY_CLEAR_BODY); } diff --git a/test/battle/hold_effect/clear_amulet.c b/test/battle/hold_effect/clear_amulet.c index 9500419540f5..f2059a02854e 100644 --- a/test/battle/hold_effect/clear_amulet.c +++ b/test/battle/hold_effect/clear_amulet.c @@ -47,8 +47,7 @@ SINGLE_BATTLE_TEST("Clear Amulet prevents stat reducing effects") ASSUME(gMovesInfo[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN); ASSUME(gMovesInfo[MOVE_FAKE_TEARS].effect == EFFECT_SPECIAL_DEFENSE_DOWN_2); ASSUME(gMovesInfo[MOVE_SCARY_FACE].effect == EFFECT_SPEED_DOWN_2); - ASSUME(B_UPDATED_MOVE_DATA >= GEN_6); - ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == EFFECT_EVASION_DOWN_2); + ASSUME(gMovesInfo[MOVE_SWEET_SCENT].effect == (B_UPDATED_MOVE_DATA >= GEN_6 ? EFFECT_EVASION_DOWN_2 : EFFECT_EVASION_DOWN)); ASSUME(gMovesInfo[MOVE_SAND_ATTACK].effect == EFFECT_ACCURACY_DOWN); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_CLEAR_AMULET); }; From 02ad63784997cb2aeb8507962ccdedda200785ad Mon Sep 17 00:00:00 2001 From: Pawkkie Date: Mon, 10 Jun 2024 21:40:42 -0400 Subject: [PATCH 10/10] Review feedback --- test/battle/ability/clear_body.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/battle/ability/clear_body.c b/test/battle/ability/clear_body.c index f265c4ea5c51..1117bac3d3ee 100644 --- a/test/battle/ability/clear_body.c +++ b/test/battle/ability/clear_body.c @@ -53,6 +53,7 @@ SINGLE_BATTLE_TEST("Clear Body prevents stat stage reduction from moves") TURN { MOVE(player, move); } } SCENE { NONE_OF { + ANIMATION(ANIM_TYPE_MOVE, move, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); } ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); @@ -88,6 +89,7 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent stat stage reduction from moves u } WHEN { TURN { MOVE(opponent, MOVE_SUPERPOWER); } } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SUPERPOWER, opponent); NONE_OF { ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); @@ -136,6 +138,7 @@ SINGLE_BATTLE_TEST("Mold Breaker, Teravolt, and Turboblaze ignore Clear Body") } WHEN { TURN { MOVE(player, move); } } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, player); NONE_OF { ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum's Clear Body prevents stat loss!"); @@ -175,9 +178,10 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Speed reduction from paralysis") TURN { MOVE(player, MOVE_THUNDER_WAVE); } TURN { MOVE(player, MOVE_THUNDER_WAVE); } } SCENE { - NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Wobbuffet used Thunder Wave!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDER_WAVE, player); + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Wobbuffet used Thunder Wave!"); ONE_OF { MESSAGE("Foe Beldum used Celebrate!"); @@ -217,8 +221,9 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent receiving negative stat changes f TURN { MOVE(player, MOVE_SCARY_FACE); MOVE(opponent, MOVE_BATON_PASS); SEND_OUT(opponent, 1); } TURN { MOVE(player, MOVE_SCARY_FACE); } } SCENE { - NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Wobbuffet used Scary Face!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SCARY_FACE, player); + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Beldum used Celebrate!"); } } @@ -237,11 +242,14 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Topsy-Turvy") TURN { MOVE(player, MOVE_TOPSY_TURVY); } TURN { MOVE(player, MOVE_SCARY_FACE); } } SCENE { - NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Wobbuffet used Topsy-Turvy!"); + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TOPSY_TURVY, player); MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Foe Beldum used Celebrate!"); MESSAGE("Wobbuffet used Scary Face!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SCARY_FACE, player); + ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); } } @@ -257,11 +265,13 @@ SINGLE_BATTLE_TEST("Clear Body doesn't prevent Spectral Thief from resetting pos TURN{ MOVE(player, MOVE_SPECTRAL_THIEF); } TURN{ } } SCENE { - NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Foe Metang used Agility!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_AGILITY, opponent); MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Metang used Celebrate!"); MESSAGE("Wobbuffet used SpectrlThief!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_SPECTRAL_THIEF, player); + NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY); MESSAGE("Wobbuffet used Celebrate!"); MESSAGE("Foe Metang used Celebrate!"); }