2023-12-21 19:06:12 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-26 18:25:52 +00:00
|
|
|
ASSUME(gItemsInfo[ITEM_POKE_TOY].battleUsage == EFFECT_ITEM_ESCAPE);
|
2023-12-21 19:06:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { USE_ITEM(player, ITEM_POKE_TOY); }
|
|
|
|
} SCENE {
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("{PLAY_SE SE_FLEE}You got away safely!\p");
|
2023-12-21 19:06:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle even if a move forbid them to")
|
|
|
|
{
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_MEAN_LOOK].effect == EFFECT_MEAN_LOOK);
|
2023-12-21 19:06:12 +00:00
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_MEAN_LOOK); }
|
|
|
|
TURN { USE_ITEM(player, ITEM_POKE_TOY); }
|
|
|
|
} SCENE {
|
|
|
|
// Turn 1
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The wild Wobbuffet used Mean Look!");
|
2023-12-21 19:06:12 +00:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_MEAN_LOOK, opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Wobbuffet can no longer escape!");
|
2023-12-21 19:06:12 +00:00
|
|
|
// Turn 2
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("{PLAY_SE SE_FLEE}You got away safely!\p");
|
2023-12-21 19:06:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle even if an ability forbid them to")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_DIGLETT) { Ability(ABILITY_ARENA_TRAP); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { USE_ITEM(player, ITEM_POKE_TOY); }
|
|
|
|
} SCENE {
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("{PLAY_SE SE_FLEE}You got away safely!\p");
|
2023-12-21 19:06:12 +00:00
|
|
|
}
|
|
|
|
}
|