diff --git a/soh/include/z64save.h b/soh/include/z64save.h index d44a703df..e6d27da5e 100644 --- a/soh/include/z64save.h +++ b/soh/include/z64save.h @@ -369,7 +369,7 @@ typedef enum { #define EVENTCHKINF_16 0x16 #define EVENTCHKINF_EPONA_OBTAINED 0x18 #define EVENTCHKINF_1B 0x1B -#define EVENTCHKINF_1C 0x1C +#define EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH 0x1C #define EVENTCHKINF_1D 0x1D #define EVENTCHKINF_1E 0x1E #define EVENTCHKINF_20 0x20 diff --git a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index d42458235..094e00113 100644 --- a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -568,6 +568,8 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) { if (gSaveContext.n64ddFlag) { play->nextEntranceIndex = 0x0457; gSaveContext.nextCutsceneIndex = 0; + // Skip Mido complaining about dead Deku tree + Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH); } else { Item_Give(play, ITEM_KOKIRI_EMERALD); play->nextEntranceIndex = 0xEE; diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c index 21bd913e7..b4b4a7b07 100644 --- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -372,8 +372,11 @@ u16 EnMd_GetTextKokiriForest(PlayState* play, EnMd* this) { this->unk_208 = 0; this->unk_209 = TEXT_STATE_NONE; - // In rando, skip talking about the tree being dead so we can have the prompt sword and shield instead - if (!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) { + // In rando, skip talking about the tree being dead so we can have the prompt for sword and shield instead + if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) || + (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) && + Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) && + !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH))) { return 0x1045; } @@ -492,6 +495,7 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) { } if (Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) && + Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH) && (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) || Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD))) { return play->sceneNum == SCENE_KOKIRI_HOME4 && !LINK_IS_ADULT; @@ -677,7 +681,8 @@ void EnMd_Init(Actor* thisx, PlayState* play) { if (((play->sceneNum == SCENE_SPOT04) && !(gSaveContext.eventChkInf[0] & 0x10)) || ((play->sceneNum == SCENE_SPOT04) && (gSaveContext.eventChkInf[0] & 0x10) && - CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) || + ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) || + (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE)))) || ((play->sceneNum == SCENE_SPOT10) && !(gSaveContext.eventChkInf[0] & 0x400))) { this->actor.home.pos = this->actor.world.pos; this->actionFunc = func_80AAB948; @@ -738,7 +743,9 @@ void func_80AAB948(EnMd* this, PlayState* play) { } if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) && + if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || + gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) && + Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) && !(gSaveContext.eventChkInf[1] & 0x1000) && (play->sceneNum == SCENE_SPOT04)) { play->msgCtx.msgMode = MSGMODE_PAUSED; } @@ -805,7 +812,9 @@ void func_80AABD0C(EnMd* this, PlayState* play) { return; } - if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) && + if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || + gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) && + Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) && !(gSaveContext.eventChkInf[1] & 0x1000) && (play->sceneNum == SCENE_SPOT04)) { Message_CloseTextbox(play); gSaveContext.eventChkInf[1] |= 0x1000;