Add Set Hidden Nature option to the debug menu (#7281)

This commit is contained in:
Alex 2025-07-07 19:33:57 +02:00 committed by GitHub
parent b183b660a1
commit 0422a013c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 100 additions and 1 deletions

View File

@ -353,6 +353,44 @@ Debug_EventScript_InflictStatus1_Single:
releaseall
end
Debug_EventScript_SetHiddenNature::
special ChoosePartyMon
waitstate
goto_if_ge VAR_0x8004, PARTY_SIZE, Debug_EventScript_InflictStatus1_Close
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
goto_if_eq VAR_RESULT, SPECIES_EGG, Debug_EventScript_InflictStatus1_Close
dynmultipush Debug_EventScript_ChangeNature_Text_Hardy, 0
dynmultipush Debug_EventScript_ChangeNature_Text_Lonely, 1
dynmultipush Debug_EventScript_ChangeNature_Text_Brave, 2
dynmultipush Debug_EventScript_ChangeNature_Text_Adamant, 3
dynmultipush Debug_EventScript_ChangeNature_Text_Naughty, 4
dynmultipush Debug_EventScript_ChangeNature_Text_Bold, 5
dynmultipush Debug_EventScript_ChangeNature_Text_Docile, 6
dynmultipush Debug_EventScript_ChangeNature_Text_Relaxed, 7
dynmultipush Debug_EventScript_ChangeNature_Text_Impish, 8
dynmultipush Debug_EventScript_ChangeNature_Text_Lax, 9
dynmultipush Debug_EventScript_ChangeNature_Text_Timid, 10
dynmultipush Debug_EventScript_ChangeNature_Text_Hasty, 11
dynmultipush Debug_EventScript_ChangeNature_Text_Serious, 12
dynmultipush Debug_EventScript_ChangeNature_Text_Jolly, 13
dynmultipush Debug_EventScript_ChangeNature_Text_Naive, 14
dynmultipush Debug_EventScript_ChangeNature_Text_Modest, 15
dynmultipush Debug_EventScript_ChangeNature_Text_Mild, 16
dynmultipush Debug_EventScript_ChangeNature_Text_Quiet, 17
dynmultipush Debug_EventScript_ChangeNature_Text_Bashful, 18
dynmultipush Debug_EventScript_ChangeNature_Text_Rash, 19
dynmultipush Debug_EventScript_ChangeNature_Text_Calm, 20
dynmultipush Debug_EventScript_ChangeNature_Text_Gentle, 21
dynmultipush Debug_EventScript_ChangeNature_Text_Sassy, 22
dynmultipush Debug_EventScript_ChangeNature_Text_Careful, 23
dynmultipush Debug_EventScript_ChangeNature_Text_Quirky, 24
dynmultistack 0, 0, TRUE, 7, FALSE, 0, NULL
switch VAR_RESULT
case MULTI_B_PRESSED, Debug_EventScript_InflictStatus1_Close
special SetHiddenNature
releaseall
end
Debug_EventScript_InflictStatus1_Single_Poison:
setstatus1 STATUS1_POISON, VAR_0x8004
releaseall
@ -461,6 +499,57 @@ Debug_EventScript_InflictStatus1_Text_Freeze:
Debug_EventScript_InflictStatus1_Text_Frostbite:
.string "Frostbite$"
Debug_EventScript_ChangeNature_Text_Hardy:
.string "Hardy$"
Debug_EventScript_ChangeNature_Text_Lonely:
.string "Lonely$"
Debug_EventScript_ChangeNature_Text_Brave:
.string "Brave$"
Debug_EventScript_ChangeNature_Text_Adamant:
.string "Adamant$"
Debug_EventScript_ChangeNature_Text_Naughty:
.string "Naughty$"
Debug_EventScript_ChangeNature_Text_Bold:
.string "Bold$"
Debug_EventScript_ChangeNature_Text_Docile:
.string "Docile$"
Debug_EventScript_ChangeNature_Text_Relaxed:
.string "Relaxed$"
Debug_EventScript_ChangeNature_Text_Impish:
.string "Impish$"
Debug_EventScript_ChangeNature_Text_Lax:
.string "Lax$"
Debug_EventScript_ChangeNature_Text_Timid:
.string "Timid$"
Debug_EventScript_ChangeNature_Text_Hasty:
.string "Hasty$"
Debug_EventScript_ChangeNature_Text_Serious:
.string "Serious$"
Debug_EventScript_ChangeNature_Text_Jolly:
.string "Jolly$"
Debug_EventScript_ChangeNature_Text_Naive:
.string "Naive$"
Debug_EventScript_ChangeNature_Text_Modest:
.string "Modest$"
Debug_EventScript_ChangeNature_Text_Mild:
.string "Mild$"
Debug_EventScript_ChangeNature_Text_Quiet:
.string "Quiet$"
Debug_EventScript_ChangeNature_Text_Bashful:
.string "Bashful$"
Debug_EventScript_ChangeNature_Text_Rash:
.string "Rash$"
Debug_EventScript_ChangeNature_Text_Calm:
.string "Calm$"
Debug_EventScript_ChangeNature_Text_Gentle:
.string "Gentle$"
Debug_EventScript_ChangeNature_Text_Sassy:
.string "Sassy$"
Debug_EventScript_ChangeNature_Text_Careful:
.string "Careful$"
Debug_EventScript_ChangeNature_Text_Quirky:
.string "Quirky$"
Debug_EventScript_EWRAMCounters::
callnative CheckEWRAMCounters
msgbox Debug_EventScript_EWRAMCounters_Text, MSGBOX_DEFAULT

View File

@ -563,3 +563,4 @@ gSpecials::
def_special UseBlankMessageToCancelPokemonPic
def_special EnterCode
def_special GetCodeFeedback
def_special SetHiddenNature

View File

@ -345,6 +345,7 @@ extern const u8 Debug_EventScript_FontTest[];
extern const u8 Debug_EventScript_CheckEVs[];
extern const u8 Debug_EventScript_CheckIVs[];
extern const u8 Debug_EventScript_InflictStatus1[];
extern const u8 Debug_EventScript_SetHiddenNature[];
extern const u8 Debug_EventScript_Script_1[];
extern const u8 Debug_EventScript_Script_2[];
extern const u8 Debug_EventScript_Script_3[];
@ -572,6 +573,7 @@ static const struct DebugMenuOption sDebugMenu_Actions_Party[] =
{ COMPOUND_STRING("Hatch an Egg"), DebugAction_ExecuteScript, Debug_HatchAnEgg },
{ COMPOUND_STRING("Heal party"), DebugAction_Party_HealParty },
{ COMPOUND_STRING("Inflict Status1"), DebugAction_ExecuteScript, Debug_EventScript_InflictStatus1 },
{ COMPOUND_STRING("Set Hidden Nature"), DebugAction_ExecuteScript, Debug_EventScript_SetHiddenNature },
{ COMPOUND_STRING("Check EVs"), DebugAction_ExecuteScript, Debug_EventScript_CheckEVs },
{ COMPOUND_STRING("Check IVs"), DebugAction_ExecuteScript, Debug_EventScript_CheckIVs },
{ COMPOUND_STRING("Clear Party"), DebugAction_Party_ClearParty },
@ -3418,7 +3420,7 @@ static void DebugAction_Sound_MUS_SelectId(u8 taskId)
}
}
static const u32 gDebugFollowerNPCGraphics[] =
static const u32 gDebugFollowerNPCGraphics[] =
{
OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL,
OBJ_EVENT_GFX_RIVAL_MAY_NORMAL,

View File

@ -4361,3 +4361,10 @@ void GetCodeFeedback(void)
else
gSpecialVar_Result = 0;
}
void SetHiddenNature(void)
{
u32 hiddenNature = gSpecialVar_Result;
SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_HIDDEN_NATURE, &hiddenNature);
CalculateMonStats(&gPlayerParty[gSpecialVar_0x8004]);
}