sovereignx/test/battle/move_effect/revival_blessing.c
Martin Griffin a1d2460372 Enable GF move names by default
In contests, even FONT_NARROWER isn't sufficient to prevent clipping in
all cases. e.g. Stomping Tantrum clips. We have decided to accept that
cost to make the rest of the user experience better, but downstream
projects that don't like that trade-off can either a) alter the contest
UI, or b) set B_EXPANDED_MOVE_NAMES to FALSE.
2024-04-25 18:40:37 +01:00

109 lines
3.8 KiB
C

#include "global.h"
#include "test/battle.h"
// Note: Since these tests are recorded battle, they don't test the right battle controller
// behaviors. These have been tested in-game, in double, in multi, and in link battles. AI will always
// revive their first fainted party member in order.
ASSUMPTIONS
{
ASSUME(gMovesInfo[MOVE_REVIVAL_BLESSING].effect == EFFECT_REVIVAL_BLESSING);
}
SINGLE_BATTLE_TEST("Revival Blessing revives a chosen fainted party member for the player")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WOBBUFFET) { HP(0); }
PLAYER(SPECIES_WYNAUT) { HP(0); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_REVIVAL_BLESSING); SEND_OUT(player, 2); }
} SCENE {
MESSAGE("Wobbuffet used Revival Blessing!");
MESSAGE("Wynaut was revived and is ready to fight again!");
}
}
SINGLE_BATTLE_TEST("Revival Blessing revives a fainted party member for an opponent")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_RAICHU);
OPPONENT(SPECIES_PICHU) { HP(0); }
OPPONENT(SPECIES_PIKACHU) { HP(0); }
} WHEN {
TURN { MOVE(opponent, MOVE_REVIVAL_BLESSING); SEND_OUT(opponent, 1); }
} SCENE {
MESSAGE("Foe Raichu used Revival Blessing!");
MESSAGE("Pichu was revived and is ready to fight again!");
}
}
SINGLE_BATTLE_TEST("Revival Blessing fails if no party members are fainted")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_REVIVAL_BLESSING); }
} SCENE {
MESSAGE("Wobbuffet used Revival Blessing!");
MESSAGE("But it failed!");
}
}
// Note: There isn't a good way to test multi battles at the moment, but
// this PASSES in game!
TO_DO_BATTLE_TEST("Revival Blessing cannot revive a partner's party member");
// DOUBLE_BATTLE_TEST("Revival Blessing cannot revive a partner's party member")
// {
// struct BattlePokemon *user;
// gBattleTypeFlags |= BATTLE_TYPE_TWO_OPPONENTS;
// PARAMETRIZE { user = opponentLeft; }
// PARAMETRIZE { user = opponentRight; }
// GIVEN {
// ASSUME((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) != FALSE);
// PLAYER(SPECIES_WOBBUFFET);
// PLAYER(SPECIES_WOBBUFFET);
// OPPONENT(SPECIES_WOBBUFFET);
// OPPONENT(SPECIES_WOBBUFFET);
// OPPONENT(SPECIES_WOBBUFFET);
// OPPONENT(SPECIES_WYNAUT);
// OPPONENT(SPECIES_WYNAUT) { HP(0); }
// OPPONENT(SPECIES_WYNAUT);
// } WHEN {
// TURN { MOVE(user, MOVE_REVIVAL_BLESSING); }
// } SCENE {
// if (user == opponentLeft) {
// MESSAGE("Foe Wobbuffet used Revival Blessing!");
// MESSAGE("But it failed!");
// } else {
// MESSAGE("Foe Wynaut used Revival Blessing!");
// MESSAGE("Wynaut was revived and is ready to fight again!");
// }
// }
// }
// Note: The test runner gets upset about "sending out" a battler on the field,
// but this PASSES in game!
TO_DO_BATTLE_TEST("Revived battlers still lose their turn");
// DOUBLE_BATTLE_TEST("Revived battlers still lose their turn")
// {
// GIVEN {
// PLAYER(SPECIES_WOBBUFFET);
// PLAYER(SPECIES_WYNAUT);
// OPPONENT(SPECIES_WOBBUFFET);
// OPPONENT(SPECIES_WYNAUT) { HP(1); }
// } WHEN {
// TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentRight);
// MOVE(opponentLeft, MOVE_REVIVAL_BLESSING);
// SEND_OUT(opponentLeft, 1); }
// } SCENE {
// MESSAGE("Wobbuffet used Tackle!");
// MESSAGE("Foe Wynaut fainted!");
// MESSAGE("Foe Wobbuffet used Revival Blessing!");
// MESSAGE("Wynaut was revived and is ready to fight again!");
// NOT { MESSAGE("Wynaut used Celebrate!"); }
// }
// }