Merge pull request #1732 from ghoulslash/perish_song

Fix Soundproof cancelling out user's Perish Song
This commit is contained in:
BuffelSaft 2021-10-10 22:55:20 +13:00 committed by GitHub
commit 8a7e6379b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -3902,6 +3902,7 @@ BattleScript_PerishSongLoopIncrement::
goto BattleScript_MoveEnd
BattleScript_PerishSongBlocked::
copybyte sBATTLER, gBattlerTarget
printstring STRINGID_PKMNSXBLOCKSY2
waitmessage B_WAIT_TIME_LONG
goto BattleScript_PerishSongLoopIncrement

View File

@ -4527,7 +4527,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
}
break;
case ABILITYEFFECT_MOVES_BLOCK: // 2
if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND)
if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND && !(gBattleMoves[move].target & MOVE_TARGET_USER))
|| (gLastUsedAbility == ABILITY_BULLETPROOF && gBattleMoves[move].flags & FLAG_BALLISTIC))
{
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)