Fixes Howl activating if partner has Soundproof (#3593)
This commit is contained in:
commit
c0bc6979c7
2 changed files with 41 additions and 0 deletions
|
@ -596,6 +596,7 @@ BattleScript_EffectAttackUpUserAlly_TryAlly:
|
|||
BattleScript_EffectAttackUpUserAlly_End:
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_EffectAttackUpUserAlly_TryAlly_:
|
||||
jumpifability BS_ATTACKER_PARTNER, ABILITY_SOUNDPROOF, BattleScript_EffectAttackUpUserAlly_TryAllyBlocked
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectAttackUpUserAlly_End
|
||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_EffectAttackUpUserAlly_AllyAnim
|
||||
|
@ -610,6 +611,13 @@ BattleScript_EffectAttackUpUserAlly_AllyAnim:
|
|||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_EffectAttackUpUserAlly_End
|
||||
|
||||
BattleScript_EffectAttackUpUserAlly_TryAllyBlocked:
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
call BattleScript_AbilityPopUpTarget
|
||||
printstring STRINGID_PKMNSXBLOCKSY2
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectTeatime::
|
||||
attackcanceler
|
||||
attackstring
|
||||
|
|
|
@ -63,3 +63,36 @@ DOUBLE_BATTLE_TEST("Howl raises user's and partner's Attack", s16 damageLeft, s1
|
|||
EXPECT_MUL_EQ(results[0].damageRight, Q_4_12(1.5), results[1].damageRight);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Howl does not work on partner if it has Soundproof")
|
||||
{
|
||||
s16 damage[2];
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(15); }
|
||||
PLAYER(SPECIES_VOLTORB) { Speed(10); Ability(ABILITY_SOUNDPROOF); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(5); }
|
||||
OPPONENT(SPECIES_WYNAUT) { Speed(1); }
|
||||
} WHEN {
|
||||
TURN { MOVE(playerRight, MOVE_TACKLE, target: opponentLeft); }
|
||||
TURN { MOVE(playerLeft, MOVE_HOWL); MOVE(playerRight, MOVE_TACKLE, target: opponentLeft); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerRight);
|
||||
HP_BAR(opponentLeft, captureDamage: &damage[0]);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_HOWL, playerLeft);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
||||
MESSAGE("Wobbuffet's Attack rose!");
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
|
||||
MESSAGE("Wynaut's Attack rose!");
|
||||
}
|
||||
ABILITY_POPUP(playerRight, ABILITY_SOUNDPROOF);
|
||||
MESSAGE("Voltorb's Soundproof blocks Howl!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerRight);
|
||||
HP_BAR(opponentLeft, captureDamage: &damage[1]);
|
||||
} THEN {
|
||||
EXPECT_EQ(damage[0], damage[1]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue