pokeemerald/test/ability_insomnia.c
2023-02-26 18:43:15 -03:00

60 lines
1.7 KiB
C

#include "global.h"
#include "test_battle.h"
SINGLE_BATTLE_TEST("Insomnia prevents sleep")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_SPORE].effect == EFFECT_SLEEP);
PLAYER(SPECIES_DROWZEE) { Ability(ABILITY_INSOMNIA); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponent, MOVE_SPORE); }
} SCENE {
ABILITY_POPUP(player, ABILITY_INSOMNIA);
NONE_OF {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPORE, opponent);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player);
STATUS_ICON(player, sleep: TRUE);
}
}
}
SINGLE_BATTLE_TEST("Insomnia prevents yawn")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_YAWN].effect == EFFECT_YAWN);
PLAYER(SPECIES_DROWZEE) { Ability(ABILITY_INSOMNIA); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponent, MOVE_SPORE); }
TURN { }
TURN { }
} SCENE {
ABILITY_POPUP(player, ABILITY_INSOMNIA);
NONE_OF {
ANIMATION(ANIM_TYPE_MOVE, MOVE_YAWN, opponent);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player);
STATUS_ICON(player, sleep: TRUE);
}
}
}
SINGLE_BATTLE_TEST("Insomnia prevents rest")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_REST].effect == EFFECT_REST);
PLAYER(SPECIES_DROWZEE) { Ability(ABILITY_INSOMNIA); HP(1); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_REST); }
} SCENE {
ABILITY_POPUP(player, ABILITY_INSOMNIA);
NONE_OF {
ANIMATION(ANIM_TYPE_MOVE, MOVE_REST, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player);
STATUS_ICON(player, sleep: TRUE);
HP_BAR(player);
}
}
}