mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Additional Weak Armor tests (#3493)
This commit is contained in:
commit
3788d84439
@ -29,6 +29,13 @@ SINGLE_BATTLE_TEST("Weak Armor lowers Defense by 1 and boosts Speed by 2 when hi
|
|||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
MESSAGE("Slugma's Weak Armor lowered its Defense!");
|
MESSAGE("Slugma's Weak Armor lowered its Defense!");
|
||||||
MESSAGE("Slugma's Weak Armor raised its Speed!");
|
MESSAGE("Slugma's Weak Armor raised its Speed!");
|
||||||
|
} else {
|
||||||
|
NONE_OF {
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
MESSAGE("Slugma's Weak Armor lowered its Defense!");
|
||||||
|
MESSAGE("Slugma's Weak Armor raised its Speed!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} THEN {
|
} THEN {
|
||||||
if (move == MOVE_TACKLE) {
|
if (move == MOVE_TACKLE) {
|
||||||
@ -68,3 +75,122 @@ SINGLE_BATTLE_TEST("Weak Armor does not trigger when brought in by Dragon Tail a
|
|||||||
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Weak Armor still lowers boosts Speed if Defense can't go any lower")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_SLUGMA) { Ability(ABILITY_WEAK_ARMOR); }
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(opponent, MOVE_SCREECH); }
|
||||||
|
TURN { MOVE(opponent, MOVE_SCREECH); }
|
||||||
|
TURN { MOVE(opponent, MOVE_SCREECH); }
|
||||||
|
TURN { MOVE(opponent, MOVE_TACKLE); }
|
||||||
|
} SCENE {
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||||
|
HP_BAR(player);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
NONE_OF {
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
MESSAGE("Slugma's Weak Armor lowered its Defense!");
|
||||||
|
}
|
||||||
|
MESSAGE("Slugma's Defense won't go lower!");
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
MESSAGE("Slugma's Weak Armor raised its Speed!");
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(player->statStages[STAT_DEF], MIN_STAT_STAGE);
|
||||||
|
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Weak Armor still lowers Defense if Speed can't go any higher")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_SLUGMA) { Ability(ABILITY_WEAK_ARMOR); }
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(player, MOVE_AGILITY); }
|
||||||
|
TURN { MOVE(player, MOVE_AGILITY); }
|
||||||
|
TURN { MOVE(player, MOVE_AGILITY); }
|
||||||
|
TURN { MOVE(opponent, MOVE_TACKLE); }
|
||||||
|
} SCENE {
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||||
|
HP_BAR(player);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
MESSAGE("Slugma's Weak Armor lowered its Defense!");
|
||||||
|
NONE_OF {
|
||||||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
MESSAGE("Slugma's Weak Armor raised its Speed!");
|
||||||
|
}
|
||||||
|
MESSAGE("Slugma's Speed won't go higher!");
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(player->statStages[STAT_DEF], DEFAULT_STAT_STAGE - 1);
|
||||||
|
EXPECT_EQ(player->statStages[STAT_SPEED], MAX_STAT_STAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Weak Armor doesn't interrupt multi hit moves if Defense can't go any lower")
|
||||||
|
{
|
||||||
|
u32 j;
|
||||||
|
KNOWN_FAILING;
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_MAGCARGO) { Ability(ABILITY_WEAK_ARMOR); Defense(999); }
|
||||||
|
OPPONENT(SPECIES_CLOYSTER) { Ability(ABILITY_SKILL_LINK); }
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(opponent, MOVE_SCREECH); }
|
||||||
|
TURN { MOVE(opponent, MOVE_SCREECH); }
|
||||||
|
TURN { MOVE(opponent, MOVE_FURY_SWIPES); }
|
||||||
|
} SCENE {
|
||||||
|
for (j = 0; j < 2; j++)
|
||||||
|
{
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FURY_SWIPES, opponent);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
MESSAGE("Magcargo's Weak Armor lowered its Defense!");
|
||||||
|
MESSAGE("Magcargo's Weak Armor raised its Speed!");
|
||||||
|
}
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FURY_SWIPES, opponent);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
MESSAGE("Magcargo's Defense won't go lower!");
|
||||||
|
MESSAGE("Magcargo's Weak Armor raised its Speed!");
|
||||||
|
for (j = 0; j < 2; j++)
|
||||||
|
{
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FURY_SWIPES, opponent);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
MESSAGE("Magcargo's Defense won't go lower!");
|
||||||
|
MESSAGE("Slugma's Speed won't go higher!");
|
||||||
|
}
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(player->statStages[STAT_DEF], MIN_STAT_STAGE);
|
||||||
|
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SINGLE_BATTLE_TEST("Weak Armor doesn't interrupt multi hit moves if Speed can't go any higher")
|
||||||
|
{
|
||||||
|
u32 j;
|
||||||
|
KNOWN_FAILING;
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_MAGCARGO) { Ability(ABILITY_WEAK_ARMOR); Defense(999); }
|
||||||
|
OPPONENT(SPECIES_CLOYSTER) { Ability(ABILITY_SKILL_LINK); }
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(player, MOVE_AGILITY); }
|
||||||
|
TURN { MOVE(player, MOVE_AGILITY); }
|
||||||
|
TURN { MOVE(opponent, MOVE_FURY_SWIPES); }
|
||||||
|
} SCENE {
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FURY_SWIPES, opponent);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
MESSAGE("Magcargo's Weak Armor lowered its Defense!");
|
||||||
|
MESSAGE("Magcargo's Weak Armor raised its Speed!");
|
||||||
|
for (j = 0; j < 4; j++)
|
||||||
|
{
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FURY_SWIPES, opponent);
|
||||||
|
ABILITY_POPUP(player, ABILITY_WEAK_ARMOR);
|
||||||
|
MESSAGE("Magcargo's Weak Armor lowered its Defense!");
|
||||||
|
MESSAGE("Magcargo's Speed won't go higher!");
|
||||||
|
}
|
||||||
|
} THEN {
|
||||||
|
EXPECT_EQ(player->statStages[STAT_DEF], MIN_STAT_STAGE);
|
||||||
|
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user