merged regi battle type into BATTLE_TYPE_LEGENDARY

This commit is contained in:
AgustinGDLV 2022-10-27 19:52:52 -07:00
parent 2139e138a9
commit 0663510583
4 changed files with 20 additions and 8 deletions

View file

@ -58,7 +58,7 @@
#define BATTLE_TYPE_EREADER_TRAINER (1 << 11)
#define BATTLE_TYPE_RAID (1 << 12)
#define BATTLE_TYPE_LEGENDARY (1 << 13)
#define BATTLE_TYPE_REGI (1 << 14)
#define BATTLE_TYPE_14 (1 << 14)
#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15) // Used in pokefirered as BATTLE_TYPE_GHOST.
#define BATTLE_TYPE_DOME (1 << 16) // Used in pokefirered as BATTLE_TYPE_POKEDUDE.
#define BATTLE_TYPE_PALACE (1 << 17) // Used in pokefirered as BATTLE_TYPE_WILD_SCRIPTED.

View file

@ -586,7 +586,7 @@ void StartRegiBattle(void)
LockPlayerFieldControls();
gMain.savedCallback = CB2_EndScriptedWildBattle;
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI;
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY;
species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES);
switch (species)

View file

@ -7550,12 +7550,24 @@ u16 GetBattleBGM(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
{
if (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL) == SPECIES_RAYQUAZA)
switch (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL))
{
case SPECIES_RAYQUAZA:
return MUS_VS_RAYQUAZA;
return MUS_VS_KYOGRE_GROUDON;
case SPECIES_KYOGRE:
case SPECIES_GROUDON:
return MUS_VS_KYOGRE_GROUDON;
case SPECIES_REGIROCK:
case SPECIES_REGICE:
case SPECIES_REGISTEEL:
case SPECIES_REGIGIGAS:
case SPECIES_REGIELEKI:
case SPECIES_REGIDRAGO:
return MUS_VS_REGI;
default:
return MUS_RG_VS_LEGEND;
}
}
else if (gBattleTypeFlags & BATTLE_TYPE_REGI)
return MUS_VS_REGI;
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
return MUS_VS_TRAINER;
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)

View file

@ -23,8 +23,8 @@
#define BATTLER_RECORD_SIZE 664
#define ILLEGAL_BATTLE_TYPES ((BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE \
| BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_ROAMER | BATTLE_TYPE_EREADER_TRAINER \
| BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI | BATTLE_TYPE_RECORDED \
| BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE))
| BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_RECORDED | BATTLE_TYPE_TRAINER_HILL \
| BATTLE_TYPE_SECRET_BASE | BATTLE_TYPE_RAID))
struct PlayerInfo
{