pokeemerald/test/move_effect_tailwind.c
Martin Griffin f1b9872bf0 Test moves, items, and abilities in battle
Thank you to SBird for providing mgba-rom-test binaries and Spikes/Toxic
Spikes tests!

Co-authored-by: sbird <sbird@no.tld>
2023-02-01 13:53:57 +00:00

56 lines
1.5 KiB
C

#include "global.h"
#include "test_battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_TAILWIND].effect == EFFECT_TAILWIND);
}
SINGLE_BATTLE_TEST("Tailwind applies for 4 turns")
{
GIVEN {
ASSUME(B_TAILWIND_TURNS >= GEN_5);
PLAYER(SPECIES_WOBBUFFET) { Speed(10); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(15); }
} WHEN {
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_TAILWIND); }
TURN {}
TURN {}
TURN {}
TURN {}
} SCENE {
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Wobbuffet used Tailwind!");
MESSAGE("Wobbuffet used Celebrate!");
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Wobbuffet used Celebrate!");
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Wobbuffet used Celebrate!");
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Wobbuffet used Celebrate!");
}
}
DOUBLE_BATTLE_TEST("Tailwind affects partner on first turn")
{
GIVEN {
ASSUME(B_RECALC_TURN_AFTER_ACTIONS);
PLAYER(SPECIES_WOBBUFFET) { Speed(20); }
PLAYER(SPECIES_WYNAUT) { Speed(10); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(15); }
OPPONENT(SPECIES_WYNAUT) { Speed(14); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_TAILWIND); }
} SCENE {
MESSAGE("Wobbuffet used Tailwind!");
MESSAGE("Wynaut used Celebrate!");
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Foe Wynaut used Celebrate!");
}
}