2023-02-03 00:22:02 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "test_battle.h"
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Stench has a 10% chance to flinch")
|
|
|
|
{
|
2023-02-20 21:06:01 +01:00
|
|
|
PASSES_RANDOMLY(1, 10, RNG_STENCH);
|
2023-02-03 00:22:02 +01:00
|
|
|
GIVEN {
|
|
|
|
ASSUME(gBattleMoves[MOVE_TACKLE].power > 0);
|
2023-06-23 11:38:18 +02:00
|
|
|
PLAYER(SPECIES_GRIMER) { Ability(ABILITY_STENCH); }
|
2023-02-03 00:22:02 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_CELEBRATE); }
|
|
|
|
} SCENE {
|
|
|
|
MESSAGE("Foe Wobbuffet flinched!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Stench does not stack with King's Rock")
|
|
|
|
{
|
2023-02-20 21:06:01 +01:00
|
|
|
PASSES_RANDOMLY(1, 10, RNG_STENCH);
|
2023-02-03 00:22:02 +01:00
|
|
|
GIVEN {
|
|
|
|
ASSUME(gItems[ITEM_KINGS_ROCK].holdEffect == HOLD_EFFECT_FLINCH);
|
|
|
|
ASSUME(gBattleMoves[MOVE_TACKLE].power > 0);
|
|
|
|
|
2023-06-23 11:38:18 +02:00
|
|
|
PLAYER(SPECIES_GRIMER) { Ability(ABILITY_STENCH); Item(ITEM_KINGS_ROCK); }
|
2023-02-03 00:22:02 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_CELEBRATE); }
|
|
|
|
} SCENE {
|
|
|
|
MESSAGE("Foe Wobbuffet flinched!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Test against interaction with multi hits
|