Adds config for Soundproof change during Uproar status (#4174)
This commit is contained in:
parent
b4fa0b1bf0
commit
3598a18703
3 changed files with 31 additions and 2 deletions
|
@ -50,6 +50,7 @@
|
|||
// Turn settings
|
||||
#define B_BINDING_TURNS GEN_LATEST // In Gen5+, binding moves last for 4-5 turns instead of 2-5 turns. (With Grip Claw, 7 and 5 turns respectively.)
|
||||
#define B_UPROAR_TURNS GEN_LATEST // In Gen5+, Uproar lasts for 3 turns instead of 2-5 turns.
|
||||
#define B_UPROAR_IGNORE_SOUNDPROOF GEN_LATEST // In Gen5+, Uproar status ignores Soundproof.
|
||||
#define B_DISABLE_TURNS GEN_LATEST // Disable's turns. See Cmd_disablelastusedattack.
|
||||
#define B_TAILWIND_TURNS GEN_LATEST // In Gen5+, Tailwind lasts 4 turns instead of 3.
|
||||
#define B_SLEEP_TURNS GEN_LATEST // In Gen5+, sleep lasts for 1-3 turns instead of 2-5 turns.
|
||||
|
|
|
@ -2848,7 +2848,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
case STATUS1_SLEEP:
|
||||
// check active uproar
|
||||
if (battlerAbility != ABILITY_SOUNDPROOF)
|
||||
if (battlerAbility != ABILITY_SOUNDPROOF || B_UPROAR_IGNORE_SOUNDPROOF >= GEN_5)
|
||||
{
|
||||
for (i = 0; i < gBattlersCount && !(gBattleMons[i].status2 & STATUS2_UPROAR); i++)
|
||||
;
|
||||
|
@ -11004,7 +11004,7 @@ bool8 UproarWakeUpCheck(u8 battler)
|
|||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (!(gBattleMons[i].status2 & STATUS2_UPROAR) || GetBattlerAbility(battler) == ABILITY_SOUNDPROOF)
|
||||
if (!(gBattleMons[i].status2 & STATUS2_UPROAR) || (GetBattlerAbility(battler) == ABILITY_SOUNDPROOF && B_UPROAR_IGNORE_SOUNDPROOF < GEN_5))
|
||||
continue;
|
||||
|
||||
gBattleScripting.battler = i;
|
||||
|
|
28
test/battle/move_effect/uproar.c
Normal file
28
test/battle/move_effect/uproar.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gBattleMoves[MOVE_UPROAR].effect == EFFECT_UPROAR);
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Uproar status causes sleeping pokemon to wake up during an attack")
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue