mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
f1b9872bf0
Thank you to SBird for providing mgba-rom-test binaries and Spikes/Toxic Spikes tests! Co-authored-by: sbird <sbird@no.tld>
55 lines
1.8 KiB
C
55 lines
1.8 KiB
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_AFTER_YOU].effect == EFFECT_AFTER_YOU);
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("After You makes the target move after user")
|
|
{
|
|
if (B_RECALC_TURN_AFTER_ACTIONS >= GEN_8) KNOWN_FAILING; // #2615.
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET) { Speed(4); }
|
|
PLAYER(SPECIES_WYNAUT) { Speed(1); }
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(3); }
|
|
OPPONENT(SPECIES_WYNAUT) { Speed(2); }
|
|
} WHEN {
|
|
TURN {
|
|
MOVE(playerLeft, MOVE_AFTER_YOU, target: playerRight);
|
|
MOVE(playerRight, MOVE_CELEBRATE);
|
|
MOVE(opponentLeft, MOVE_CELEBRATE);
|
|
MOVE(opponentRight, MOVE_CELEBRATE);
|
|
}
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_AFTER_YOU, playerLeft);
|
|
MESSAGE("Wynaut took the kind offer!");
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentLeft);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentRight);
|
|
}
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("After You does nothing if the target has already moved")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET) { Speed(4); }
|
|
PLAYER(SPECIES_WYNAUT) { Speed(1); }
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(3); }
|
|
OPPONENT(SPECIES_WYNAUT) { Speed(2); }
|
|
} WHEN {
|
|
TURN {
|
|
MOVE(playerLeft, MOVE_CELEBRATE);
|
|
MOVE(playerRight, MOVE_CELEBRATE);
|
|
MOVE(opponentLeft, MOVE_CELEBRATE);
|
|
MOVE(opponentRight, MOVE_AFTER_YOU, target: opponentLeft);
|
|
}
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerLeft);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentLeft);
|
|
MESSAGE("Foe Wynaut used After You!");
|
|
MESSAGE("But it failed!");
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight);
|
|
}
|
|
}
|