mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-25 09:39:00 -05:00
Merge branch 'rando-next' into rando-settings-menu-even-moar-changes
This commit is contained in:
commit
c10693d281
@ -2011,7 +2011,9 @@ namespace SohImGui {
|
||||
);
|
||||
PaddedEnhancementCheckbox("Key Colors Match Dungeon", "gRandoMatchKeyColors", true, false);
|
||||
Tooltip(
|
||||
"Matches the color of small keys and boss keys to the dungeon they belong to. This helps identify keys from afar and adds a little bit of flair.");
|
||||
"Matches the color of small keys and boss keys to the dungeon they belong to. "
|
||||
"This helps identify keys from afar and adds a little bit of flair.\n\nThis only "
|
||||
"applies to seeds with keys and boss keys shuffled to Any Dungeon, Overworld, or Anywhere.");
|
||||
PaddedEnhancementCheckbox("Quest Item Fanfares", "gRandoQuestItemFanfares", true, false);
|
||||
Tooltip(
|
||||
"Play unique fanfares when obtaining quest items "
|
||||
|
@ -875,6 +875,16 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
||||
gSaveContext.randoSettings[index].value = 3;
|
||||
}
|
||||
break;
|
||||
case RSK_GERUDO_KEYS:
|
||||
if (it.value() == "Vanilla") {
|
||||
gSaveContext.randoSettings[index].value = 0;
|
||||
} else if (it.value() == "Any Dungeon") {
|
||||
gSaveContext.randoSettings[index].value = 1;
|
||||
} else if (it.value() == "Overworld") {
|
||||
gSaveContext.randoSettings[index].value = 2;
|
||||
} else if (it.value() == "Anywhere") {
|
||||
gSaveContext.randoSettings[index].value = 3;
|
||||
}
|
||||
case RSK_KEYSANITY:
|
||||
if(it.value() == "Start With") {
|
||||
gSaveContext.randoSettings[index].value = 0;
|
||||
@ -1409,7 +1419,71 @@ s16 Randomizer::GetItemFromGet(RandomizerGet randoGet, GetItemID ogItemId) {
|
||||
return GI_BOTTLE;
|
||||
case RG_BOTTLE_WITH_MILK:
|
||||
return GI_MILK_BOTTLE;
|
||||
|
||||
|
||||
case RG_DEKU_TREE_MAP:
|
||||
case RG_DODONGOS_CAVERN_MAP:
|
||||
case RG_JABU_JABUS_BELLY_MAP:
|
||||
case RG_FOREST_TEMPLE_MAP:
|
||||
case RG_FIRE_TEMPLE_MAP:
|
||||
case RG_WATER_TEMPLE_MAP:
|
||||
case RG_SPIRIT_TEMPLE_MAP:
|
||||
case RG_SHADOW_TEMPLE_MAP:
|
||||
case RG_BOTTOM_OF_THE_WELL_MAP:
|
||||
case RG_ICE_CAVERN_MAP:
|
||||
if (GetRandoSettingValue(RSK_STARTING_MAPS_COMPASSES) < 3) {
|
||||
return GI_MAP;
|
||||
} else {
|
||||
return randoGet;
|
||||
}
|
||||
|
||||
case RG_DEKU_TREE_COMPASS:
|
||||
case RG_DODONGOS_CAVERN_COMPASS:
|
||||
case RG_JABU_JABUS_BELLY_COMPASS:
|
||||
case RG_FOREST_TEMPLE_COMPASS:
|
||||
case RG_FIRE_TEMPLE_COMPASS:
|
||||
case RG_WATER_TEMPLE_COMPASS:
|
||||
case RG_SPIRIT_TEMPLE_COMPASS:
|
||||
case RG_SHADOW_TEMPLE_COMPASS:
|
||||
case RG_BOTTOM_OF_THE_WELL_COMPASS:
|
||||
case RG_ICE_CAVERN_COMPASS:
|
||||
if (GetRandoSettingValue(RSK_STARTING_MAPS_COMPASSES) < 3) {
|
||||
return GI_COMPASS;
|
||||
} else {
|
||||
return randoGet;
|
||||
}
|
||||
|
||||
case RG_FOREST_TEMPLE_BOSS_KEY:
|
||||
case RG_FIRE_TEMPLE_BOSS_KEY:
|
||||
case RG_WATER_TEMPLE_BOSS_KEY:
|
||||
case RG_SPIRIT_TEMPLE_BOSS_KEY:
|
||||
case RG_SHADOW_TEMPLE_BOSS_KEY:
|
||||
case RG_GANONS_CASTLE_BOSS_KEY:
|
||||
if (GetRandoSettingValue(RSK_BOSS_KEYSANITY) < 3) {
|
||||
return GI_KEY_BOSS;
|
||||
} else {
|
||||
return randoGet;
|
||||
}
|
||||
|
||||
case RG_FOREST_TEMPLE_SMALL_KEY:
|
||||
case RG_FIRE_TEMPLE_SMALL_KEY:
|
||||
case RG_WATER_TEMPLE_SMALL_KEY:
|
||||
case RG_SPIRIT_TEMPLE_SMALL_KEY:
|
||||
case RG_SHADOW_TEMPLE_SMALL_KEY:
|
||||
case RG_BOTTOM_OF_THE_WELL_SMALL_KEY:
|
||||
case RG_GERUDO_TRAINING_GROUNDS_SMALL_KEY:
|
||||
case RG_GANONS_CASTLE_SMALL_KEY:
|
||||
if (GetRandoSettingValue(RSK_KEYSANITY) < 3) {
|
||||
return GI_KEY_SMALL;
|
||||
} else {
|
||||
return randoGet;
|
||||
}
|
||||
case RG_GERUDO_FORTRESS_SMALL_KEY:
|
||||
if (GetRandoSettingValue(RSK_GERUDO_KEYS) == 0) {
|
||||
return GI_KEY_SMALL;
|
||||
} else {
|
||||
return randoGet;
|
||||
}
|
||||
|
||||
// todo test this with keys in own dungeon
|
||||
case RG_TREASURE_GAME_SMALL_KEY:
|
||||
return GI_DOOR_KEY;
|
||||
@ -1620,6 +1694,61 @@ bool Randomizer::IsItemVanilla(RandomizerGet randoGet) {
|
||||
case RG_BUY_RED_POTION_40:
|
||||
case RG_BUY_RED_POTION_50:
|
||||
return true;
|
||||
case RG_FOREST_TEMPLE_SMALL_KEY:
|
||||
case RG_FIRE_TEMPLE_SMALL_KEY:
|
||||
case RG_WATER_TEMPLE_SMALL_KEY:
|
||||
case RG_SPIRIT_TEMPLE_SMALL_KEY:
|
||||
case RG_SHADOW_TEMPLE_SMALL_KEY:
|
||||
case RG_BOTTOM_OF_THE_WELL_SMALL_KEY:
|
||||
case RG_GERUDO_TRAINING_GROUNDS_SMALL_KEY:
|
||||
case RG_GANONS_CASTLE_SMALL_KEY:
|
||||
if (GetRandoSettingValue(RSK_KEYSANITY) > 2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case RG_GERUDO_FORTRESS_SMALL_KEY:
|
||||
if (GetRandoSettingValue(RSK_GERUDO_KEYS) != 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case RG_FOREST_TEMPLE_BOSS_KEY:
|
||||
case RG_FIRE_TEMPLE_BOSS_KEY:
|
||||
case RG_WATER_TEMPLE_BOSS_KEY:
|
||||
case RG_SPIRIT_TEMPLE_BOSS_KEY:
|
||||
case RG_SHADOW_TEMPLE_BOSS_KEY:
|
||||
if (GetRandoSettingValue(RSK_BOSS_KEYSANITY) > 2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case RG_GANONS_CASTLE_BOSS_KEY:
|
||||
if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) > 2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case RG_DEKU_TREE_COMPASS:
|
||||
case RG_DODONGOS_CAVERN_COMPASS:
|
||||
case RG_JABU_JABUS_BELLY_COMPASS:
|
||||
case RG_FOREST_TEMPLE_COMPASS:
|
||||
case RG_FIRE_TEMPLE_COMPASS:
|
||||
case RG_WATER_TEMPLE_COMPASS:
|
||||
case RG_SPIRIT_TEMPLE_COMPASS:
|
||||
case RG_SHADOW_TEMPLE_COMPASS:
|
||||
case RG_BOTTOM_OF_THE_WELL_COMPASS:
|
||||
case RG_ICE_CAVERN_COMPASS:
|
||||
case RG_DEKU_TREE_MAP:
|
||||
case RG_DODONGOS_CAVERN_MAP:
|
||||
case RG_JABU_JABUS_BELLY_MAP:
|
||||
case RG_FOREST_TEMPLE_MAP:
|
||||
case RG_FIRE_TEMPLE_MAP:
|
||||
case RG_WATER_TEMPLE_MAP:
|
||||
case RG_SPIRIT_TEMPLE_MAP:
|
||||
case RG_SHADOW_TEMPLE_MAP:
|
||||
case RG_BOTTOM_OF_THE_WELL_MAP:
|
||||
case RG_ICE_CAVERN_MAP:
|
||||
if (GetRandoSettingValue(RSK_STARTING_MAPS_COMPASSES) > 2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -1690,6 +1690,28 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
||||
}
|
||||
return ITEM_NONE;
|
||||
} else if (item == ITEM_KEY_SMALL) {
|
||||
// Small key exceptions for rando with keysanity off.
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (globalCtx->sceneNum == 10) { // ganon's tower -> ganon's castle
|
||||
if (gSaveContext.inventory.dungeonKeys[13] < 0) {
|
||||
gSaveContext.inventory.dungeonKeys[13] = 1;
|
||||
return ITEM_NONE;
|
||||
} else {
|
||||
gSaveContext.inventory.dungeonKeys[13]++;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (globalCtx->sceneNum == 92) { // Desert Colossus -> Spirit Temple.
|
||||
if (gSaveContext.inventory.dungeonKeys[6] < 0) {
|
||||
gSaveContext.inventory.dungeonKeys[6] = 1;
|
||||
return ITEM_NONE;
|
||||
} else {
|
||||
gSaveContext.inventory.dungeonKeys[6]++;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] < 0) {
|
||||
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] = 1;
|
||||
return ITEM_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user