mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Fix infinite loop
This commit is contained in:
parent
7287560521
commit
01f563cb5e
@ -8022,41 +8022,41 @@ BattleScript_HangedOnMsgRet:
|
||||
return
|
||||
|
||||
BattleScript_BerryConfuseHealEnd2::
|
||||
jumpifability BS_ATTACKER, ABILITY_RIPEN, BattleScript_BerryConfuseHealEnd2_AbilityPopup
|
||||
jumpifability BS_SCRIPTING, ABILITY_RIPEN, BattleScript_BerryConfuseHealEnd2_AbilityPopup
|
||||
goto BattleScript_BerryConfuseHealEnd2_Anim
|
||||
BattleScript_BerryConfuseHealEnd2_AbilityPopup:
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_BerryConfuseHealEnd2_Anim:
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
printstring STRINGID_FORXCOMMAYZ
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmoveeffect MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER
|
||||
seteffectprimary
|
||||
removeitem BS_ATTACKER
|
||||
removeitem BS_SCRIPTING
|
||||
end2
|
||||
|
||||
BattleScript_BerryConfuseHealRet::
|
||||
jumpifability BS_ATTACKER, ABILITY_RIPEN, BattleScript_BerryConfuseHealRet_AbilityPopup
|
||||
jumpifability BS_SCRIPTING, ABILITY_RIPEN, BattleScript_BerryConfuseHealRet_AbilityPopup
|
||||
goto BattleScript_BerryConfuseHealRet_Anim
|
||||
BattleScript_BerryConfuseHealRet_AbilityPopup:
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_BerryConfuseHealRet_Anim:
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
printstring STRINGID_FORXCOMMAYZ
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmoveeffect MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER
|
||||
setmoveeffect MOVE_EFFECT_CONFUSION | MOVE_EFFECT_CERTAIN
|
||||
seteffectprimary
|
||||
removeitem BS_ATTACKER
|
||||
removeitem BS_TARGET
|
||||
return
|
||||
|
||||
BattleScript_BerryStatRaiseEnd2::
|
||||
|
@ -5574,7 +5574,7 @@ static u8 HealConfuseBerry(u32 battlerId, u32 itemId, u8 flavorId, bool32 end2)
|
||||
gBattleMoveDamage *= 2;
|
||||
gBattlerAbility = battlerId;
|
||||
}
|
||||
|
||||
gBattleScripting.battler = battlerId;
|
||||
if (end2)
|
||||
{
|
||||
if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, flavorId) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user