Start documenting battle factory screen
@ -1 +1 @@
|
|||||||
gUnknown_030062E8
|
gFactorySelect_CurrentOptionFunc
|
||||||
|
@ -168,7 +168,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: @ 8259DF2
|
|||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
factory_swapmons
|
factory_swapmons
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_RESULT, 1
|
compare VAR_RESULT, TRUE @ Did player keep current pokemon
|
||||||
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom
|
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom
|
||||||
factory_setswapped
|
factory_setswapped
|
||||||
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT
|
||||||
|
BIN
graphics/battle_frontier/factory_screen/action_box_left.png
Normal file
After Width: | Height: | Size: 156 B |
BIN
graphics/battle_frontier/factory_screen/action_box_right.png
Normal file
After Width: | Height: | Size: 134 B |
After Width: | Height: | Size: 165 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 139 B |
BIN
graphics/battle_frontier/factory_screen/arrow.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
graphics/battle_frontier/factory_screen/menu_highlight_left.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
graphics/battle_frontier/factory_screen/menu_highlight_right.png
Normal file
After Width: | Height: | Size: 132 B |
BIN
graphics/battle_frontier/factory_screen/mon_pic_bg.png
Normal file
After Width: | Height: | Size: 138 B |
BIN
graphics/battle_frontier/factory_screen/mon_pic_bg_anim.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
graphics/battle_frontier/factory_screen/pokeball.png
Normal file
After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 75 B |
Before Width: | Height: | Size: 72 B |
Before Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 78 B |
@ -1,19 +0,0 @@
|
|||||||
JASC-PAL
|
|
||||||
0100
|
|
||||||
16
|
|
||||||
0 0 0
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
||||||
213 255 238
|
|
@ -26,8 +26,8 @@ static void InitFactoryChallenge(void);
|
|||||||
static void GetBattleFactoryData(void);
|
static void GetBattleFactoryData(void);
|
||||||
static void SetBattleFactoryData(void);
|
static void SetBattleFactoryData(void);
|
||||||
static void SaveFactoryChallenge(void);
|
static void SaveFactoryChallenge(void);
|
||||||
static void nullsub_75(void);
|
static void FactoryDummy1(void);
|
||||||
static void nullsub_123(void);
|
static void FactoryDummy2(void);
|
||||||
static void SelectInitialRentalMons(void);
|
static void SelectInitialRentalMons(void);
|
||||||
static void SwapRentalMons(void);
|
static void SwapRentalMons(void);
|
||||||
static void SetPerformedRentalSwap(void);
|
static void SetPerformedRentalSwap(void);
|
||||||
@ -42,8 +42,16 @@ static void RestorePlayerPartyHeldItems(void);
|
|||||||
static u16 GetFactoryMonId(u8 lvlMode, u8 challengeNum, bool8 arg2);
|
static u16 GetFactoryMonId(u8 lvlMode, u8 challengeNum, bool8 arg2);
|
||||||
static u8 GetMoveBattleStyle(u16 move);
|
static u8 GetMoveBattleStyle(u16 move);
|
||||||
|
|
||||||
// Const rom data.
|
// Number of moves needed on the team to be considered using a certain battle style
|
||||||
static const u8 sRequiredMoveCounts[] = {3, 3, 3, 2, 2, 2, 2};
|
static const u8 sRequiredMoveCounts[FACTORY_NUM_STYLES - 1] = {
|
||||||
|
[FACTORY_STYLE_PREPARATION - 1] = 3,
|
||||||
|
[FACTORY_STYLE_SLOW_STEADY - 1] = 3,
|
||||||
|
[FACTORY_STYLE_ENDURANCE - 1] = 3,
|
||||||
|
[FACTORY_STYLE_HIGH_RISK - 1] = 2,
|
||||||
|
[FACTORY_STYLE_WEAKENING - 1] = 2,
|
||||||
|
[FACTORY_STYLE_UNPREDICTABLE - 1] = 2,
|
||||||
|
[FACTORY_STYLE_WEATHER - 1] = 2
|
||||||
|
};
|
||||||
|
|
||||||
static const u16 sMoves_TotalPreparation[] =
|
static const u16 sMoves_TotalPreparation[] =
|
||||||
{
|
{
|
||||||
@ -120,8 +128,8 @@ static void (* const sBattleFactoryFunctions[])(void) =
|
|||||||
[BATTLE_FACTORY_FUNC_GET_DATA] = GetBattleFactoryData,
|
[BATTLE_FACTORY_FUNC_GET_DATA] = GetBattleFactoryData,
|
||||||
[BATTLE_FACTORY_FUNC_SET_DATA] = SetBattleFactoryData,
|
[BATTLE_FACTORY_FUNC_SET_DATA] = SetBattleFactoryData,
|
||||||
[BATTLE_FACTORY_FUNC_SAVE] = SaveFactoryChallenge,
|
[BATTLE_FACTORY_FUNC_SAVE] = SaveFactoryChallenge,
|
||||||
[BATTLE_FACTORY_FUNC_NULL] = nullsub_75,
|
[BATTLE_FACTORY_FUNC_NULL] = FactoryDummy1,
|
||||||
[BATTLE_FACTORY_FUNC_NULL2] = nullsub_123,
|
[BATTLE_FACTORY_FUNC_NULL2] = FactoryDummy2,
|
||||||
[BATTLE_FACTORY_FUNC_SELECT_RENT_MONS] = SelectInitialRentalMons,
|
[BATTLE_FACTORY_FUNC_SELECT_RENT_MONS] = SelectInitialRentalMons,
|
||||||
[BATTLE_FACTORY_FUNC_SWAP_RENT_MONS] = SwapRentalMons,
|
[BATTLE_FACTORY_FUNC_SWAP_RENT_MONS] = SwapRentalMons,
|
||||||
[BATTLE_FACTORY_FUNC_SET_SWAPPED] = SetPerformedRentalSwap,
|
[BATTLE_FACTORY_FUNC_SET_SWAPPED] = SetPerformedRentalSwap,
|
||||||
@ -267,12 +275,12 @@ static void SaveFactoryChallenge(void)
|
|||||||
SaveGameFrontier();
|
SaveGameFrontier();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_75(void)
|
static void FactoryDummy1(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nullsub_123(void)
|
static void FactoryDummy2(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -377,10 +385,10 @@ static void SetRentalsToOpponentParty(void)
|
|||||||
|
|
||||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i];
|
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].monId = gUnknown_03006298[i];
|
||||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]);
|
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,13 +464,13 @@ static void SetPlayerAndOpponentParties(void)
|
|||||||
case 2:
|
case 2:
|
||||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
monId = gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId;
|
monId = gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].monId;
|
||||||
ivs = gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs;
|
ivs = gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].ivs;
|
||||||
CreateMon(&gEnemyParty[i],
|
CreateMon(&gEnemyParty[i],
|
||||||
gFacilityTrainerMons[monId].species,
|
gFacilityTrainerMons[monId].species,
|
||||||
monLevel,
|
monLevel,
|
||||||
ivs,
|
ivs,
|
||||||
TRUE, gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality,
|
TRUE, gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].personality,
|
||||||
OT_ID_PLAYER_ID, 0);
|
OT_ID_PLAYER_ID, 0);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
@ -485,7 +493,7 @@ static void SetPlayerAndOpponentParties(void)
|
|||||||
for (k = 0; k < MAX_MON_MOVES; k++)
|
for (k = 0; k < MAX_MON_MOVES; k++)
|
||||||
SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monId].moves[k], k);
|
SetMonMoveAvoidReturn(&gEnemyParty[i], gFacilityTrainerMons[monId].moves[k], k);
|
||||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]);
|
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]);
|
||||||
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum);
|
SetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM, &gSaveBlock2Ptr->frontier.rentalMons[i + FRONTIER_PARTY_SIZE].abilityNum);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -640,7 +648,7 @@ static void GetOpponentBattleStyle(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSpecialVar_Result = 0;
|
gSpecialVar_Result = FACTORY_STYLE_NONE;
|
||||||
for (i = 1; i < FACTORY_NUM_STYLES; i++)
|
for (i = 1; i < FACTORY_NUM_STYLES; i++)
|
||||||
{
|
{
|
||||||
if (stylePoints[i] >= sRequiredMoveCounts[i - 1])
|
if (stylePoints[i] >= sRequiredMoveCounts[i - 1])
|
||||||
|