diff --git a/mods/randomizer/res/tex1_608x100_0c1c70378fb8cb46_6.png b/mods/randomizer/res/tex1_608x100_0c1c70378fb8cb46_6.png index 35027569b7..f62d80eec6 100644 Binary files a/mods/randomizer/res/tex1_608x100_0c1c70378fb8cb46_6.png and b/mods/randomizer/res/tex1_608x100_0c1c70378fb8cb46_6.png differ diff --git a/mods/randomizer/src/hooks.cpp b/mods/randomizer/src/hooks.cpp index 8bf740b603..182b71c8b3 100644 --- a/mods/randomizer/src/hooks.cpp +++ b/mods/randomizer/src/hooks.cpp @@ -1367,7 +1367,48 @@ HookAction hookPreGetLayerNo(ModContext*, void* args, void* retval, void*) { } } - return HOOK_CONTINUE; + if (layer == 14) { + // Warped meteor to Zora's Domain + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[65])) { + // Stage is Zora's River, Zora's Domain, Lake Hylia, Castle Town, Telma's Bar, R_SP115, + // Hyrule Field, Upper Zora's River, or Outside Castle Town + if (!strcmp(i_stageName, "F_SP112") || !strcmp(i_stageName, "F_SP113") || + !strcmp(i_stageName, "F_SP115") || !strcmp(i_stageName, "F_SP116") || + (!strcmp(i_stageName, "R_SP116") && i_roomNo == 5) || + !strcmp(i_stageName, "R_SP115") || !strcmp(i_stageName, "F_SP121") || + !strcmp(i_stageName, "F_SP126") || !strcmp(i_stageName, "F_SP122")) + { + // Stage is Hyrule Field + if (!strcmp(i_stageName, "F_SP121")) { + if (i_roomNo >= 9 && i_roomNo <= 14) { + layer = 13; + } + } else { + layer = 13; + } + } + } + + // Stage is Hyrule Castle Sewers and room is Prison Cell + if (!strcmp(i_stageName, "R_SP107") && i_roomNo == 0) { + // Haven't been to Hyrule Castle Sewers + if (!dComIfGs_isEventBit(0x4D08)) { + layer = 11; + } + } + // Stage and room is Zant Throne Room + else if (!strcmp(i_stageName, "D_MN08A") && i_roomNo == 10) + { + // Defeated Zant + if (dComIfGs_isEventBit(0x5410)) { + layer = 1; + } else { + layer = 0; + } + } + } + + return HOOK_SKIP_ORIGINAL; } HookAction hookPreOnStageSwitch(ModContext*, void* args, void* retval, void*) {