Add PARTY_NOTHING_CHOSEN

This commit is contained in:
GriffinR 2021-11-15 10:57:06 -05:00
parent f85de6eca5
commit 65d3b58374
18 changed files with 26 additions and 23 deletions

View File

@ -14,9 +14,9 @@ BattleFrontier_Lounge1_EventScript_Breeder::
BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder::
special ChoosePartyMon
waitstate
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect
end

View File

@ -11,7 +11,7 @@ BattleFrontier_Lounge5_EventScript_NatureGirl::
waitstate
lock
faceplayer
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
compare VAR_RESULT, SPECIES_EGG

View File

@ -15,7 +15,7 @@ BattleFrontier_Lounge6_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies

View File

@ -27,7 +27,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon::
msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT
special ChooseMonForMoveRelearner
waitstate
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
special IsSelectedMonEgg
compare VAR_RESULT, TRUE

View File

@ -15,7 +15,7 @@ FortreeCity_House1_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq FortreeCity_House1_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies

View File

@ -724,7 +724,7 @@ LilycoveCity_ContestLobby_EventScript_ChooseLinkContestMon::
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT
setvar VAR_CONTEST_RANK, 0
choosecontestmon
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest
special TryEnterContestMon
compare VAR_RESULT, CANT_ENTER_CONTEST

View File

@ -18,7 +18,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget::
msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT
special ChoosePartyMon
waitstate
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain
special IsSelectedMonEgg
compare VAR_RESULT, TRUE

View File

@ -15,7 +15,7 @@ PacifidlogTown_House3_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies

View File

@ -15,7 +15,7 @@ RustboroCity_House1_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq RustboroCity_House1_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies

View File

@ -15,9 +15,9 @@ SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate::
msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT
special ChoosePartyMon
waitstate
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate
end

View File

@ -9,7 +9,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother::
special ChoosePartyMon
waitstate
copyvar VAR_RESULT, VAR_0x8004
compare VAR_RESULT, 255
compare VAR_RESULT, PARTY_NOTHING_CHOSEN
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot
special CompareSeedotSize
compare VAR_RESULT, 1
@ -58,7 +58,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother::
special ChoosePartyMon
waitstate
copyvar VAR_RESULT, VAR_0x8004
compare VAR_RESULT, 255
compare VAR_RESULT, PARTY_NOTHING_CHOSEN
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad
special CompareLotadSize
compare VAR_RESULT, 1

View File

@ -207,7 +207,7 @@ gScriptCmdTable::
.4byte ScrCmd_nop1 @ 0xcc
.4byte ScrCmd_setmoneventlegal @ 0xcd
.4byte ScrCmd_checkmoneventlegal @ 0xce
.4byte ScrCmd_gotoram @ 0xcf
.4byte ScrCmd_gotowondercardscript @ 0xcf
.4byte ScrCmd_nop1 @ 0xd0
.4byte ScrCmd_warpspinenter @ 0xd1
.4byte ScrCmd_setmonmetlocation @ 0xd2

View File

@ -103,7 +103,7 @@ LilycoveCity_ContestLobby_EventScript_CancelEnterContest::
LilycoveCity_ContestLobby_EventScript_ChooseContestMon::
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT
choosecontestmon
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest
special TryEnterContestMon
compare VAR_RESULT, CANT_ENTER_CONTEST

View File

@ -107,7 +107,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise::
fadescreen FADE_TO_BLACK
special ChooseSendDaycareMon
waitstate
compare VAR_0x8004, 255
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
compare VAR_RESULT, 0

View File

@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_PARTY_MENU_H
#define GUARD_CONSTANTS_PARTY_MENU_H
#define PARTY_NOTHING_CHOSEN 0xFF
#define AILMENT_NONE 0
#define AILMENT_PSN 1
#define AILMENT_PRZ 2

View File

@ -27,7 +27,7 @@ u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer);
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
void TakeMailFromMon(struct Pokemon *mon);
void ClearMailItemId(u8 mailId);
u8 TakeMailFromMon2(struct Pokemon *mon);
u8 TakeMailFromMonAndSave(struct Pokemon *mon);
bool8 ItemIsMail(u16 itemId);
#endif // GUARD_MAIL_H

View File

@ -157,7 +157,7 @@ void ClearMailItemId(u8 mailId)
gSaveBlock1Ptr->mail[mailId].itemId = ITEM_NONE;
}
u8 TakeMailFromMon2(struct Pokemon *mon)
u8 TakeMailFromMonAndSave(struct Pokemon *mon)
{
u8 i;
u8 newHeldItem[2];
@ -179,6 +179,7 @@ u8 TakeMailFromMon2(struct Pokemon *mon)
}
}
// No space to save mail
return MAIL_NONE;
}

View File

@ -3343,7 +3343,7 @@ static void Task_HandleSendMailToPCYesNoInput(u8 taskId)
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0: // Yes, send to PC
if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF)
if (TakeMailFromMonAndSave(&gPlayerParty[gPartyMenu.slotId]) != MAIL_NONE)
{
DisplayPartyMenuMessage(gText_MailSentToPC, FALSE);
gTasks[taskId].func = Task_UpdateHeldItemSprite;
@ -6133,7 +6133,7 @@ static void BufferMonSelection(void)
{
gSpecialVar_0x8004 = GetCursorSelectionMonId();
if (gSpecialVar_0x8004 >= PARTY_SIZE)
gSpecialVar_0x8004 = 0xFF;
gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
gFieldCallback2 = CB2_FadeFromPartyMenu;
SetMainCallback2(CB2_ReturnToField);
}
@ -6176,7 +6176,7 @@ static void CB2_ChooseContestMon(void)
{
gContestMonPartyIndex = GetCursorSelectionMonId();
if (gContestMonPartyIndex >= PARTY_SIZE)
gContestMonPartyIndex = 0xFF;
gContestMonPartyIndex = PARTY_NOTHING_CHOSEN;
gSpecialVar_0x8004 = gContestMonPartyIndex;
gFieldCallback2 = CB2_FadeFromPartyMenu;
SetMainCallback2(CB2_ReturnToField);
@ -6221,7 +6221,7 @@ static void CB2_ChooseMonForMoveRelearner(void)
{
gSpecialVar_0x8004 = GetCursorSelectionMonId();
if (gSpecialVar_0x8004 >= PARTY_SIZE)
gSpecialVar_0x8004 = 0xFF;
gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
else
gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]);
gFieldCallback2 = CB2_FadeFromPartyMenu;