37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gItemsInfo[ITEM_KINGS_ROCK].holdEffect == HOLD_EFFECT_FLINCH);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Kings Rock holder will flinch the target 10% of the time")
|
|
{
|
|
PASSES_RANDOMLY(10, 100, RNG_HOLD_EFFECT_FLINCH);
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_KINGS_ROCK); }
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_SCRATCH); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, player);
|
|
MESSAGE("The opposing Wobbuffet flinched and couldn't move!");
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Kings Rock does not increase flinch chance of a move that has the flinch effect")
|
|
{
|
|
PASSES_RANDOMLY(30, 100, RNG_SECONDARY_EFFECT);
|
|
GIVEN {
|
|
ASSUME(MoveHasAdditionalEffect(MOVE_HEADBUTT, MOVE_EFFECT_FLINCH));
|
|
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_KINGS_ROCK); }
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_HEADBUTT); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HEADBUTT, player);
|
|
MESSAGE("The opposing Wobbuffet flinched and couldn't move!");
|
|
}
|
|
}
|