sovereignx/test/battle/move_effect/uproar.c
ghoulslash 353915ef64
Add various tests, add RNG_RANDOM_TARGET (#5438)
* burn dmg test depends on config

* burn and frostbite tests use B_BURN_DAMAGE config for denom val

* update kings shield test with config

* add RNG_RANDOM_TARGET, use SetRandomTarget in HandleAction_UseMove target acquisition, update uproar test to PASSES_RANDOMLY since test will fail if you target the soundproof voltorb. Slightly faster UproarWakeUpCheck

* add sticky web+contrary test

* add EXPECT_EQ to contrary+sticky web test

* Update src/battle_script_commands.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* Update src/battle_util.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* Update test/battle/move_effect/uproar.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* fix test

* syntax fix

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-10-11 23:47:46 +02:00

29 lines
1.1 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gMovesInfo[MOVE_UPROAR].effect == EFFECT_UPROAR);
}
DOUBLE_BATTLE_TEST("Uproar status causes sleeping pokemon to wake up during an attack")
{
PASSES_RANDOMLY(1, 2, RNG_RANDOM_TARGET); // test fails if we target soundproof mon
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
OPPONENT(SPECIES_VOLTORB) { Ability(ABILITY_SOUNDPROOF); Status1(STATUS1_SLEEP); }
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_UPROAR); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_UPROAR, playerLeft);
HP_BAR(opponentRight);
MESSAGE("Wobbuffet woke up in the UPROAR!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, playerRight);
MESSAGE("Foe Voltorb woke up in the UPROAR!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentLeft);
MESSAGE("Foe Wobbuffet woke up in the UPROAR!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentRight);
}
}