04fa3aa725
* Fixes Emergency Exit when hp is restored over tag out range * Update test/battle/ability/emergency_exit.c Co-authored-by: Bassoonian <iasperbassoonian@gmail.com> --------- Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
SINGLE_BATTLE_TEST("Emergency Exit switches out when taking 50% max-hp damage")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_GOLISOPOD) { Ability(ABILITY_EMERGENCY_EXIT); MaxHP(263); HP(262); };
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN {
|
|
MOVE(player, MOVE_SUPER_FANG);
|
|
SEND_OUT(opponent, 1);
|
|
}
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SUPER_FANG, player);
|
|
HP_BAR(opponent);
|
|
ABILITY_POPUP(opponent, ABILITY_EMERGENCY_EXIT);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Emergency Exit switches out when taking 50% max-hp damage after a restore hp hold effect was used")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET)
|
|
OPPONENT(SPECIES_GOLISOPOD) { Ability(ABILITY_EMERGENCY_EXIT); MaxHP(263); HP(262); Item(ITEM_SITRUS_BERRY); };
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN {
|
|
MOVE(player, MOVE_SUPER_FANG);
|
|
}
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SUPER_FANG, player);
|
|
HP_BAR(opponent);
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
NOT ABILITY_POPUP(opponent, ABILITY_EMERGENCY_EXIT);
|
|
}
|
|
}
|