mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-05-31 20:43:00 -05:00
Address review comments, 2
This commit is contained in:
parent
f8c933c76d
commit
69d4e8133c
|
|
@ -10,7 +10,7 @@ typedef enum BattleRegulationComplianceMessage {
|
|||
BTL_REG_COMPLIANCE_FAIL_SPECIES_DUPE,
|
||||
BTL_REG_COMPLIANCE_FAIL_ITEMS_DUPE,
|
||||
BTL_REG_COMPLIANCE_FAIL_NUM_MONS,
|
||||
BTL_REG_COMPLIANCE_FAIL_5,
|
||||
BTL_REG_COMPLIANCE_FAIL_SPECIAL_CONSTRAINTS,
|
||||
BTL_REG_COMPLIANCE_FAIL_TOO_MANY_LEGENDS,
|
||||
BTL_REG_COMPLIANCE_FAIL_7,
|
||||
BTL_REG_COMPLIANCE_FAIL_SOUL_DEW,
|
||||
|
|
@ -20,7 +20,7 @@ typedef struct LinkBattleRuleset LinkBattleRuleset;
|
|||
|
||||
PokedexData *PokedexData_CreateAndLoad(HeapID heapId);
|
||||
void PokedexData_UnloadAndDelete(PokedexData *pokedex);
|
||||
BOOL sub_0207496C(LinkBattleRuleset *ruleset, Pokemon *pokemon, PokedexData *pokedex);
|
||||
BOOL LinkBattleRuleset_CheckDexBasedRules(LinkBattleRuleset *ruleset, Pokemon *pokemon, PokedexData *pokedex);
|
||||
BattleRegulationComplianceMessage LinkBattleRuleset_GetPartySelectionComplianceMessage(LinkBattleRuleset *ruleset, Party *party, PokedexData *pokedex, u8 *a3);
|
||||
int sub_02074CD0(LinkBattleRuleset *ruleset, Party *party, PokedexData *pokedex);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ void PokedexData_UnloadAndDelete(PokedexData *pokedex) {
|
|||
PokedexData_Delete(pokedex);
|
||||
}
|
||||
|
||||
BOOL sub_0207496C(LinkBattleRuleset *ruleset, Pokemon *pokemon, PokedexData *pokedex) {
|
||||
BOOL LinkBattleRuleset_CheckDexBasedRules(LinkBattleRuleset *ruleset, Pokemon *pokemon, PokedexData *pokedex) {
|
||||
u16 species = GetMonData(pokemon, MON_DATA_SPECIES, NULL);
|
||||
if (ruleset == NULL) {
|
||||
return TRUE;
|
||||
|
|
@ -97,7 +97,7 @@ BattleRegulationComplianceMessage LinkBattleRuleset_GetPartySelectionComplianceM
|
|||
u16 heldItems[PARTY_SIZE];
|
||||
|
||||
if (ruleset == NULL) {
|
||||
return FALSE;
|
||||
return BTL_REG_COMPLIANCE_OK;
|
||||
}
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; ++i) {
|
||||
|
|
@ -115,8 +115,8 @@ BattleRegulationComplianceMessage LinkBattleRuleset_GetPartySelectionComplianceM
|
|||
for (i = 0; i < PARTY_SIZE; ++i) {
|
||||
if (selectedOrder[i] != 0) {
|
||||
mon = Party_GetMonByIndex(party, selectedOrder[i] - 1);
|
||||
if (!sub_0207496C(ruleset, mon, pokedex)) {
|
||||
return 5;
|
||||
if (!LinkBattleRuleset_CheckDexBasedRules(ruleset, mon, pokedex)) {
|
||||
return BTL_REG_COMPLIANCE_FAIL_SPECIAL_CONSTRAINTS;
|
||||
}
|
||||
species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
||||
heldItems[i] = GetMonData(mon, MON_DATA_HELD_ITEM, NULL);
|
||||
|
|
@ -219,7 +219,7 @@ int sub_02074CD0(LinkBattleRuleset *ruleset, Party *party, PokedexData *pokedex)
|
|||
mon = Party_GetMonByIndex(party, i);
|
||||
species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
||||
levels[i] = GetMonData(mon, MON_DATA_LEVEL, NULL);
|
||||
if (!sub_0207496C(ruleset, mon, pokedex)) {
|
||||
if (!LinkBattleRuleset_CheckDexBasedRules(ruleset, mon, pokedex)) {
|
||||
species[i] = SPECIES_NONE;
|
||||
--numLegalMons;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1772,7 +1772,7 @@ u8 sub_0207B364(PartyMenu *partyMenu, u8 selection) {
|
|||
|
||||
if (partyMenu->args->linkBattleRuleset != NULL) {
|
||||
Pokemon *pokemon = Party_GetMonByIndex(partyMenu->args->party, selection);
|
||||
if (sub_0207496C(partyMenu->args->linkBattleRuleset, pokemon, partyMenu->pokedex) == FALSE) {
|
||||
if (LinkBattleRuleset_CheckDexBasedRules(partyMenu->args->linkBattleRuleset, pokemon, partyMenu->pokedex) == FALSE) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -2013,7 +2013,7 @@ static int PartyMenu_SelectedBattleTeamComplianceCheck(PartyMenu *partyMenu) {
|
|||
return PARTY_MENU_STATE_WAIT_TEXT_PRINTER;
|
||||
case BTL_REG_COMPLIANCE_FAIL_NUM_MONS:
|
||||
break;
|
||||
case BTL_REG_COMPLIANCE_FAIL_5:
|
||||
case BTL_REG_COMPLIANCE_FAIL_SPECIAL_CONSTRAINTS:
|
||||
break;
|
||||
case BTL_REG_COMPLIANCE_FAIL_TOO_MANY_LEGENDS:
|
||||
PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00168, TRUE);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user