water bubble prevents burn

This commit is contained in:
ghoulslash 2021-07-25 07:53:44 -06:00
parent e6a2d2226f
commit fd61770c34
4 changed files with 10 additions and 5 deletions

View File

@ -4331,6 +4331,7 @@ BattleScript_EffectWillOWisp::
jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned
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
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifleafguard BattleScript_LeafGuardProtects

View File

@ -821,7 +821,7 @@ static bool8 DoesAbilityPreventStatus(struct Pokemon *mon, u32 status)
ret = TRUE;
break;
case STATUS1_BURN:
if (ability == ABILITY_WATER_VEIL)
if (ability == ABILITY_WATER_VEIL || ability == ABILITY_WATER_BUBBLE)
ret = TRUE;
break;
case STATUS1_PARALYSIS:

View File

@ -2588,11 +2588,11 @@ void SetMoveEffect(bool32 primary, u32 certain)
statusChanged = TRUE;
break;
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))
{
gLastUsedAbility = ABILITY_WATER_VEIL;
RecordAbilityBattle(gEffectBattler, ABILITY_WATER_VEIL);
gLastUsedAbility = GetBattlerAbility(gEffectBattler);
RecordAbilityBattle(gEffectBattler, GetBattlerAbility(gEffectBattler));
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
@ -2621,6 +2621,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
break;
if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|| GetBattlerAbility(gEffectBattler) == ABILITY_WATER_BUBBLE
|| IsAbilityStatusProtected(gEffectBattler))
break;
if (gBattleMons[gEffectBattler].status1)
@ -8195,7 +8196,8 @@ static void Cmd_various(void)
}
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;
BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));

View File

@ -4863,6 +4863,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
&& TARGET_TURN_DAMAGED
&& !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE)
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_VEIL
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_WATER_BUBBLE
&& !(gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY)
&& !IsAbilityStatusProtected(gBattlerAttacker)
&& (Random() % 3) == 0)
@ -5070,6 +5071,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
}
break;
case ABILITY_WATER_VEIL:
case ABILITY_WATER_BUBBLE:
if (gBattleMons[battler].status1 & STATUS1_BURN)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);