Added last CannotUseItemsInBattle tests (#3789)
* Added missing CannotUseItemsInBattle tests * Removed individual assumptions for the EFFECT_ITEM_ESCAPE tests and added a single global one * Added assumption for the move-related EFFECT_ITEM_ESCAPE test * Moved the Mean Look assumption for consistency with other tests and to be extra safe
This commit is contained in:
parent
cd0b4db09b
commit
96cb4d3823
4 changed files with 61 additions and 0 deletions
50
test/battle/item_effect/escape.c
Normal file
50
test/battle/item_effect/escape.c
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "test/battle.h"
|
||||||
|
|
||||||
|
ASSUMPTIONS
|
||||||
|
{
|
||||||
|
ASSUME(gItems[ITEM_POKE_TOY].battleUsage == EFFECT_ITEM_ESCAPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
MESSAGE("{PLAY_SE SE_FLEE}Got away safely!\p");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle even if a move forbid them to")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
ASSUME(gBattleMoves[MOVE_MEAN_LOOK].effect == EFFECT_MEAN_LOOK);
|
||||||
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(opponent, MOVE_MEAN_LOOK); }
|
||||||
|
TURN { USE_ITEM(player, ITEM_POKE_TOY); }
|
||||||
|
} SCENE {
|
||||||
|
// Turn 1
|
||||||
|
MESSAGE("Wild Wobbuffet used Mean Look!");
|
||||||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_MEAN_LOOK, opponent);
|
||||||
|
MESSAGE("Wobbuffet can't escape now!");
|
||||||
|
// Turn 2
|
||||||
|
MESSAGE("{PLAY_SE SE_FLEE}Got away safely!\p");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
MESSAGE("{PLAY_SE SE_FLEE}Got away safely!\p");
|
||||||
|
}
|
||||||
|
}
|
|
@ -64,3 +64,5 @@ SINGLE_BATTLE_TEST("Max Elixir restores the PP of all of a battler's moves fully
|
||||||
EXPECT_EQ(player->pp[3], 40);
|
EXPECT_EQ(player->pp[3], 40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TO_DO_BATTLE_TEST("Ether won't work if the selected move has all its PP")
|
||||||
|
|
|
@ -72,3 +72,5 @@ SINGLE_BATTLE_TEST("Max Honey restores a fainted battler's HP fully")
|
||||||
EXPECT_EQ(player->hp, 200);
|
EXPECT_EQ(player->hp, 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TO_DO_BATTLE_TEST("Revive won't restore a battler's HP if it hasn't fainted")
|
||||||
|
|
7
test/battle/item_effect/throw_ball.c
Normal file
7
test/battle/item_effect/throw_ball.c
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "test/battle.h"
|
||||||
|
|
||||||
|
TO_DO_BATTLE_TEST("Poke Balls can't be thrown when there's 2 opposing wild battlers")
|
||||||
|
TO_DO_BATTLE_TEST("Poke Balls can't be thrown when there's no space in the Pokemon Storage System")
|
||||||
|
TO_DO_BATTLE_TEST("Poke Balls can't be thrown when an opposing wild battler is in a semi-invulnerable state")
|
||||||
|
TO_DO_BATTLE_TEST("Poke Balls can't be thrown when B_FLAG_NO_CATCHING is set")
|
Loading…
Reference in a new issue