diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index c404dc37d..617059d46 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3174,12 +3174,12 @@ BattleScript_EffectSleep:: jumpifuproarwakes BattleScript_CantMakeAsleep jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_InsomniaProtects jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_InsomniaProtects - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed jumpifterrainaffected BS_TARGET, STATUS_FIELD_ELECTRIC_TERRAIN, BattleScript_ElectricTerrainPrevents jumpifterrainaffected BS_TARGET, STATUS_FIELD_MISTY_TERRAIN, BattleScript_MistyTerrainPrevents @@ -3259,15 +3259,15 @@ BattleScript_PastelVeilProtects: orhalfword gMoveResultFlags, MOVE_RESULT_FAILED goto BattleScript_MoveEnd -BattleScript_LeafGuardProtectsRet:: +BattleScript_AbilityProtectsDoesntAffectRet:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp printstring STRINGID_ITDOESNTAFFECT waitmessage B_WAIT_TIME_LONG return -BattleScript_LeafGuardProtects: - call BattleScript_LeafGuardProtectsRet +BattleScript_AbilityProtectsDoesntAffect: + call BattleScript_AbilityProtectsDoesntAffectRet orhalfword gMoveResultFlags, MOVE_RESULT_FAILED goto BattleScript_MoveEnd @@ -3777,12 +3777,12 @@ BattleScript_EffectToxic:: attackstring ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed jumpifstatus BS_TARGET, STATUS1_POISON | STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed @@ -4118,12 +4118,12 @@ BattleScript_EffectPoison:: attackstring ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed jumpifstatus BS_TARGET, STATUS1_POISON, BattleScript_AlreadyPoisoned jumpifstatus BS_TARGET, STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned @@ -4145,11 +4145,11 @@ BattleScript_EffectParalyze: attackstring ppreduce jumpifability BS_TARGET, ABILITY_LIMBER, BattleScript_LimberProtected - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed typecalc BattleScript_BattleScript_EffectParalyzeNoTypeCalc: @@ -5581,11 +5581,11 @@ BattleScript_EffectWillOWisp:: jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents jumpifability BS_TARGET, ABILITY_WATER_BUBBLE, BattleScript_WaterVeilPrevents - jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_AbilityProtectsDoesntAffect + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed jumpifterrainaffected BS_TARGET, STATUS_FIELD_MISTY_TERRAIN, BattleScript_MistyTerrainPrevents accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE @@ -5875,10 +5875,10 @@ BattleScript_EffectYawn:: jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_PrintBattlerAbilityMadeIneffective jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_PrintBattlerAbilityMadeIneffective jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_PrintBattlerAbilityMadeIneffective - jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects + jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_AbilityProtectsDoesntAffect jumpifflowerveil BattleScript_FlowerVeilProtects - jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects - jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects + jumpifleafguardprotected BS_TARGET, BattleScript_AbilityProtectsDoesntAffect + jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect jumpifsubstituteblocks BattleScript_ButItFailed jumpifsafeguard BattleScript_SafeguardProtected accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d1c0a7c77..04092d3b6 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3908,6 +3908,7 @@ static void Cmd_jumpifability(void) gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 4); RecordAbilityBattle(battlerId, gLastUsedAbility); gBattlerAbility = battlerId; + while (1); } else { @@ -8352,9 +8353,14 @@ static void Cmd_various(void) return; case VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED: if (IsShieldsDownProtected(gActiveBattler)) + { + gBattlerAbility = gActiveBattler; gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); + } else + { gBattlescriptCurrInstr += 7; + } return; case VARIOUS_JUMP_IF_NO_HOLD_EFFECT: if (GetBattlerHoldEffect(gActiveBattler, TRUE) != gBattlescriptCurrInstr[3]) @@ -14965,7 +14971,7 @@ static void Cmd_callnative(void) func(); } -// Callnative Funcs +// Callnative Funcs void BS_CalcMetalBurstDmg(void) { u8 sideAttacker = GetBattlerSide(gBattlerAttacker);