sovereignx/test/battle/move_effect/jaw_lock.c
2023-11-25 23:06:51 +09:00

23 lines
666 B
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_JAW_LOCK].additionalEffects[0].moveEffect == MOVE_EFFECT_TRAP_BOTH);
}
SINGLE_BATTLE_TEST("Jaw Lock traps both opponents")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_JAW_LOCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_JAW_LOCK, player);
MESSAGE("Neither Pokémon can run away!");
} THEN { // Can't find good way to test trapping
EXPECT(opponent->status2 & STATUS2_ESCAPE_PREVENTION);
EXPECT(player->status2 & STATUS2_ESCAPE_PREVENTION);
}
}