Updated the implementation

This commit is contained in:
LOuroboros 2023-01-09 15:18:22 -03:00
parent dccceb9689
commit bdcc84f019
3 changed files with 19 additions and 31 deletions

View File

@ -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::

View File

@ -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[];

View File

@ -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},