merge kyogre, groudon, rayquaza battle types
This commit is contained in:
parent
6363e61043
commit
7981887f0a
6 changed files with 63 additions and 49 deletions
|
@ -56,7 +56,7 @@
|
|||
#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9) // Used in pokefirered as BATTLE_TYPE_OLD_MAN_TUTORIAL.
|
||||
#define BATTLE_TYPE_ROAMER (1 << 10)
|
||||
#define BATTLE_TYPE_EREADER_TRAINER (1 << 11)
|
||||
#define BATTLE_TYPE_KYOGRE_GROUDON (1 << 12)
|
||||
#define BATTLE_TYPE_RAID (1 << 12)
|
||||
#define BATTLE_TYPE_LEGENDARY (1 << 13)
|
||||
#define BATTLE_TYPE_REGI (1 << 14)
|
||||
#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15) // Used in pokefirered as BATTLE_TYPE_GHOST.
|
||||
|
@ -72,9 +72,9 @@
|
|||
#define BATTLE_TYPE_RECORDED_LINK (1 << 25)
|
||||
#define BATTLE_TYPE_TRAINER_HILL (1 << 26)
|
||||
#define BATTLE_TYPE_SECRET_BASE (1 << 27)
|
||||
#define BATTLE_TYPE_GROUDON (1 << 28)
|
||||
#define BATTLE_TYPE_KYOGRE (1 << 29)
|
||||
#define BATTLE_TYPE_RAYQUAZA (1 << 30)
|
||||
#define BATTLE_TYPE_28 (1 << 28)
|
||||
#define BATTLE_TYPE_29 (1 << 29)
|
||||
#define BATTLE_TYPE_30 (1 << 30)
|
||||
#define BATTLE_TYPE_RECORDED_IS_MASTER (1 << 31)
|
||||
#define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_PIKE | BATTLE_TYPE_PYRAMID)
|
||||
#define BATTLE_TYPE_FRONTIER_NO_PYRAMID (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_PIKE)
|
||||
|
|
|
@ -772,23 +772,26 @@ void DrawMainBattleBackground(void)
|
|||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Water, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60);
|
||||
switch (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL))
|
||||
{
|
||||
case SPECIES_GROUDON:
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60);
|
||||
break;
|
||||
case SPECIES_KYOGRE:
|
||||
LZDecompressVram(gBattleTerrainTiles_Water, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60);
|
||||
break;
|
||||
case SPECIES_RAYQUAZA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1170,20 +1173,23 @@ void DrawBattleEntryBackground(void)
|
|||
CopyBgTilemapBufferToVram(2);
|
||||
}
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void *)(BG_SCREEN_ADDR(28)));
|
||||
switch (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL))
|
||||
{
|
||||
case SPECIES_GROUDON:
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void*)(BG_SCREEN_ADDR(28)));
|
||||
break;
|
||||
case SPECIES_KYOGRE:
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void*)(BG_SCREEN_ADDR(28)));
|
||||
break;
|
||||
case SPECIES_RAYQUAZA:
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(28)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1238,9 +1244,17 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
|||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void *)(BG_CHAR_ADDR(2)));
|
||||
switch (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL))
|
||||
{
|
||||
case SPECIES_GROUDON:
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case SPECIES_KYOGRE:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(2)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1297,10 +1311,10 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
|||
{
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
|
||||
{
|
||||
if (gGameVersion == VERSION_RUBY)
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void *)(BG_SCREEN_ADDR(26)));
|
||||
if (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL) == SPECIES_GROUDON)
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26)));
|
||||
else
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void *)(BG_SCREEN_ADDR(26)));
|
||||
}
|
||||
|
@ -1359,9 +1373,9 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
|||
{
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
|
||||
{
|
||||
if (gGameVersion == VERSION_RUBY)
|
||||
if (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL) == SPECIES_GROUDON)
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60);
|
||||
else
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60);
|
||||
|
|
|
@ -118,7 +118,7 @@ void HandleIntroSlide(u8 terrain)
|
|||
{
|
||||
taskId = CreateTask(BattleIntroSlide3, 0);
|
||||
}
|
||||
else if ((gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON) && gGameVersion != VERSION_RUBY)
|
||||
else if (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL) == SPECIES_KYOGRE)
|
||||
{
|
||||
terrain = BATTLE_TERRAIN_UNDERWATER;
|
||||
taskId = CreateTask(BattleIntroSlide2, 0);
|
||||
|
|
|
@ -536,15 +536,12 @@ void BattleSetup_StartLegendaryBattle(void)
|
|||
{
|
||||
default:
|
||||
case SPECIES_GROUDON:
|
||||
gBattleTypeFlags |= BATTLE_TYPE_GROUDON;
|
||||
CreateBattleStartTask(B_TRANSITION_GROUDON, MUS_VS_KYOGRE_GROUDON);
|
||||
break;
|
||||
case SPECIES_KYOGRE:
|
||||
gBattleTypeFlags |= BATTLE_TYPE_KYOGRE;
|
||||
CreateBattleStartTask(B_TRANSITION_KYOGRE, MUS_VS_KYOGRE_GROUDON);
|
||||
break;
|
||||
case SPECIES_RAYQUAZA:
|
||||
gBattleTypeFlags |= BATTLE_TYPE_RAYQUAZA;
|
||||
CreateBattleStartTask(B_TRANSITION_RAYQUAZA, MUS_VS_RAYQUAZA);
|
||||
break;
|
||||
case SPECIES_DEOXYS:
|
||||
|
@ -569,7 +566,7 @@ void StartGroudonKyogreBattle(void)
|
|||
{
|
||||
LockPlayerFieldControls();
|
||||
gMain.savedCallback = CB2_EndScriptedWildBattle;
|
||||
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_KYOGRE_GROUDON;
|
||||
gBattleTypeFlags = BATTLE_TYPE_LEGENDARY;
|
||||
|
||||
if (gGameVersion == VERSION_RUBY)
|
||||
CreateBattleStartTask(B_TRANSITION_ANGLED_WIPES, MUS_VS_KYOGRE_GROUDON); // GROUDON
|
||||
|
|
|
@ -7514,8 +7514,12 @@ void ClearBattleMonForms(void)
|
|||
|
||||
u16 GetBattleBGM(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LEGENDARY)
|
||||
{
|
||||
if (GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL) == SPECIES_RAYQUAZA)
|
||||
return MUS_VS_RAYQUAZA;
|
||||
return MUS_VS_KYOGRE_GROUDON;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_REGI)
|
||||
return MUS_VS_REGI;
|
||||
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
|
||||
|
|
|
@ -23,9 +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_KYOGRE_GROUDON | BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI \
|
||||
| BATTLE_TYPE_RECORDED | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE \
|
||||
| BATTLE_TYPE_GROUDON | BATTLE_TYPE_KYOGRE | BATTLE_TYPE_RAYQUAZA))
|
||||
| BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_REGI | BATTLE_TYPE_RECORDED \
|
||||
| BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE))
|
||||
|
||||
struct PlayerInfo
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue