mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
syntax fixes. add B_PRANKSTER_DARK_TYPES check to perish song
This commit is contained in:
parent
faa963fd04
commit
32d19a9b19
@ -8153,8 +8153,8 @@ BattleScript_EjectPackActivates::
|
||||
BattleScript_DarkTypePreventsPrankster::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause 0x20
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
goto BattleScript_MoveEnd
|
||||
|
@ -5046,7 +5046,7 @@ static void Cmd_moveend(void)
|
||||
MoveValuesCleanUp();
|
||||
gBattleScripting.moveEffect = gBattleScripting.savedMoveEffect;
|
||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||
gBattleStruct->atkCancellerTracker = 0; // run all cancellers on next target
|
||||
gBattleStruct->atkCancellerTracker = 0; // Run all cancellers on next target
|
||||
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
||||
return;
|
||||
}
|
||||
@ -10730,7 +10730,11 @@ static void Cmd_trysetperishsong(void)
|
||||
{
|
||||
if (gStatuses3[i] & STATUS3_PERISH_SONG
|
||||
|| gBattleMons[i].ability == ABILITY_SOUNDPROOF
|
||||
|| (i != gBattlerAttacker && GetBattlerAbility(gBattlerAttacker) == ABILITY_PRANKSTER && IS_BATTLER_OF_TYPE(i, TYPE_DARK)))
|
||||
|| (B_PRANKSTER_DARK_TYPES >= GEN_7
|
||||
&& i != gBattlerAttacker
|
||||
&& GetBattlerAbility(gBattlerAttacker) == ABILITY_PRANKSTER
|
||||
&& IS_BATTLER_OF_TYPE(i, TYPE_DARK))
|
||||
)
|
||||
{
|
||||
notAffectedCount++;
|
||||
}
|
||||
|
@ -3424,7 +3424,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
&& GetBattlerAbility(gBattlerTarget) != ABILITY_MAGIC_BOUNCE) // Magic bounce will bounce back prankster'd status move instead of blocking it
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(gBattleMoves[gCurrentMove].target & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)))
|
||||
CancelMultiTurnMoves(gBattlerAttacker); // don't cancel moves that can hit two targets bc one target might not be protected
|
||||
CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected
|
||||
gBattleScripting.battler = gBattlerAbility = gBattlerTarget;
|
||||
gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster;
|
||||
effect = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user