mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
perish song + prankster interaction
This commit is contained in:
parent
85f3982fb9
commit
aeafd9e222
@ -3647,19 +3647,28 @@ BattleScript_EffectPerishSong::
|
||||
waitanimation
|
||||
printstring STRINGID_FAINTINTHREE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setbyte sBATTLER, 0
|
||||
setbyte gBattlerTarget, 0
|
||||
BattleScript_PerishSongLoop::
|
||||
jumpifability BS_SCRIPTING, ABILITY_SOUNDPROOF, BattleScript_PerishSongNotAffected
|
||||
jumpifability BS_TARGET, ABILITY_SOUNDPROOF, BattleScript_PerishSongBlocked
|
||||
jumpifability BS_ATTACKER, ABILITY_PRANKSTER, BattleScript_PerishSongCheckPrankster
|
||||
goto BattleScript_PerishSongLoopIncrement
|
||||
BattleScript_PerishSongCheckPrankster:
|
||||
jumpiftype BS_TARGET, TYPE_DARK, BattleScript_PerishSongNotAffected
|
||||
BattleScript_PerishSongLoopIncrement::
|
||||
addbyte sBATTLER, 1
|
||||
jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_PerishSongLoop
|
||||
addbyte gBattlerTarget, 1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_PerishSongLoop
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PerishSongNotAffected::
|
||||
BattleScript_PerishSongBlocked::
|
||||
printstring STRINGID_PKMNSXBLOCKSY2
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_PerishSongLoopIncrement
|
||||
|
||||
BattleScript_PerishSongNotAffected:
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_PerishSongLoopIncrement
|
||||
|
||||
BattleScript_EffectSandstorm::
|
||||
attackcanceler
|
||||
attackstring
|
||||
|
@ -10605,7 +10605,8 @@ static void Cmd_trysetperishsong(void)
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (gStatuses3[i] & STATUS3_PERISH_SONG
|
||||
|| gBattleMons[i].ability == ABILITY_SOUNDPROOF)
|
||||
|| gBattleMons[i].ability == ABILITY_SOUNDPROOF
|
||||
|| (GetBattlerAbility(gBattlerAttacker) == ABILITY_PRANKSTER && IS_BATTLER_OF_TYPE(i, TYPE_DARK)))
|
||||
{
|
||||
notAffectedCount++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user