Fixed Gigantamax Factor not changing form (#4108)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
parent
ccfebe5e05
commit
b898a65891
3 changed files with 13 additions and 9 deletions
|
@ -527,9 +527,10 @@
|
|||
.byte 0x57
|
||||
.endm
|
||||
|
||||
.macro returntoball battler:req
|
||||
.macro returntoball battler:req, changingForm:req
|
||||
.byte 0x58
|
||||
.byte \battler
|
||||
.byte \changingForm
|
||||
.endm
|
||||
|
||||
.macro handlelearnnewmove learnedMoveInstr:req, nothingToLearnInstr:req, isFirstMove:req
|
||||
|
|
|
@ -184,7 +184,7 @@ BattleScript_MoveSwitchOpenPartyScreen:
|
|||
switchoutabilities BS_ATTACKER
|
||||
waitstate
|
||||
switchhandleorder BS_ATTACKER, 2
|
||||
returntoball BS_ATTACKER
|
||||
returntoball BS_ATTACKER, FALSE
|
||||
getswitchedmondata BS_ATTACKER
|
||||
switchindataupdate BS_ATTACKER
|
||||
hpthresholds BS_ATTACKER
|
||||
|
@ -4487,7 +4487,7 @@ BattleScript_EffectBatonPass::
|
|||
switchoutabilities BS_ATTACKER
|
||||
waitstate
|
||||
switchhandleorder BS_ATTACKER, 2
|
||||
returntoball BS_ATTACKER
|
||||
returntoball BS_ATTACKER, FALSE
|
||||
getswitchedmondata BS_ATTACKER
|
||||
switchindataupdate BS_ATTACKER
|
||||
hpthresholds BS_ATTACKER
|
||||
|
@ -6318,7 +6318,7 @@ BattleScript_RoarSuccessRet:
|
|||
waitanimation
|
||||
BattleScript_RoarSuccessRet_Ret:
|
||||
switchoutabilities BS_TARGET
|
||||
returntoball BS_TARGET
|
||||
returntoball BS_TARGET, FALSE
|
||||
waitstate
|
||||
return
|
||||
|
||||
|
@ -7791,7 +7791,7 @@ BattleScript_EmergencyExitNoPopUp::
|
|||
switchoutabilities BS_TARGET
|
||||
waitstate
|
||||
switchhandleorder BS_TARGET, 2
|
||||
returntoball BS_TARGET
|
||||
returntoball BS_TARGET, FALSE
|
||||
getswitchedmondata BS_TARGET
|
||||
switchindataupdate BS_TARGET
|
||||
hpthresholds BS_TARGET
|
||||
|
@ -9602,7 +9602,7 @@ BattleScript_EjectButtonActivates::
|
|||
switchoutabilities BS_SCRIPTING
|
||||
waitstate
|
||||
switchhandleorder BS_SCRIPTING 0x2
|
||||
returntoball BS_SCRIPTING
|
||||
returntoball BS_SCRIPTING, FALSE
|
||||
getswitchedmondata BS_SCRIPTING
|
||||
switchindataupdate BS_SCRIPTING
|
||||
hpthresholds BS_SCRIPTING
|
||||
|
@ -9988,7 +9988,7 @@ BattleScript_DynamaxBegins::
|
|||
trytrainerslidedynamaxmsg
|
||||
returnatktoball
|
||||
pause B_WAIT_TIME_SHORT
|
||||
returntoball BS_SCRIPTING
|
||||
returntoball BS_SCRIPTING, TRUE
|
||||
switchinanim BS_SCRIPTING, TRUE
|
||||
updatedynamax
|
||||
playanimation BS_SCRIPTING, B_ANIM_DYNAMAX_GROWTH
|
||||
|
|
|
@ -7234,11 +7234,14 @@ static void Cmd_endlinkbattle(void)
|
|||
|
||||
static void Cmd_returntoball(void)
|
||||
{
|
||||
CMD_ARGS(u8 battler);
|
||||
CMD_ARGS(u8 battler, bool8 changingForm);
|
||||
|
||||
u32 battler = GetBattlerForBattleScript(cmd->battler);
|
||||
BtlController_EmitReturnMonToBall(battler, BUFFER_A, TRUE);
|
||||
MarkBattlerForControllerExec(battler);
|
||||
|
||||
// Don't always execute a form change here otherwise we can stomp gigantamax
|
||||
if(!cmd->changingForm)
|
||||
TryBattleFormChange(battler, FORM_CHANGE_BATTLE_SWITCH);
|
||||
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
|
|
Loading…
Reference in a new issue