diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 10ea4e625..de1aa536a 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7822,27 +7822,18 @@ BattleScript_TargetFormChangeWithString:: waitmessage B_WAIT_TIME_LONG return -BattleScript_TargetFormChangeWithStringEnd3:: - call BattleScript_TargetFormChangeWithString - end3 - -BattleScript_AttackerFormChangeWithString:: +BattleScript_BattlerFormChangeWithStringEnd3:: pause 5 - copybyte gBattlerAbility, gBattlerAttacker call BattleScript_AbilityPopUp printstring STRINGID_EMPTYSTRING3 waitmessage 1 - handleformchange BS_ATTACKER, 0 - handleformchange BS_ATTACKER, 1 - playanimation BS_ATTACKER, B_ANIM_FORM_CHANGE, NULL + handleformchange BS_SCRIPTING, 0 + handleformchange BS_SCRIPTING, 1 + playanimation BS_SCRIPTING, B_ANIM_FORM_CHANGE, NULL waitanimation - handleformchange BS_ATTACKER, 2 + handleformchange BS_SCRIPTING, 2 printstring STRINGID_PKMNTRANSFORMED waitmessage B_WAIT_TIME_LONG - return - -BattleScript_AttackerFormChangeWithStringEnd3:: - call BattleScript_AttackerFormChangeWithString end3 BattleScript_IllusionOff:: diff --git a/include/battle_scripts.h b/include/battle_scripts.h index aaa9434ca..8acf6e8ef 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -450,10 +450,7 @@ extern const u8 BattleScript_ToxicDebrisActivates[]; extern const u8 BattleScript_EarthEaterActivates[]; extern const u8 BattleScript_MimicryActivates_End3[]; extern const u8 BattleScript_IceFaceNullsDamage[]; -extern const u8 BattleScript_TargetFormChangeWithString[]; -extern const u8 BattleScript_TargetFormChangeWithStringEnd3[]; -extern const u8 BattleScript_AttackerFormChangeWithString[]; -extern const u8 BattleScript_AttackerFormChangeWithStringEnd3[]; +extern const u8 BattleScript_BattlerFormChangeWithStringEnd3[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_util.c b/src/battle_util.c index 61bfe300a..b9b57f4eb 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5108,19 +5108,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; - case ABILITY_ICE_FACE: - if (IsBattlerWeatherAffected(battler, B_WEATHER_HAIL) - && gBattleMons[battler].species == SPECIES_EISCUE_NOICE_FACE - && !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) - && gBattleStruct->allowedToChangeFormInWeather[gBattlerPartyIndexes[battler]][GetBattlerSide(battler)]) - { - gBattleStruct->allowedToChangeFormInWeather[gBattlerPartyIndexes[battler]][GetBattlerSide(battler)] = FALSE; - gBattleMons[battler].species = SPECIES_EISCUE; - gBattleScripting.battler = battler; // For STRINGID_PKMNTRANSFORMED - BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeWithStringEnd3); - effect++; - } - break; } } break; @@ -6194,6 +6181,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move *(&gBattleStruct->formToChangeInto) = effect - 1; } break; + case ABILITY_ICE_FACE: + if (IsBattlerWeatherAffected(battler, B_WEATHER_HAIL) + && gBattleMons[battler].species == SPECIES_EISCUE_NOICE_FACE + && !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) + && gBattleStruct->allowedToChangeFormInWeather[gBattlerPartyIndexes[battler]][GetBattlerSide(battler)]) + { + gBattleStruct->allowedToChangeFormInWeather[gBattlerPartyIndexes[battler]][GetBattlerSide(battler)] = FALSE; + gBattleMons[battler].species = SPECIES_EISCUE; + BattleScriptPushCursorAndCallback(BattleScript_BattlerFormChangeWithStringEnd3); + effect++; + } + break; case ABILITY_PROTOSYNTHESIS: if (!gSpecialStatuses[battler].weatherAbilityDone && IsBattlerWeatherAffected(battler, B_WEATHER_SUN)) { @@ -10126,6 +10125,7 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut) static const u16 species[][3] = { // Changed Form ID Default Form ID Should change on switch + {SPECIES_EISCUE_NOICE_FACE, SPECIES_EISCUE, TRUE}, {SPECIES_MIMIKYU_BUSTED, SPECIES_MIMIKYU, FALSE}, {SPECIES_GRENINJA_ASH, SPECIES_GRENINJA_BATTLE_BOND, FALSE}, {SPECIES_MELOETTA_PIROUETTE, SPECIES_MELOETTA, FALSE},