Review + change additionalEffects in tests to use MoveHasAdditionalEffect

This commit is contained in:
Pawkkie 2024-05-31 23:20:15 -04:00
parent 167a898bc0
commit 587c3e4a6a
6 changed files with 95 additions and 69 deletions

View file

@ -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!");
}
}

View file

@ -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")

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}