Fixed trainerslide arguments (#5344)

Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
hedara90 2024-09-09 10:49:05 +02:00 committed by GitHub
parent fd4860d17e
commit d62b7270c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 24 deletions

View file

@ -507,9 +507,9 @@
.byte \battler
.endm
.macro trainerslidein battler:req
.macro trainerslidein position:req
.byte 0x53
.byte \battler
.byte \position
.endm
.macro playse song:req

View file

@ -5603,13 +5603,13 @@ BattleScript_LocalTrainerBattleWon::
BattleScript_LocalTwoTrainersDefeated::
printstring STRINGID_TWOENEMIESDEFEATED
BattleScript_LocalBattleWonLoseTexts::
trainerslidein BS_ATTACKER
trainerslidein BS_OPPONENT1
waitstate
printstring STRINGID_TRAINER1LOSETEXT
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_LocalBattleWonReward
trainerslideout B_POSITION_OPPONENT_LEFT
trainerslideout BS_OPPONENT1
waitstate
trainerslidein BS_FAINTED
trainerslidein BS_OPPONENT2
waitstate
printstring STRINGID_TRAINER2LOSETEXT
BattleScript_LocalBattleWonReward::
@ -5661,15 +5661,15 @@ BattleScript_LocalBattleLostPrintTrainersWinText::
waitstate
returnopponentmon2toball BS_ATTACKER
waitstate
trainerslidein BS_ATTACKER
trainerslidein BS_OPPONENT1
waitstate
printstring STRINGID_TRAINER1WINTEXT
jumpifbattletype BATTLE_TYPE_TOWER_LINK_MULTI, BattleScript_LocalBattleLostDoTrainer2WinText
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_LocalBattleLostEnd_
BattleScript_LocalBattleLostDoTrainer2WinText::
trainerslideout B_POSITION_OPPONENT_LEFT
trainerslideout BS_OPPONENT1
waitstate
trainerslidein BS_FAINTED
trainerslidein BS_OPPONENT2
waitstate
printstring STRINGID_TRAINER2WINTEXT
BattleScript_LocalBattleLostEnd_::
@ -5680,12 +5680,12 @@ BattleScript_FrontierLinkBattleLost::
waitstate
returnopponentmon2toball BS_ATTACKER
waitstate
trainerslidein BS_ATTACKER
trainerslidein BS_OPPONENT1
waitstate
printstring STRINGID_TRAINER1WINTEXT
trainerslideout B_POSITION_OPPONENT_LEFT
trainerslideout BS_OPPONENT1
waitstate
trainerslidein BS_FAINTED
trainerslidein BS_OPPONENT2
waitstate
printstring STRINGID_TRAINER2WINTEXT
jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_FrontierLinkBattleLostEnd
@ -5708,12 +5708,12 @@ BattleScript_TowerLinkBattleWon::
playtrainerdefeatbgm BS_ATTACKER
printstring STRINGID_BATTLEEND
waitmessage B_WAIT_TIME_LONG
trainerslidein BS_ATTACKER
trainerslidein BS_OPPONENT1
waitstate
printstring STRINGID_TRAINER1LOSETEXT
trainerslideout B_POSITION_OPPONENT_LEFT
trainerslideout BS_OPPONENT1
waitstate
trainerslidein BS_FAINTED
trainerslidein BS_OPPONENT2
waitstate
printstring STRINGID_TRAINER2LOSETEXT
jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_TowerLinkBattleWonEnd
@ -5730,13 +5730,13 @@ BattleScript_FrontierTrainerBattleWon::
BattleScript_FrontierTrainerBattleWon_TwoDefeated:
printstring STRINGID_TWOENEMIESDEFEATED
BattleScript_FrontierTrainerBattleWon_LoseTexts:
trainerslidein BS_ATTACKER
trainerslidein BS_OPPONENT1
waitstate
printstring STRINGID_TRAINER1LOSETEXT
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_TryPickUpItems
trainerslideout B_POSITION_OPPONENT_LEFT
trainerslideout BS_OPPONENT1
waitstate
trainerslidein BS_FAINTED
trainerslidein BS_OPPONENT2
waitstate
printstring STRINGID_TRAINER2LOSETEXT
BattleScript_TryPickUpItems:

View file

@ -238,7 +238,7 @@ BattleScript_ActionWallyThrow:
waitmessage B_WAIT_TIME_LONG
returnatktoball
waitstate
trainerslidein BS_TARGET
trainerslidein BS_PLAYER1
waitstate
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage B_WAIT_TIME_LONG
@ -246,10 +246,10 @@ BattleScript_ActionWallyThrow:
BattleScript_TrainerASlideMsgRet::
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein B_POSITION_OPPONENT_LEFT
trainerslidein BS_OPPONENT1
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout B_POSITION_OPPONENT_LEFT
trainerslideout BS_OPPONENT1
waitstate
handletrainerslidemsg BS_SCRIPTING, 2
return
@ -260,10 +260,10 @@ BattleScript_TrainerASlideMsgEnd2::
BattleScript_TrainerBSlideMsgRet::
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein B_POSITION_OPPONENT_RIGHT
trainerslidein BS_OPPONENT2
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout B_POSITION_OPPONENT_RIGHT
trainerslideout BS_OPPONENT2
waitstate
handletrainerslidemsg BS_SCRIPTING, 2
return

View file

@ -7439,9 +7439,9 @@ static void Cmd_switchineffects(void)
static void Cmd_trainerslidein(void)
{
CMD_ARGS(u8 battler);
CMD_ARGS(u8 position);
u32 battler = GetBattlerForBattleScript(cmd->battler);
u32 battler = GetBattlerForBattleScript(cmd->position);
BtlController_EmitTrainerSlide(battler, BUFFER_A);
MarkBattlerForControllerExec(battler);