Add warp portals to item pool

This commit is contained in:
gymnast86
2026-04-15 15:36:20 -07:00
parent bab1cda97a
commit 2c6d0b11dd
3 changed files with 110 additions and 1 deletions
+5
View File
@@ -2083,7 +2083,12 @@ BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no) {
}
void dComIfGs_onStageSwitch(int i_stageNo, int i_no) {
#if TARGET_PC
// Avoid trying to get the save table if stag info is NULL
if (dComIfGp_getStageStagInfo() && i_stageNo == dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo())) {
#else
if (i_stageNo == dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo())) {
#endif
dComIfGs_onSwitch(i_no, -1);
}
+61
View File
@@ -546,6 +546,67 @@
Importance: Minor
Id: 0x84
- Name: Ordon Spring Portal
Importance: Major
Id: 0x14
- Name: South Faron Portal
Importance: Major
Id: 0x15
- Name: North Faron Portal
Importance: Major
Id: 0x3C
- Name: Sacred Grove Portal
Importance: Major
Id: 0xBF
- Name: Kakariko Gorge Portal
Importance: Major
Id: 0x4D
- Name: Kakariko Village Portal
Importance: Major
Id: 0x4E
- Name: Death Mountain Portal
Importance: Major
Id: 0x52
- Name: Bridge of Eldin Portal
Importance: Major
Id: 0xE8
- Name: Castle Town Portal
Importance: Major
Id: 0xB1
- Name: Upper Zoras River Portal
Importance: Major
Id: 0xF7
- Name: Zoras Domain Portal
Importance: Major
Id: 0x57
- Name: Lake Hylia Portal
Importance: Major
Id: 0x8F
- Name: Gerudo Desert Portal
Importance: Major
Id: 0x3B
- Name: Mirror Chamber Portal
Importance: Major
Id: 0xAE
- Name: Snowpeak Portal
Importance: Major
Id: 0xAF
# Dummy Items that are used to represent other logical states (for now)
- Name: Game Beatable
+44 -1
View File
@@ -111,6 +111,22 @@ namespace randomizer::logic::item_pool
{"Palace of Twilight Dungeon Map", 1},
{"Hyrule Castle Dungeon Map", 1},
// Warp Portals
{"Ordon Spring Portal", 1},
{"South Faron Portal", 1},
{"North Faron Portal", 1},
{"Kakariko Gorge Portal", 1},
{"Kakariko Village Portal", 1},
{"Death Mountain Portal", 1},
{"Bridge of Eldin Portal", 1},
{"Zoras Domain Portal", 1},
{"Lake Hylia Portal", 1},
{"Castle Town Portal", 1},
{"Upper Zoras River Portal", 1},
{"Snowpeak Portal", 1},
{"Gerudo Desert Portal", 1},
{"Mirror Chamber Portal", 1},
// Junk we should always have
{"Purple Rupee Links House", 1},
{"Green Rupee", 2},
@@ -352,6 +368,33 @@ namespace randomizer::logic::item_pool
}
}
// Handle warp portals
startingItems["Ordon Spring Portal"] = 1;
if (world->Setting("Faron Twilight Cleared") == "On")
{
startingItems["South Faron Portal"] = 1;
startingItems["North Faron Portal"] = 1;
}
if (world->Setting("Eldin Twilight Cleared") == "On")
{
startingItems["Kakariko Gorge Portal"] = 1;
startingItems["Kakariko Village Portal"] = 1;
startingItems["Death Mountain Portal"] = 1;
}
if (world->Setting("Lanayru Twilight Cleared") == "On")
{
startingItems["Zoras Domain Portal"] = 1;
startingItems["Lake Hylia Portal"] = 1;
startingItems["Castle Town Portal"] = 1;
}
if (world->Setting("Snowpeak Does Not Require Reekfish Scent") == "On")
{
startingItems["Snowpeak Portal"] = 1;
}
// Add each item to the world's _startingItemPool and erase it from the regular _itemPool
for (const auto& [itemName, count] : startingItems)
{
@@ -360,7 +403,7 @@ namespace randomizer::logic::item_pool
{
startingItemPool.push_back(item);
}
randomizer::utility::container::Erase(itemPool, item, count);
utility::container::Erase(itemPool, item, count);
}
}