forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Trace tests written by Alex/Rainonline
- Loading branch information
1 parent
f67b535
commit 902a5aa
Showing
1 changed file
with
77 additions
and
0 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,77 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
SINGLE_BATTLE_TEST("Trace copies opponents ability") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_RALTS) { Ability(ABILITY_TRACE); } | ||
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); } | ||
} WHEN { | ||
TURN { } | ||
} SCENE { | ||
ABILITY_POPUP(player, ABILITY_TRACE); | ||
MESSAGE("Ralts TRACED Foe Torchic's Blaze!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Trace copies opponents ability on switch-in") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) | ||
PLAYER(SPECIES_RALTS) { Ability(ABILITY_TRACE); } | ||
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); } | ||
} WHEN { | ||
TURN { SWITCH(player, 1); } | ||
} SCENE { | ||
ABILITY_POPUP(player, ABILITY_TRACE); | ||
MESSAGE("Ralts TRACED Foe Torchic's Blaze!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Trace copies opponents ability on switch-in even if opponent switched in at the same time - 1") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) | ||
PLAYER(SPECIES_RALTS) { Ability(ABILITY_TRACE); } | ||
OPPONENT(SPECIES_TREECKO) { HP(1); } | ||
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_MISTY_EXPLOSION); SEND_OUT(opponent, 1); SEND_OUT(player, 1); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_MISTY_EXPLOSION); | ||
ABILITY_POPUP(player, ABILITY_TRACE); | ||
MESSAGE("Ralts TRACED Foe Torchic's Blaze!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Trace copies opponents ability on switch-in even if opponent switched in at the same time - 2") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) | ||
PLAYER(SPECIES_RALTS) { Ability(ABILITY_TRACE); } | ||
OPPONENT(SPECIES_TREECKO) { HP(1); } | ||
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_VOLT_SWITCH); SEND_OUT(opponent, 1); SEND_OUT(player, 1); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_VOLT_SWITCH); | ||
ABILITY_POPUP(player, ABILITY_TRACE); | ||
MESSAGE("Ralts TRACED Foe Torchic's Blaze!"); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Trace copies opponents ability on switch-in even if opponent switched in at the same time - 3") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); } | ||
PLAYER(SPECIES_RALTS) { Ability(ABILITY_TRACE); } | ||
OPPONENT(SPECIES_TREECKO) { HP(1); } | ||
OPPONENT(SPECIES_TORCHIC) { Ability(ABILITY_BLAZE); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_OVERHEAT); SEND_OUT(opponent, 1); SEND_OUT(player, 1); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT); | ||
ABILITY_POPUP(player, ABILITY_TRACE); | ||
MESSAGE("Ralts TRACED Foe Torchic's Blaze!"); | ||
} | ||
} |