mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
dont overwrite gbattlerAttacker in TryChangeBattleTerrain, update BattleScript_ActivateTerrainAbilities loop iterator
This commit is contained in:
parent
86144c6a53
commit
5a740c7461
@ -8803,14 +8803,14 @@ BattleScript_ActivateSwitchInAbilities_Increment:
|
||||
return
|
||||
|
||||
BattleScript_ActivateTerrainAbilities:
|
||||
copybyte sBATTLER, gBattlerAttacker
|
||||
setbyte gBattlerAttacker, 0
|
||||
savetarget
|
||||
setbyte gBattlerTarget, 0
|
||||
BattleScript_ActivateTerrainAbilities_Loop:
|
||||
activateterrainchangeabilities BS_ATTACKER
|
||||
BattleScript_ActivateTerrainAbilities_Increment:
|
||||
addbyte gBattlerAttacker, 1
|
||||
jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop
|
||||
copybyte gBattlerAttacker, sBATTLER
|
||||
addbyte gBattlerTarget, 1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop
|
||||
restoretarget
|
||||
return
|
||||
|
||||
BattleScript_ElectricSurgeActivates::
|
||||
|
@ -4205,7 +4205,7 @@ static bool32 TryChangeBattleTerrain(u32 battler, u32 statusFlag, u8 *timer)
|
||||
else
|
||||
*timer = 5;
|
||||
|
||||
gBattlerAttacker = gBattleScripting.battler = battler;
|
||||
gBattleScripting.battler = battler;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user