Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Battle Test reorganization #4504

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "global.h"
#include "test/battle.h"

SINGLE_BATTLE_TEST("Cud Chuw will activate Kee Berry effect again on the next turn")
SINGLE_BATTLE_TEST("Cud Chew will activate Kee Berry effect again on the next turn")
{
GIVEN {
ASSUME(gItemsInfo[ITEM_KEE_BERRY].holdEffect == HOLD_EFFECT_KEE_BERRY);
Expand All @@ -23,7 +23,7 @@ SINGLE_BATTLE_TEST("Cud Chuw will activate Kee Berry effect again on the next tu
}
}

SINGLE_BATTLE_TEST("Cud Chuw will activate Oran Berry effect again on the next turn")
SINGLE_BATTLE_TEST("Cud Chew will activate Oran Berry effect again on the next turn")
{
GIVEN {
ASSUME(gItemsInfo[ITEM_ORAN_BERRY].holdEffect == HOLD_EFFECT_RESTORE_HP);
Expand Down
54 changes: 0 additions & 54 deletions test/battle/move_effect/burn_up.c

This file was deleted.

54 changes: 0 additions & 54 deletions test/battle/move_effect/double_shock.c

This file was deleted.

112 changes: 112 additions & 0 deletions test/battle/move_effect/fail_if_not_arg_type.c
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!");
}
}
34 changes: 0 additions & 34 deletions test/battle/move_effect/hex.c

This file was deleted.

117 changes: 0 additions & 117 deletions test/battle/move_effect/hit_set_entry_hazardss.c

This file was deleted.

File renamed without changes.
4 changes: 4 additions & 0 deletions test/battle/move_effect/spit_up.c
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
Loading
Loading