mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Add PARTY_NOTHING_CHOSEN
This commit is contained in:
parent
f85de6eca5
commit
65d3b58374
@ -14,9 +14,9 @@ BattleFrontier_Lounge1_EventScript_Breeder::
|
|||||||
BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder::
|
BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder::
|
||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder
|
goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect
|
goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ BattleFrontier_Lounge5_EventScript_NatureGirl::
|
|||||||
waitstate
|
waitstate
|
||||||
lock
|
lock
|
||||||
faceplayer
|
faceplayer
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown
|
goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown
|
||||||
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
|
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
|
||||||
compare VAR_RESULT, SPECIES_EGG
|
compare VAR_RESULT, SPECIES_EGG
|
||||||
|
@ -15,7 +15,7 @@ BattleFrontier_Lounge6_EventScript_Trader::
|
|||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
copyvar VAR_0x800A, VAR_0x8004
|
copyvar VAR_0x800A, VAR_0x8004
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade
|
goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade
|
||||||
copyvar VAR_0x8005, VAR_0x800A
|
copyvar VAR_0x8005, VAR_0x800A
|
||||||
specialvar VAR_RESULT, GetTradeSpecies
|
specialvar VAR_RESULT, GetTradeSpecies
|
||||||
|
@ -27,7 +27,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon::
|
|||||||
msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT
|
msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT
|
||||||
special ChooseMonForMoveRelearner
|
special ChooseMonForMoveRelearner
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
|
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
|
||||||
special IsSelectedMonEgg
|
special IsSelectedMonEgg
|
||||||
compare VAR_RESULT, TRUE
|
compare VAR_RESULT, TRUE
|
||||||
|
@ -15,7 +15,7 @@ FortreeCity_House1_EventScript_Trader::
|
|||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
copyvar VAR_0x800A, VAR_0x8004
|
copyvar VAR_0x800A, VAR_0x8004
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq FortreeCity_House1_EventScript_DeclineTrade
|
goto_if_eq FortreeCity_House1_EventScript_DeclineTrade
|
||||||
copyvar VAR_0x8005, VAR_0x800A
|
copyvar VAR_0x8005, VAR_0x800A
|
||||||
specialvar VAR_RESULT, GetTradeSpecies
|
specialvar VAR_RESULT, GetTradeSpecies
|
||||||
|
@ -724,7 +724,7 @@ LilycoveCity_ContestLobby_EventScript_ChooseLinkContestMon::
|
|||||||
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT
|
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT
|
||||||
setvar VAR_CONTEST_RANK, 0
|
setvar VAR_CONTEST_RANK, 0
|
||||||
choosecontestmon
|
choosecontestmon
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest
|
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest
|
||||||
special TryEnterContestMon
|
special TryEnterContestMon
|
||||||
compare VAR_RESULT, CANT_ENTER_CONTEST
|
compare VAR_RESULT, CANT_ENTER_CONTEST
|
||||||
|
@ -18,7 +18,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget::
|
|||||||
msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT
|
msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT
|
||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain
|
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain
|
||||||
special IsSelectedMonEgg
|
special IsSelectedMonEgg
|
||||||
compare VAR_RESULT, TRUE
|
compare VAR_RESULT, TRUE
|
||||||
|
@ -15,7 +15,7 @@ PacifidlogTown_House3_EventScript_Trader::
|
|||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
copyvar VAR_0x800A, VAR_0x8004
|
copyvar VAR_0x800A, VAR_0x8004
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade
|
goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade
|
||||||
copyvar VAR_0x8005, VAR_0x800A
|
copyvar VAR_0x8005, VAR_0x800A
|
||||||
specialvar VAR_RESULT, GetTradeSpecies
|
specialvar VAR_RESULT, GetTradeSpecies
|
||||||
|
@ -15,7 +15,7 @@ RustboroCity_House1_EventScript_Trader::
|
|||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
copyvar VAR_0x800A, VAR_0x8004
|
copyvar VAR_0x800A, VAR_0x8004
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq RustboroCity_House1_EventScript_DeclineTrade
|
goto_if_eq RustboroCity_House1_EventScript_DeclineTrade
|
||||||
copyvar VAR_0x8005, VAR_0x800A
|
copyvar VAR_0x8005, VAR_0x800A
|
||||||
specialvar VAR_RESULT, GetTradeSpecies
|
specialvar VAR_RESULT, GetTradeSpecies
|
||||||
|
@ -15,9 +15,9 @@ SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate::
|
|||||||
msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT
|
msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT
|
||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname
|
goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate
|
goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother::
|
|||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
copyvar VAR_RESULT, VAR_0x8004
|
copyvar VAR_RESULT, VAR_0x8004
|
||||||
compare VAR_RESULT, 255
|
compare VAR_RESULT, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot
|
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot
|
||||||
special CompareSeedotSize
|
special CompareSeedotSize
|
||||||
compare VAR_RESULT, 1
|
compare VAR_RESULT, 1
|
||||||
@ -58,7 +58,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother::
|
|||||||
special ChoosePartyMon
|
special ChoosePartyMon
|
||||||
waitstate
|
waitstate
|
||||||
copyvar VAR_RESULT, VAR_0x8004
|
copyvar VAR_RESULT, VAR_0x8004
|
||||||
compare VAR_RESULT, 255
|
compare VAR_RESULT, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad
|
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad
|
||||||
special CompareLotadSize
|
special CompareLotadSize
|
||||||
compare VAR_RESULT, 1
|
compare VAR_RESULT, 1
|
||||||
|
@ -207,7 +207,7 @@ gScriptCmdTable::
|
|||||||
.4byte ScrCmd_nop1 @ 0xcc
|
.4byte ScrCmd_nop1 @ 0xcc
|
||||||
.4byte ScrCmd_setmoneventlegal @ 0xcd
|
.4byte ScrCmd_setmoneventlegal @ 0xcd
|
||||||
.4byte ScrCmd_checkmoneventlegal @ 0xce
|
.4byte ScrCmd_checkmoneventlegal @ 0xce
|
||||||
.4byte ScrCmd_gotoram @ 0xcf
|
.4byte ScrCmd_gotowondercardscript @ 0xcf
|
||||||
.4byte ScrCmd_nop1 @ 0xd0
|
.4byte ScrCmd_nop1 @ 0xd0
|
||||||
.4byte ScrCmd_warpspinenter @ 0xd1
|
.4byte ScrCmd_warpspinenter @ 0xd1
|
||||||
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
||||||
|
@ -103,7 +103,7 @@ LilycoveCity_ContestLobby_EventScript_CancelEnterContest::
|
|||||||
LilycoveCity_ContestLobby_EventScript_ChooseContestMon::
|
LilycoveCity_ContestLobby_EventScript_ChooseContestMon::
|
||||||
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT
|
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT
|
||||||
choosecontestmon
|
choosecontestmon
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest
|
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest
|
||||||
special TryEnterContestMon
|
special TryEnterContestMon
|
||||||
compare VAR_RESULT, CANT_ENTER_CONTEST
|
compare VAR_RESULT, CANT_ENTER_CONTEST
|
||||||
|
@ -107,7 +107,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise::
|
|||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
special ChooseSendDaycareMon
|
special ChooseSendDaycareMon
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_0x8004, 255
|
compare VAR_0x8004, PARTY_NOTHING_CHOSEN
|
||||||
goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
|
goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
|
||||||
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
|
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
|
||||||
compare VAR_RESULT, 0
|
compare VAR_RESULT, 0
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef GUARD_CONSTANTS_PARTY_MENU_H
|
#ifndef GUARD_CONSTANTS_PARTY_MENU_H
|
||||||
#define GUARD_CONSTANTS_PARTY_MENU_H
|
#define GUARD_CONSTANTS_PARTY_MENU_H
|
||||||
|
|
||||||
|
#define PARTY_NOTHING_CHOSEN 0xFF
|
||||||
|
|
||||||
#define AILMENT_NONE 0
|
#define AILMENT_NONE 0
|
||||||
#define AILMENT_PSN 1
|
#define AILMENT_PSN 1
|
||||||
#define AILMENT_PRZ 2
|
#define AILMENT_PRZ 2
|
||||||
|
@ -27,7 +27,7 @@ u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer);
|
|||||||
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
|
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
|
||||||
void TakeMailFromMon(struct Pokemon *mon);
|
void TakeMailFromMon(struct Pokemon *mon);
|
||||||
void ClearMailItemId(u8 mailId);
|
void ClearMailItemId(u8 mailId);
|
||||||
u8 TakeMailFromMon2(struct Pokemon *mon);
|
u8 TakeMailFromMonAndSave(struct Pokemon *mon);
|
||||||
bool8 ItemIsMail(u16 itemId);
|
bool8 ItemIsMail(u16 itemId);
|
||||||
|
|
||||||
#endif // GUARD_MAIL_H
|
#endif // GUARD_MAIL_H
|
||||||
|
@ -157,7 +157,7 @@ void ClearMailItemId(u8 mailId)
|
|||||||
gSaveBlock1Ptr->mail[mailId].itemId = ITEM_NONE;
|
gSaveBlock1Ptr->mail[mailId].itemId = ITEM_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 TakeMailFromMon2(struct Pokemon *mon)
|
u8 TakeMailFromMonAndSave(struct Pokemon *mon)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
u8 newHeldItem[2];
|
u8 newHeldItem[2];
|
||||||
@ -179,6 +179,7 @@ u8 TakeMailFromMon2(struct Pokemon *mon)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No space to save mail
|
||||||
return MAIL_NONE;
|
return MAIL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3343,7 +3343,7 @@ static void Task_HandleSendMailToPCYesNoInput(u8 taskId)
|
|||||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||||
{
|
{
|
||||||
case 0: // Yes, send to PC
|
case 0: // Yes, send to PC
|
||||||
if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF)
|
if (TakeMailFromMonAndSave(&gPlayerParty[gPartyMenu.slotId]) != MAIL_NONE)
|
||||||
{
|
{
|
||||||
DisplayPartyMenuMessage(gText_MailSentToPC, FALSE);
|
DisplayPartyMenuMessage(gText_MailSentToPC, FALSE);
|
||||||
gTasks[taskId].func = Task_UpdateHeldItemSprite;
|
gTasks[taskId].func = Task_UpdateHeldItemSprite;
|
||||||
@ -6133,7 +6133,7 @@ static void BufferMonSelection(void)
|
|||||||
{
|
{
|
||||||
gSpecialVar_0x8004 = GetCursorSelectionMonId();
|
gSpecialVar_0x8004 = GetCursorSelectionMonId();
|
||||||
if (gSpecialVar_0x8004 >= PARTY_SIZE)
|
if (gSpecialVar_0x8004 >= PARTY_SIZE)
|
||||||
gSpecialVar_0x8004 = 0xFF;
|
gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
|
||||||
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
||||||
SetMainCallback2(CB2_ReturnToField);
|
SetMainCallback2(CB2_ReturnToField);
|
||||||
}
|
}
|
||||||
@ -6176,7 +6176,7 @@ static void CB2_ChooseContestMon(void)
|
|||||||
{
|
{
|
||||||
gContestMonPartyIndex = GetCursorSelectionMonId();
|
gContestMonPartyIndex = GetCursorSelectionMonId();
|
||||||
if (gContestMonPartyIndex >= PARTY_SIZE)
|
if (gContestMonPartyIndex >= PARTY_SIZE)
|
||||||
gContestMonPartyIndex = 0xFF;
|
gContestMonPartyIndex = PARTY_NOTHING_CHOSEN;
|
||||||
gSpecialVar_0x8004 = gContestMonPartyIndex;
|
gSpecialVar_0x8004 = gContestMonPartyIndex;
|
||||||
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
||||||
SetMainCallback2(CB2_ReturnToField);
|
SetMainCallback2(CB2_ReturnToField);
|
||||||
@ -6221,7 +6221,7 @@ static void CB2_ChooseMonForMoveRelearner(void)
|
|||||||
{
|
{
|
||||||
gSpecialVar_0x8004 = GetCursorSelectionMonId();
|
gSpecialVar_0x8004 = GetCursorSelectionMonId();
|
||||||
if (gSpecialVar_0x8004 >= PARTY_SIZE)
|
if (gSpecialVar_0x8004 >= PARTY_SIZE)
|
||||||
gSpecialVar_0x8004 = 0xFF;
|
gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
|
||||||
else
|
else
|
||||||
gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]);
|
gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]);
|
||||||
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
gFieldCallback2 = CB2_FadeFromPartyMenu;
|
||||||
|
Loading…
Reference in New Issue
Block a user