2023-02-03 00:22:02 +01:00
|
|
|
#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);
|
2023-02-26 22:43:15 +01:00
|
|
|
NONE_OF {
|
2023-02-03 00:22:02 +01:00
|
|
|
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); }
|
2023-06-23 11:38:18 +02:00
|
|
|
TURN {}
|
|
|
|
TURN {}
|
2023-02-03 00:22:02 +01:00
|
|
|
} SCENE {
|
|
|
|
ABILITY_POPUP(player, ABILITY_INSOMNIA);
|
2023-02-26 22:43:15 +01:00
|
|
|
NONE_OF {
|
2023-02-03 00:22:02 +01:00
|
|
|
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);
|
2023-02-26 22:43:15 +01:00
|
|
|
NONE_OF {
|
2023-02-03 00:22:02 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_REST, player);
|
|
|
|
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, player);
|
|
|
|
STATUS_ICON(player, sleep: TRUE);
|
|
|
|
HP_BAR(player);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|