Fix partner palette problem (#4736)
This commit is contained in:
parent
0fda9d6cd6
commit
d6422da284
6 changed files with 16 additions and 21 deletions
|
@ -98,7 +98,7 @@
|
||||||
waitstate
|
waitstate
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro multi_do type:req, partnerId:req, partnerPicId:req
|
.macro multi_do type:req, partnerId:req
|
||||||
special ReducePlayerPartyToSelectedMons
|
special ReducePlayerPartyToSelectedMons
|
||||||
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_DATA
|
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_DATA
|
||||||
setvar VAR_0x8005, FRONTIER_DATA_SELECTED_MON_ORDER
|
setvar VAR_0x8005, FRONTIER_DATA_SELECTED_MON_ORDER
|
||||||
|
@ -106,7 +106,6 @@
|
||||||
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
||||||
setvar VAR_0x8005, \type | MULTI_BATTLE_CHOOSE_MONS
|
setvar VAR_0x8005, \type | MULTI_BATTLE_CHOOSE_MONS
|
||||||
setvar VAR_0x8006, \partnerId
|
setvar VAR_0x8006, \partnerId
|
||||||
setvar VAR_0x8007, \partnerPicId
|
|
||||||
special DoSpecialTrainerBattle
|
special DoSpecialTrainerBattle
|
||||||
waitstate
|
waitstate
|
||||||
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SAVE_PARTY
|
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SAVE_PARTY
|
||||||
|
@ -114,30 +113,29 @@
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro multi_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
|
.macro multi_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req
|
||||||
special SavePlayerParty
|
special SavePlayerParty
|
||||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
||||||
multi_do MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
|
multi_do MULTI_BATTLE_2_VS_2, \partnerId
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro multi_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
|
.macro multi_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req
|
||||||
special SavePlayerParty
|
special SavePlayerParty
|
||||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||||
multi_do MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
|
multi_do MULTI_BATTLE_2_VS_1, \partnerId
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
||||||
.macro multi_wild partnerId:req, partnerPicId:req
|
.macro multi_wild partnerId:req
|
||||||
special SavePlayerParty
|
special SavePlayerParty
|
||||||
multi_do MULTI_BATTLE_2_VS_WILD, \partnerId, \partnerPicId
|
multi_do MULTI_BATTLE_2_VS_WILD, \partnerId
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro multi_do_fixed type:req, partnerId:req, partnerPicId:req
|
.macro multi_do_fixed type:req, partnerId:req
|
||||||
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
||||||
setvar VAR_0x8005, \type
|
setvar VAR_0x8005, \type
|
||||||
setvar VAR_0x8006, \partnerId
|
setvar VAR_0x8006, \partnerId
|
||||||
setvar VAR_0x8007, \partnerPicId
|
|
||||||
special DoSpecialTrainerBattle
|
special DoSpecialTrainerBattle
|
||||||
waitstate
|
waitstate
|
||||||
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SAVE_PARTY
|
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SAVE_PARTY
|
||||||
|
@ -145,21 +143,21 @@
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro multi_fixed_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
|
.macro multi_fixed_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req
|
||||||
special SavePlayerParty
|
special SavePlayerParty
|
||||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
|
||||||
multi_do_fixed MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
|
multi_do_fixed MULTI_BATTLE_2_VS_2, \partnerId
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro multi_fixed_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
|
.macro multi_fixed_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req
|
||||||
special SavePlayerParty
|
special SavePlayerParty
|
||||||
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
|
||||||
multi_do_fixed MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
|
multi_do_fixed MULTI_BATTLE_2_VS_1, \partnerId
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
|
||||||
.macro multi_fixed_wild partnerId:req, partnerPicId:req
|
.macro multi_fixed_wild partnerId:req
|
||||||
special SavePlayerParty
|
special SavePlayerParty
|
||||||
multi_do_fixed MULTI_BATTLE_2_VS_WILD, \partnerId, \partnerPicId
|
multi_do_fixed MULTI_BATTLE_2_VS_WILD, \partnerId
|
||||||
.endm
|
.endm
|
||||||
|
|
|
@ -257,7 +257,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle::
|
||||||
goto MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt
|
goto MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt
|
||||||
|
|
||||||
MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle::
|
MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle::
|
||||||
multi_2_vs_2 TRAINER_MAXIE_MOSSDEEP, MossdeepCity_SpaceCenter_2F_Text_JustWantToExpandLand, TRAINER_TABITHA_MOSSDEEP, MossdeepCity_SpaceCenter_Text_TabithaDefeat, PARTNER_STEVEN, TRAINER_BACK_PIC_STEVEN
|
multi_2_vs_2 TRAINER_MAXIE_MOSSDEEP, MossdeepCity_SpaceCenter_2F_Text_JustWantToExpandLand, TRAINER_TABITHA_MOSSDEEP, MossdeepCity_SpaceCenter_Text_TabithaDefeat, PARTNER_STEVEN
|
||||||
switch VAR_RESULT
|
switch VAR_RESULT
|
||||||
case 1, MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha
|
case 1, MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
|
|
@ -1090,7 +1090,6 @@ extern u16 gMoveToLearn;
|
||||||
extern u32 gFieldStatuses;
|
extern u32 gFieldStatuses;
|
||||||
extern struct FieldTimer gFieldTimers;
|
extern struct FieldTimer gFieldTimers;
|
||||||
extern u8 gBattlerAbility;
|
extern u8 gBattlerAbility;
|
||||||
extern u16 gPartnerSpriteId;
|
|
||||||
extern struct QueuedStatBoost gQueuedStatBoosts[MAX_BATTLERS_COUNT];
|
extern struct QueuedStatBoost gQueuedStatBoosts[MAX_BATTLERS_COUNT];
|
||||||
extern const struct BattleMoveEffect gBattleMoveEffects[];
|
extern const struct BattleMoveEffect gBattleMoveEffects[];
|
||||||
|
|
||||||
|
|
|
@ -435,7 +435,7 @@ static void PlayerPartnerHandleIntroTrainerBallThrow(u32 battler)
|
||||||
const u32 *trainerPal;
|
const u32 *trainerPal;
|
||||||
|
|
||||||
if (gPartnerTrainerId > TRAINER_PARTNER(PARTNER_NONE))
|
if (gPartnerTrainerId > TRAINER_PARTNER(PARTNER_NONE))
|
||||||
trainerPal = gTrainerBacksprites[gPartnerSpriteId].palette.data;
|
trainerPal = gTrainerBacksprites[gBattlePartners[gPartnerTrainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerPic].palette.data;
|
||||||
else if (IsAiVsAiBattle())
|
else if (IsAiVsAiBattle())
|
||||||
trainerPal = gTrainerSprites[GetTrainerPicFromId(gPartnerTrainerId)].palette.data;
|
trainerPal = gTrainerSprites[GetTrainerPicFromId(gPartnerTrainerId)].palette.data;
|
||||||
else
|
else
|
||||||
|
|
|
@ -220,7 +220,6 @@ EWRAM_DATA u16 gMoveToLearn = 0;
|
||||||
EWRAM_DATA u32 gFieldStatuses = 0;
|
EWRAM_DATA u32 gFieldStatuses = 0;
|
||||||
EWRAM_DATA struct FieldTimer gFieldTimers = {0};
|
EWRAM_DATA struct FieldTimer gFieldTimers = {0};
|
||||||
EWRAM_DATA u8 gBattlerAbility = 0;
|
EWRAM_DATA u8 gBattlerAbility = 0;
|
||||||
EWRAM_DATA u16 gPartnerSpriteId = 0;
|
|
||||||
EWRAM_DATA struct QueuedStatBoost gQueuedStatBoosts[MAX_BATTLERS_COUNT] = {0};
|
EWRAM_DATA struct QueuedStatBoost gQueuedStatBoosts[MAX_BATTLERS_COUNT] = {0};
|
||||||
EWRAM_DATA bool8 gHasFetchedBall = FALSE;
|
EWRAM_DATA bool8 gHasFetchedBall = FALSE;
|
||||||
EWRAM_DATA u8 gLastUsedBall = 0;
|
EWRAM_DATA u8 gLastUsedBall = 0;
|
||||||
|
|
|
@ -2148,7 +2148,6 @@ void DoSpecialTrainerBattle(void)
|
||||||
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER;
|
gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
gPartnerSpriteId = VarGet(gSpecialVar_0x8007);
|
|
||||||
gPartnerTrainerId = VarGet(gSpecialVar_0x8006) + TRAINER_PARTNER(PARTNER_NONE);
|
gPartnerTrainerId = VarGet(gSpecialVar_0x8006) + TRAINER_PARTNER(PARTNER_NONE);
|
||||||
FillPartnerParty(gPartnerTrainerId);
|
FillPartnerParty(gPartnerTrainerId);
|
||||||
CreateTask(Task_StartBattleAfterTransition, 1);
|
CreateTask(Task_StartBattleAfterTransition, 1);
|
||||||
|
|
Loading…
Reference in a new issue