mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
water bubble prevents burn
This commit is contained in:
parent
e6a2d2226f
commit
fd61770c34
@ -4331,6 +4331,7 @@ BattleScript_EffectWillOWisp::
|
|||||||
jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned
|
jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned
|
||||||
jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected
|
jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected
|
||||||
jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents
|
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_COMATOSE, BattleScript_LeafGuardProtects
|
||||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||||
jumpifleafguard BattleScript_LeafGuardProtects
|
jumpifleafguard BattleScript_LeafGuardProtects
|
||||||
|
@ -821,7 +821,7 @@ static bool8 DoesAbilityPreventStatus(struct Pokemon *mon, u32 status)
|
|||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_BURN:
|
case STATUS1_BURN:
|
||||||
if (ability == ABILITY_WATER_VEIL)
|
if (ability == ABILITY_WATER_VEIL || ability == ABILITY_WATER_BUBBLE)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_PARALYSIS:
|
case STATUS1_PARALYSIS:
|
||||||
|
@ -2588,11 +2588,11 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||||||
statusChanged = TRUE;
|
statusChanged = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_BURN:
|
case STATUS1_BURN:
|
||||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL
|
if ((GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL || GetBattlerAbility(gEffectBattler) == ABILITY_WATER_BUBBLE)
|
||||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||||
{
|
{
|
||||||
gLastUsedAbility = ABILITY_WATER_VEIL;
|
gLastUsedAbility = GetBattlerAbility(gEffectBattler);
|
||||||
RecordAbilityBattle(gEffectBattler, ABILITY_WATER_VEIL);
|
RecordAbilityBattle(gEffectBattler, GetBattlerAbility(gEffectBattler));
|
||||||
|
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
|
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
|
||||||
@ -2621,6 +2621,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||||||
break;
|
break;
|
||||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL
|
if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL
|
||||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||||
|
|| GetBattlerAbility(gEffectBattler) == ABILITY_WATER_BUBBLE
|
||||||
|| IsAbilityStatusProtected(gEffectBattler))
|
|| IsAbilityStatusProtected(gEffectBattler))
|
||||||
break;
|
break;
|
||||||
if (gBattleMons[gEffectBattler].status1)
|
if (gBattleMons[gEffectBattler].status1)
|
||||||
@ -8195,7 +8196,8 @@ static void Cmd_various(void)
|
|||||||
}
|
}
|
||||||
else if (gBattleMons[gBattlerAttacker].status1 & STATUS1_BURN)
|
else if (gBattleMons[gBattlerAttacker].status1 & STATUS1_BURN)
|
||||||
{
|
{
|
||||||
if (GetBattlerAbility(gBattlerTarget) == ABILITY_WATER_VEIL)
|
if (GetBattlerAbility(gBattlerTarget) == ABILITY_WATER_VEIL
|
||||||
|
|| GetBattlerAbility(gBattlerTarget) == ABILITY_WATER_BUBBLE)
|
||||||
{
|
{
|
||||||
gBattlerAbility = gBattlerTarget;
|
gBattlerAbility = gBattlerTarget;
|
||||||
BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));
|
BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));
|
||||||
|
@ -4863,6 +4863,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& TARGET_TURN_DAMAGED
|
&& TARGET_TURN_DAMAGED
|
||||||
&& !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE)
|
&& !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE)
|
||||||
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_VEIL
|
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_VEIL
|
||||||
|
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_BUBBLE
|
||||||
&& !(gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY)
|
&& !(gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY)
|
||||||
&& !IsAbilityStatusProtected(gBattlerAttacker)
|
&& !IsAbilityStatusProtected(gBattlerAttacker)
|
||||||
&& (Random() % 3) == 0)
|
&& (Random() % 3) == 0)
|
||||||
@ -5070,6 +5071,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITY_WATER_VEIL:
|
case ABILITY_WATER_VEIL:
|
||||||
|
case ABILITY_WATER_BUBBLE:
|
||||||
if (gBattleMons[battler].status1 & STATUS1_BURN)
|
if (gBattleMons[battler].status1 & STATUS1_BURN)
|
||||||
{
|
{
|
||||||
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);
|
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user