forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small Battle Test reorganization (#4504)
* Fixed test folders + Chud Chew test name fixes * Adjusted file names + merged Burn Up and Double Shock files * Added Spit Up/Swallow files that point to Stockpile's file * Multiple changes (see description) - Moved secondary effect files to their own folder. - Split hit_set_entry_hazards.c to separate files for Spikes/Stealth Rock. - Grouped Hex/Venoshock to the same file
- Loading branch information
1 parent
e20cb62
commit 5ec08ee
Showing
45 changed files
with
311 additions
and
295 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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("Burn Up user loses its Fire-type") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_BURN_UP].effect == EFFECT_FAIL_IF_NOT_ARG_TYPE); | ||
ASSUME(MoveHasAdditionalEffectSelfArg(MOVE_BURN_UP, MOVE_EFFECT_REMOVE_ARG_TYPE, TYPE_FIRE) == TRUE); | ||
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_FIRE || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_FIRE); | ||
ASSUME(gSpeciesInfo[SPECIES_CYNDAQUIL].types[0] == TYPE_FIRE || gSpeciesInfo[SPECIES_CYNDAQUIL].types[1] == TYPE_FIRE); | ||
PLAYER(SPECIES_CYNDAQUIL); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_BURN_UP); } | ||
TURN { MOVE(player, MOVE_BURN_UP); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); | ||
MESSAGE("Cyndaquil burned itself out!"); | ||
MESSAGE("Cyndaquil used Burn Up!"); | ||
MESSAGE("But it failed!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Burn Up fails if the user isn't a Fire-type") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_BURN_UP].effect == EFFECT_FAIL_IF_NOT_ARG_TYPE); | ||
ASSUME(MoveHasAdditionalEffectSelfArg(MOVE_BURN_UP, MOVE_EFFECT_REMOVE_ARG_TYPE, TYPE_FIRE) == TRUE); | ||
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_FIRE || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_FIRE); | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_BURN_UP); } | ||
} SCENE { | ||
NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); } | ||
MESSAGE("Wobbuffet used Burn Up!"); | ||
MESSAGE("But it failed!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Burn Up user loses its Fire-type if enemy faints") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_BURN_UP].effect == EFFECT_FAIL_IF_NOT_ARG_TYPE); | ||
ASSUME(MoveHasAdditionalEffectSelfArg(MOVE_BURN_UP, MOVE_EFFECT_REMOVE_ARG_TYPE, TYPE_FIRE) == TRUE); | ||
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_FIRE || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_FIRE); | ||
ASSUME(gSpeciesInfo[SPECIES_CYNDAQUIL].types[0] == TYPE_FIRE || gSpeciesInfo[SPECIES_CYNDAQUIL].types[1] == TYPE_FIRE); | ||
PLAYER(SPECIES_CYNDAQUIL); | ||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_BURN_UP); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); | ||
HP_BAR(opponent, hp: 0); | ||
MESSAGE("Cyndaquil burned itself out!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Double Shock user loses its Electric-type") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_DOUBLE_SHOCK].effect == EFFECT_FAIL_IF_NOT_ARG_TYPE); | ||
ASSUME(MoveHasAdditionalEffectSelfArg(MOVE_DOUBLE_SHOCK, MOVE_EFFECT_REMOVE_ARG_TYPE, TYPE_ELECTRIC) == TRUE); | ||
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ELECTRIC || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ELECTRIC); | ||
ASSUME(gSpeciesInfo[SPECIES_PIKACHU].types[0] == TYPE_ELECTRIC || gSpeciesInfo[SPECIES_PIKACHU].types[1] == TYPE_ELECTRIC); | ||
PLAYER(SPECIES_PIKACHU); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } | ||
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); | ||
MESSAGE("Pikachu used up all of its electricity!"); | ||
MESSAGE("Pikachu used Double Shock!"); | ||
MESSAGE("But it failed!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Double Shock fails if the user isn't an Electric-type") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_DOUBLE_SHOCK].effect == EFFECT_FAIL_IF_NOT_ARG_TYPE); | ||
ASSUME(MoveHasAdditionalEffectSelfArg(MOVE_DOUBLE_SHOCK, MOVE_EFFECT_REMOVE_ARG_TYPE, TYPE_ELECTRIC) == TRUE); | ||
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ELECTRIC || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ELECTRIC); | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } | ||
} SCENE { | ||
NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); } | ||
MESSAGE("Wobbuffet used Double Shock!"); | ||
MESSAGE("But it failed!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Double Shock user loses its Electric-type if enemy faints") | ||
{ | ||
GIVEN { | ||
ASSUME(gMovesInfo[MOVE_DOUBLE_SHOCK].effect == EFFECT_FAIL_IF_NOT_ARG_TYPE); | ||
ASSUME(MoveHasAdditionalEffectSelfArg(MOVE_DOUBLE_SHOCK, MOVE_EFFECT_REMOVE_ARG_TYPE, TYPE_ELECTRIC) == TRUE); | ||
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ELECTRIC || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ELECTRIC); | ||
ASSUME(gSpeciesInfo[SPECIES_PIKACHU].types[0] == TYPE_ELECTRIC || gSpeciesInfo[SPECIES_PIKACHU].types[1] == TYPE_ELECTRIC); | ||
PLAYER(SPECIES_PIKACHU); | ||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); | ||
HP_BAR(opponent, hp: 0); | ||
MESSAGE("Pikachu used up all of its electricity!"); | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,4 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
// Go to test/battle/move_effect/stockpile.c for Spit Up's tests |
Oops, something went wrong.