mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Tests for form change on switch out and fainting
This commit is contained in:
parent
498f4a2c97
commit
fad11981a5
@ -20,11 +20,11 @@ SINGLE_BATTLE_TEST("Zen Mode switches Darmanitan's form when HP is half or less
|
|||||||
} WHEN {
|
} WHEN {
|
||||||
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_TACKLE); }
|
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_TACKLE); }
|
||||||
} SCENE {
|
} SCENE {
|
||||||
MESSAGE("Darmanitan used Celebrate!");
|
MESSAGE("Darmanitan used Celebrate!");
|
||||||
MESSAGE("Foe Wobbuffet used Tackle!");
|
MESSAGE("Foe Wobbuffet used Tackle!");
|
||||||
HP_BAR(player);
|
HP_BAR(player);
|
||||||
ABILITY_POPUP(player, ABILITY_ZEN_MODE);
|
ABILITY_POPUP(player, ABILITY_ZEN_MODE);
|
||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player);
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player);
|
||||||
} THEN {
|
} THEN {
|
||||||
ASSUME(player->hp <= player->maxHP / 2);
|
ASSUME(player->hp <= player->maxHP / 2);
|
||||||
EXPECT_EQ(player->species, zenSpecies);
|
EXPECT_EQ(player->species, zenSpecies);
|
||||||
|
@ -79,3 +79,41 @@ SINGLE_BATTLE_TEST("Zamazenta's Iron Head becomes Behemoth Bash upon form change
|
|||||||
EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BASH);
|
EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BASH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon switching out")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
ASSUME(P_GEN_6_POKEMON == TRUE);
|
||||||
|
PLAYER(SPECIES_AEGISLASH);
|
||||||
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(player, MOVE_TACKLE); }
|
||||||
|
TURN { SWITCH(player, 1); }
|
||||||
|
TURN { SWITCH(player, 0); }
|
||||||
|
} SCENE {
|
||||||
|
ABILITY_POPUP(player, ABILITY_STANCE_CHANGE);
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player);
|
||||||
|
MESSAGE("Aegislash used Tackle!");
|
||||||
|
MESSAGE("Foe Wobbuffet used Celebrate!");
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(player->species, SPECIES_AEGISLASH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
ASSUME(P_GEN_6_POKEMON == TRUE);
|
||||||
|
PLAYER(SPECIES_AEGISLASH) { HP(1); };
|
||||||
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(opponent, MOVE_GUST); SEND_OUT(player, 1);}
|
||||||
|
} SCENE {
|
||||||
|
MESSAGE("Foe Wobbuffet used Gust!");
|
||||||
|
MESSAGE("Aegislash fainted!");
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(GetMonData(&PLAYER_PARTY[0], MON_DATA_SPECIES), SPECIES_AEGISLASH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user