mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Infiltrator affects mist safeguard
This commit is contained in:
parent
d529ac3b60
commit
738d92e39d
@ -1863,4 +1863,10 @@
|
||||
jumpifability BS_TARGET, ABILITY_LEAF_GUARD, \jumpptr
|
||||
1:
|
||||
.endm
|
||||
|
||||
.macro jumpifsafeguard jumpptr:req
|
||||
jumpifability BS_ATTACKER, ABILITY_INFILTRATOR, 1f
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, \jumpptr
|
||||
1:
|
||||
.endm
|
||||
|
||||
|
@ -907,7 +907,7 @@ BattleScript_EffectPsychoShift:
|
||||
goto BattleScript_ButItFailed
|
||||
BattleScript_EffectPsychoShiftCanWork:
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
trypsychoshift BattleScript_MoveEnd
|
||||
attackanimation
|
||||
waitanimation
|
||||
@ -2132,7 +2132,7 @@ BattleScript_EffectSleep::
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
attackanimation
|
||||
waitanimation
|
||||
setmoveeffect MOVE_EFFECT_SLEEP
|
||||
@ -2653,7 +2653,7 @@ BattleScript_EffectToxic::
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
trypoisontype BS_ATTACKER, BS_TARGET, BattleScript_NotAffected
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
attackanimation
|
||||
waitanimation
|
||||
setmoveeffect MOVE_EFFECT_TOXIC
|
||||
@ -2856,7 +2856,7 @@ BattleScript_EffectConfuse:
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_AlreadyConfused
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
attackanimation
|
||||
waitanimation
|
||||
setmoveeffect MOVE_EFFECT_CONFUSION
|
||||
@ -2974,7 +2974,7 @@ BattleScript_EffectPoison::
|
||||
trypoisontype BS_ATTACKER, BS_TARGET, BattleScript_NotAffected
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
attackanimation
|
||||
waitanimation
|
||||
setmoveeffect MOVE_EFFECT_POISON
|
||||
@ -2999,7 +2999,7 @@ BattleScript_EffectParalyze:
|
||||
jumpiftype BS_TARGET, TYPE_ELECTRIC, BattleScript_NotAffected
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
|
||||
attackanimation
|
||||
waitanimation
|
||||
@ -3707,7 +3707,7 @@ BattleScript_EffectSwagger::
|
||||
waitmessage 0x40
|
||||
BattleScript_SwaggerTryConfuse:
|
||||
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
setmoveeffect MOVE_EFFECT_CONFUSION
|
||||
seteffectprimary
|
||||
goto BattleScript_MoveEnd
|
||||
@ -4244,7 +4244,7 @@ BattleScript_EffectFlatter::
|
||||
waitmessage 0x40
|
||||
BattleScript_FlatterTryConfuse::
|
||||
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
setmoveeffect MOVE_EFFECT_CONFUSION
|
||||
seteffectprimary
|
||||
goto BattleScript_MoveEnd
|
||||
@ -4263,7 +4263,7 @@ BattleScript_EffectWillOWisp::
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
attackanimation
|
||||
waitanimation
|
||||
setmoveeffect MOVE_EFFECT_BURN
|
||||
@ -4536,7 +4536,7 @@ BattleScript_EffectYawn::
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||
jumpifcantmakeasleep BattleScript_ButItFailed
|
||||
setyawn BattleScript_ButItFailed
|
||||
@ -4665,7 +4665,7 @@ BattleScript_TeeterDanceLoop::
|
||||
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_TeeterDanceAlreadyConfused
|
||||
jumpifhasnohp BS_TARGET, BattleScript_TeeterDanceLoopIncrement
|
||||
accuracycheck BattleScript_TeeterDanceMissed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_TeeterDanceSafeguardProtected
|
||||
jumpifsafeguard BattleScript_TeeterDanceSafeguardProtected
|
||||
attackanimation
|
||||
waitanimation
|
||||
seteffectprimary
|
||||
|
@ -8539,7 +8539,8 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
|
||||
if (statValue <= -1) // Stat decrease.
|
||||
{
|
||||
if (gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].mistTimer
|
||||
&& !certain && gCurrentMove != MOVE_CURSE)
|
||||
&& !certain && gCurrentMove != MOVE_CURSE
|
||||
&& !(gActiveBattler == gBattlerTarget && GetBattlerAbility(gBattlerAttacker) == ABILITY_INFILTRATOR))
|
||||
{
|
||||
if (flags == STAT_BUFF_ALLOW_PTR)
|
||||
{
|
||||
@ -8564,6 +8565,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
|
||||
return STAT_CHANGE_DIDNT_WORK;
|
||||
}
|
||||
else if ((GetBattlerAbility(gActiveBattler) == ABILITY_CLEAR_BODY
|
||||
|| GetBattlerAbility(gActiveBattler) == ABILITY_FULL_METAL_BODY
|
||||
|| GetBattlerAbility(gActiveBattler) == ABILITY_WHITE_SMOKE)
|
||||
&& !certain && gCurrentMove != MOVE_CURSE)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user