sovereignx/test/battle/ability/quick_draw.c
Alex be045fdc0c
Fixes Quick Draw (#3724)
* Fixes Quick Draw

* Fixes Custap and rest of Quick Draw

* review applied
2023-12-15 00:03:59 +01:00

32 lines
1 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Quick Draw has a 30% chance of going first")
{
PASSES_RANDOMLY(3, 10, RNG_QUICK_DRAW);
GIVEN {
PLAYER(SPECIES_SLOWBRO_GALARIAN) { Ability(ABILITY_QUICK_DRAW); Speed(1); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(100); }
} WHEN {
TURN { MOVE(player, MOVE_TACKLE); }
} SCENE {
ABILITY_POPUP(player, ABILITY_QUICK_DRAW);
MESSAGE("Slowbro used Tackle!");
MESSAGE("Foe Wobbuffet used Celebrate!");
}
}
SINGLE_BATTLE_TEST("Quick Draw does not activate 70% of the time")
{
PASSES_RANDOMLY(7, 10, RNG_QUICK_DRAW);
GIVEN {
PLAYER(SPECIES_SLOWBRO_GALARIAN) { Ability(ABILITY_QUICK_DRAW); Speed(1); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(100); }
} WHEN {
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_TACKLE); }
} SCENE {
NOT ABILITY_POPUP(player, ABILITY_QUICK_DRAW);
MESSAGE("Foe Wobbuffet used Celebrate!");
MESSAGE("Slowbro used Tackle!");
}
}