forked from rh-hideout/pokeemerald-expansion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing Move Effect TODO tests - Volume D (rh-hideout#5887)
- Loading branch information
1 parent
7ddb4cd
commit 433058e
Showing
26 changed files
with
568 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
SINGLE_BATTLE_TEST("Liquid Ooze causes Absorb users to lose HP instead of heal") | ||
{ | ||
s16 damage; | ||
s16 healed; | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_TENTACOOL) { Ability(ABILITY_LIQUID_OOZE); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_ABSORB); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ABSORB, player); | ||
HP_BAR(opponent, captureDamage: &damage); | ||
HP_BAR(player, captureDamage: &healed); | ||
MESSAGE("Wobbuffet sucked up the liquid ooze!"); | ||
} THEN { | ||
EXPECT_MUL_EQ(damage, Q_4_12(0.5), healed); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Liquid Ooze causes Leech Seed users to lose HP instead of heal") | ||
{ | ||
s16 damage; | ||
s16 healed; | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WYNAUT); | ||
OPPONENT(SPECIES_TENTACOOL) { Ability(ABILITY_LIQUID_OOZE); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_LEECH_SEED); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_LEECH_SEED, player); | ||
HP_BAR(opponent, captureDamage: &damage); | ||
HP_BAR(player, captureDamage: &healed); | ||
} THEN { | ||
EXPECT_EQ(damage, healed); | ||
} | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Liquid Ooze causes Matcha Gatcha users to lose HP instead of heal") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_MATCHA_GOTCHA].effect == EFFECT_ABSORB); | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); } | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_TENTACOOL) { Ability(ABILITY_LIQUID_OOZE); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(playerLeft, MOVE_MATCHA_GOTCHA); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_MATCHA_GOTCHA, playerLeft); | ||
HP_BAR(opponentLeft); | ||
HP_BAR(playerLeft); | ||
MESSAGE("Wobbuffet sucked up the liquid ooze!"); | ||
MESSAGE("Wobbuffet fainted!"); | ||
} | ||
} | ||
|
||
DOUBLE_BATTLE_TEST("Liquid Ooze will faint Matcha Gatcha users if it deals enough damage") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_MATCHA_GOTCHA].effect == EFFECT_ABSORB); | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); } | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_TENTACOOL) { Ability(ABILITY_LIQUID_OOZE); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(playerLeft, MOVE_MATCHA_GOTCHA); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_MATCHA_GOTCHA, playerLeft); | ||
HP_BAR(opponentLeft); | ||
HP_BAR(playerLeft); | ||
MESSAGE("Wobbuffet sucked up the liquid ooze!"); | ||
MESSAGE("Wobbuffet fainted!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Liquid Ooze causes Strength Sap users to lose HP instead of heal") | ||
{ | ||
s16 lostHp; | ||
s32 atkStat; | ||
|
||
PARAMETRIZE { atkStat = 100; } | ||
PARAMETRIZE { atkStat = 490; } // Checks that attacker can faint with no problems. | ||
|
||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET) { Attack(atkStat); Ability(ABILITY_LIQUID_OOZE); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_STRENGTH_SAP); if (atkStat == 490) { SEND_OUT(player, 1); } } | ||
} SCENE { | ||
MESSAGE("Wobbuffet used Strength Sap!"); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STRENGTH_SAP, player); | ||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); | ||
MESSAGE("The opposing Wobbuffet's Attack fell!"); | ||
ABILITY_POPUP(opponent, ABILITY_LIQUID_OOZE); | ||
HP_BAR(player, captureDamage: &lostHp); | ||
MESSAGE("Wobbuffet sucked up the liquid ooze!"); | ||
if (atkStat >= 490) { | ||
MESSAGE("Wobbuffet fainted!"); | ||
SEND_IN_MESSAGE("Wobbuffet"); | ||
} | ||
} THEN { | ||
EXPECT_EQ(lostHp, atkStat); | ||
} | ||
} | ||
|
||
TO_DO_BATTLE_TEST("Liquid Ooze does not cause Dream Eater users to lose HP instead of heal (Gen 3-4"); | ||
TO_DO_BATTLE_TEST("Liquid Ooze causes Dream Eater users to lose HP instead of heal (Gen 5+"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gMovesInfo[MOVE_DARK_VOID].effect == EFFECT_DARK_VOID); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Dark Void inflicts 1-3 turns of sleep") | ||
{ | ||
u32 turns, count; | ||
ASSUME(B_SLEEP_TURNS >= GEN_5); | ||
PARAMETRIZE { turns = 1; } | ||
PARAMETRIZE { turns = 2; } | ||
PARAMETRIZE { turns = 3; } | ||
PASSES_RANDOMLY(1, 3, RNG_SLEEP_TURNS); | ||
GIVEN { | ||
PLAYER(SPECIES_DARKRAI); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_DARK_VOID); MOVE(opponent, MOVE_CELEBRATE); } | ||
for (count = 0; count < turns; ++count) | ||
TURN {} | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DARK_VOID, player); | ||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent); | ||
MESSAGE("The opposing Wobbuffet fell asleep!"); | ||
STATUS_ICON(opponent, sleep: TRUE); | ||
for (count = 0; count < turns; ++count) | ||
{ | ||
if (count < turns - 1) | ||
MESSAGE("The opposing Wobbuffet is fast asleep."); | ||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent); | ||
} | ||
MESSAGE("The opposing Wobbuffet woke up!"); | ||
STATUS_ICON(opponent, none: TRUE); | ||
} | ||
} | ||
|
||
TO_DO_BATTLE_TEST("Dark Void can only be used by Darkrai (Gen7+)"); | ||
TO_DO_BATTLE_TEST("Dark Void can be used by Pokémon other than Darkrai (Gen4-6)"); | ||
TO_DO_BATTLE_TEST("Dark Void can be used by a Pokémon transformed into Darkrai"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
TO_DO_BATTLE_TEST("Decorate raises the target's Attack by 2 stages"); | ||
TO_DO_BATTLE_TEST("Decorate raises the target's Sp. Attack by 2 stages"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gMovesInfo[MOVE_DEFENSE_CURL].effect == EFFECT_DEFENSE_CURL); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Defense Curl raises Defense by 1 stage", s16 damage) | ||
{ | ||
bool32 raiseDefense; | ||
PARAMETRIZE { raiseDefense = FALSE; } | ||
PARAMETRIZE { raiseDefense = TRUE; } | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL); | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
if (raiseDefense) TURN { MOVE(player, MOVE_DEFENSE_CURL); } | ||
TURN { MOVE(opponent, MOVE_TACKLE); } | ||
} SCENE { | ||
if (raiseDefense) { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DEFENSE_CURL, player); | ||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); | ||
MESSAGE("Wobbuffet's Defense rose!"); | ||
} | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); | ||
HP_BAR(player, captureDamage: &results[i].damage); | ||
} FINALLY { | ||
EXPECT_MUL_EQ(results[1].damage, Q_4_12(1.5), results[0].damage); | ||
} | ||
} | ||
|
||
TO_DO_BATTLE_TEST("Defense Curl doubles the power of Rollout and Ice Ball"); | ||
TO_DO_BATTLE_TEST("Defense Curl's effect cannot be stacked"); | ||
TO_DO_BATTLE_TEST("Defense Curl's effect is removed when switching out"); | ||
TO_DO_BATTLE_TEST("Baton Pass doesn't pass Defense Curl's effect"); |
Oops, something went wrong.