2024-01-20 21:48:34 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-26 18:25:52 +00:00
|
|
|
ASSUME(gItemsInfo[ITEM_EJECT_PACK].holdEffect == HOLD_EFFECT_EJECT_PACK);
|
2024-01-20 21:48:34 +00:00
|
|
|
}
|
|
|
|
|
2024-05-05 10:58:11 +01:00
|
|
|
SINGLE_BATTLE_TEST("Eject Pack does not cause the new Pokémon to lose HP due to it's held Life Orb")
|
2024-01-20 21:48:34 +00:00
|
|
|
{
|
|
|
|
GIVEN {
|
2024-01-26 18:25:52 +00:00
|
|
|
ASSUME(gItemsInfo[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
|
2024-01-20 21:48:34 +00:00
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
|
|
|
|
PLAYER(SPECIES_WYNAUT) { Item(ITEM_LIFE_ORB); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_OVERHEAT); SEND_OUT(player, 1); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
|
|
|
MESSAGE("Wobbuffet is switched out with the Eject Pack!");
|
2024-06-04 00:59:28 +01:00
|
|
|
SEND_IN_MESSAGE("Wynaut");
|
2024-01-20 21:48:34 +00:00
|
|
|
NOT MESSAGE("Wynaut was hurt by its Life Orb!");
|
2024-04-29 12:21:33 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
2024-01-20 21:48:34 +00:00
|
|
|
}
|
|
|
|
}
|
2024-04-14 01:43:16 +01:00
|
|
|
|
2024-05-05 10:58:11 +01:00
|
|
|
SINGLE_BATTLE_TEST("Eject Pack does not activate if there are no Pokémon left to battle")
|
2024-04-14 01:43:16 +01:00
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { HP(0); }
|
|
|
|
OPPONENT(SPECIES_EKANS) { Ability(ABILITY_INTIMIDATE); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
NONE_OF {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
|
|
|
MESSAGE("Wobbuffet is switched out with the Eject Pack!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-04-29 12:21:33 +01:00
|
|
|
|
2024-05-05 10:58:11 +01:00
|
|
|
SINGLE_BATTLE_TEST("Eject Pack is triggered by self-inflicting stat decreases")
|
2024-04-29 12:21:33 +01:00
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(gItemsInfo[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
|
|
|
|
PLAYER(SPECIES_WYNAUT);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
|
|
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_OVERHEAT); SEND_OUT(player, 1); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
|
|
|
MESSAGE("Wobbuffet is switched out with the Eject Pack!");
|
2024-06-04 00:59:28 +01:00
|
|
|
SEND_IN_MESSAGE("Wynaut");
|
2024-04-29 12:21:33 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
}
|
|
|
|
}
|
2024-11-11 19:56:51 +00:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Eject Pack will miss timing to switch out user if Emergency Exit was activated on target")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
|
|
|
|
PLAYER(SPECIES_WYNAUT);
|
|
|
|
OPPONENT(SPECIES_GOLISOPOD) { Ability(ABILITY_EMERGENCY_EXIT); MaxHP(263); HP(133); };
|
|
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_OVERHEAT); SEND_OUT(opponent, 1); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_OVERHEAT, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
2025-01-01 20:41:42 +00:00
|
|
|
NONE_OF {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
|
|
|
MESSAGE("Wobbuffet is switched out with the Eject Pack!");
|
|
|
|
}
|
2024-11-11 19:56:51 +00:00
|
|
|
ABILITY_POPUP(opponent, ABILITY_EMERGENCY_EXIT);
|
|
|
|
} THEN {
|
|
|
|
EXPECT(player->species == SPECIES_WOBBUFFET);
|
|
|
|
EXPECT(opponent->species == SPECIES_WYNAUT);
|
|
|
|
}
|
|
|
|
}
|
2024-12-29 21:24:09 +00:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Eject Pack activates once intimidate mon switches in")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_EKANS) { Ability(ABILITY_INTIMIDATE); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { SWITCH(opponent, 1); SEND_OUT(player, 1); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
|
|
|
MESSAGE("Wobbuffet is switched out with the Eject Pack!");
|
|
|
|
}
|
|
|
|
}
|