mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
No option, zero option
This commit is contained in:
parent
5993c79906
commit
a440c5dbf7
13 changed files with 38 additions and 92 deletions
|
@ -159,11 +159,6 @@ static void ValidateOtherEntrance(GetAccessibleLocationsStruct& gals) {
|
|||
ApplyStartingInventory(); // RANDOTODO when proper ammo logic is done, this could be moved to the start
|
||||
}
|
||||
}
|
||||
// If we are not shuffling the guard house, add the key so we can properly check for poe merchant access
|
||||
if (gals.validatedStartingRegion && gals.foundTempleOfTime &&
|
||||
ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_OFF)) {
|
||||
Rando::StaticData::RetrieveItem(RG_GUARD_HOUSE_KEY).ApplyEffect();
|
||||
}
|
||||
}
|
||||
|
||||
// Apply all items that are necessary for checking all location access
|
||||
|
@ -180,10 +175,7 @@ static void ApplyAllAdvancmentItems() {
|
|||
static void ValidateSphereZero(GetAccessibleLocationsStruct& gals) {
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
// Condition for verifying everything required for sphere 0, expanding search to all locations
|
||||
if ((!logic->AreCheckingBigPoes || logic->CanEmptyBigPoes) && gals.validatedStartingRegion &&
|
||||
gals.foundTempleOfTime && gals.haveTimeAccess) {
|
||||
// stop checking for big poes
|
||||
logic->AreCheckingBigPoes = false;
|
||||
if (gals.validatedStartingRegion && gals.foundTempleOfTime && gals.haveTimeAccess) {
|
||||
// Apply all items that are necessary for checking all location access
|
||||
ApplyAllAdvancmentItems();
|
||||
// Reset access as the non-starting age
|
||||
|
@ -213,7 +205,7 @@ void ProcessExits(Region* region, GetAccessibleLocationsStruct& gals, Randomizer
|
|||
// Update Time of Day Access for the exit
|
||||
if (UpdateToDAccess(&exit, exitRegion)) {
|
||||
gals.logicUpdated = true;
|
||||
if (!gals.sphereZeroComplete || logic->AreCheckingBigPoes) {
|
||||
if (!gals.sphereZeroComplete) {
|
||||
if (!gals.foundTempleOfTime || !gals.validatedStartingRegion) {
|
||||
ValidateOtherEntrance(gals);
|
||||
}
|
||||
|
@ -596,15 +588,12 @@ bool CheckBeatable(RandomizerGet ignore /* = RG_NONE*/) {
|
|||
}
|
||||
|
||||
// Check if the currently randomised set of entrances is a valid game map.
|
||||
void ValidateEntrances(bool checkPoeCollectorAccess, bool checkOtherEntranceAccess) {
|
||||
void ValidateEntrances(bool checkOtherEntranceAccess) {
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
GetAccessibleLocationsStruct gals(0);
|
||||
ResetLogic(ctx, gals, !checkOtherEntranceAccess);
|
||||
|
||||
ctx->allLocationsReachable = false;
|
||||
if (checkPoeCollectorAccess && !ctx->GetOption(RSK_SKIP_BOTTLING_BIG_POES)) {
|
||||
logic->AreCheckingBigPoes = true;
|
||||
}
|
||||
|
||||
if (checkOtherEntranceAccess) {
|
||||
gals.foundTempleOfTime = false;
|
||||
|
@ -620,13 +609,6 @@ void ValidateEntrances(bool checkPoeCollectorAccess, bool checkOtherEntranceAcce
|
|||
RegionTable(RR_ROOT)->adultNight = true;
|
||||
RegionTable(RR_ROOT)->childDay = true;
|
||||
RegionTable(RR_ROOT)->adultDay = true;
|
||||
} else if (checkPoeCollectorAccess) {
|
||||
// If we are not shuffling the guard house, add the key so we can properly check for poe merchant access
|
||||
if (ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_OFF)) {
|
||||
Rando::StaticData::RetrieveItem(RG_GUARD_HOUSE_KEY).ApplyEffect();
|
||||
}
|
||||
RegionTable(RR_ROOT)->adultNight = true;
|
||||
RegionTable(RR_ROOT)->adultDay = true;
|
||||
} else {
|
||||
ApplyAllAdvancmentItems();
|
||||
}
|
||||
|
|
|
@ -72,4 +72,4 @@ void GeneratePlaythrough();
|
|||
|
||||
bool CheckBeatable(RandomizerGet ignore = RG_NONE);
|
||||
|
||||
void ValidateEntrances(bool checkPoeCollectorAccess, bool checkOtherEntranceAccess);
|
||||
void ValidateEntrances(bool checkOtherEntranceAccess);
|
||||
|
|
|
@ -273,8 +273,8 @@ std::vector<std::pair<RandomizerCheck, std::function<bool()>>> conditionalAlways
|
|||
std::make_pair(RC_MARKET_10_BIG_POES,
|
||||
[]() {
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
return ctx->GetOption(RSK_BIG_POE_COUNT).Get() >= 3 && !ctx->GetOption(RSK_BIG_POES_HINT);
|
||||
}), // Remember, the option's value being 3 means 4 are required
|
||||
return ctx->GetOption(RSK_BIG_POE_COUNT).Get() > 3 && !ctx->GetOption(RSK_BIG_POES_HINT);
|
||||
}),
|
||||
std::make_pair(RC_DEKU_THEATER_MASK_OF_TRUTH,
|
||||
[]() {
|
||||
auto ctx = Rando::Context::GetInstance();
|
||||
|
|
|
@ -441,12 +441,6 @@ static bool ValidateWorld(Entrance* entrancePlaced) {
|
|||
type = entrancePlaced->GetType();
|
||||
}
|
||||
|
||||
bool checkPoeCollectorAccess =
|
||||
(ctx->GetOption(RSK_SHUFFLE_OVERWORLD_ENTRANCES) ||
|
||||
ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_ALL)) &&
|
||||
(entrancePlaced == nullptr || ctx->GetOption(RSK_MIXED_ENTRANCE_POOLS) || type == EntranceType::Interior ||
|
||||
type == EntranceType::SpecialInterior || type == EntranceType::Overworld || type == EntranceType::Spawn ||
|
||||
type == EntranceType::WarpSong || type == EntranceType::OwlDrop);
|
||||
bool checkOtherEntranceAccess =
|
||||
(ctx->GetOption(RSK_SHUFFLE_OVERWORLD_ENTRANCES) ||
|
||||
ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_ALL) ||
|
||||
|
@ -459,7 +453,7 @@ static bool ValidateWorld(Entrance* entrancePlaced) {
|
|||
// Conditions will be checked during the search and any that fail will be figured out
|
||||
// afterwards
|
||||
ctx->GetLogic()->Reset();
|
||||
ValidateEntrances(checkPoeCollectorAccess, checkOtherEntranceAccess);
|
||||
ValidateEntrances(checkOtherEntranceAccess);
|
||||
|
||||
if (!ctx->GetOption(RSK_DECOUPLED_ENTRANCES)) {
|
||||
// Unless entrances are decoupled, we don't want the player to end up through certain entrances as the wrong age
|
||||
|
@ -544,15 +538,6 @@ static bool ValidateWorld(Entrance* entrancePlaced) {
|
|||
}
|
||||
}
|
||||
|
||||
// The Big Poe shop should always be accessible as adult without the need to use any bottles
|
||||
// This is important to ensure that players can never lock their only bottles by filling them with Big Poes they
|
||||
// can't sell
|
||||
if (checkPoeCollectorAccess) {
|
||||
if (!RegionTable(RR_MARKET_GUARD_HOUSE)->Adult()) {
|
||||
SPDLOG_DEBUG("Big Poe Shop access is not guarenteed as adult\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
SPDLOG_DEBUG("All Locations NOT REACHABLE\n");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1081,7 +1081,6 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
|||
break;
|
||||
}
|
||||
case VB_BOTTLE_BIG_POE: {
|
||||
if (RAND_GET_OPTION(RSK_SKIP_BOTTLING_BIG_POES)) {
|
||||
EnPoField* enPoe = va_arg(args, EnPoField*);
|
||||
enPoe->actor.textId = 0x508F;
|
||||
Flags_SetSwitch(gPlayState, enPoe->actor.params & 0xFF);
|
||||
|
@ -1090,13 +1089,11 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
|||
HIGH_SCORE(HS_POE_POINTS) = 1100;
|
||||
}
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_SELL_POES_TO_POE_COLLECTOR: {
|
||||
if (!Flags_GetRandomizerInf(RAND_INF_10_BIG_POES) && HIGH_SCORE(HS_POE_POINTS) >= 1000) {
|
||||
EnGb* enGb = va_arg(args, EnGb*);
|
||||
if (RAND_GET_OPTION(RSK_SKIP_BOTTLING_BIG_POES) && !Flags_GetRandomizerInf(RAND_INF_10_BIG_POES) &&
|
||||
HIGH_SCORE(HS_POE_POINTS) >= 1000) {
|
||||
enGb->textId = 0x70F8;
|
||||
Message_ContinueTextbox(gPlayState, enGb->textId);
|
||||
enGb->actionFunc = func_80A2FB40;
|
||||
|
|
|
@ -379,9 +379,6 @@ void RegionTable_Init() {
|
|||
areaTable[RR_ROOT] = Region("Root", "", {RA_LINKS_POCKET}, NO_DAY_NIGHT_CYCLE, {
|
||||
//Events
|
||||
EventAccess(&logic->KakarikoVillageGateOpen, []{return ctx->GetOption(RSK_KAK_GATE).Is(RO_KAK_GATE_OPEN);}),
|
||||
//The big poes bottle softlock safety check does not account for the guard house lock if the guard house is not shuffled, so the key is needed before we can safely allow bottle use in logic
|
||||
//RANDOTODO a setting that lets you drink/dump big poes so we don't need this logic
|
||||
EventAccess(&logic->CouldEmptyBigPoes, []{return !ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_OFF) || logic->CanOpenOverworldDoor(RG_GUARD_HOUSE_KEY);}),
|
||||
}, {
|
||||
//Locations
|
||||
LOCATION(RC_LINKS_POCKET, true),
|
||||
|
|
|
@ -54,7 +54,7 @@ void RegionTable_Init_Market() {
|
|||
EventAccess(&logic->CanEmptyBigPoes, []{return logic->IsAdult;}),
|
||||
}, {
|
||||
//Locations
|
||||
LOCATION(RC_MARKET_10_BIG_POES, logic->IsAdult && (logic->BigPoeKill || logic->BigPoes > ctx->GetOption(RSK_BIG_POE_COUNT).Get())),
|
||||
LOCATION(RC_MARKET_10_BIG_POES, logic->IsAdult && (logic->BigPoeKill || logic->BigPoes >= ctx->GetOption(RSK_BIG_POE_COUNT).Get())),
|
||||
LOCATION(RC_MARKET_GS_GUARD_HOUSE, logic->IsChild),
|
||||
LOCATION(RC_MK_GUARD_HOUSE_CHILD_POT_1, logic->IsChild && logic->CanBreakPots()),
|
||||
LOCATION(RC_MK_GUARD_HOUSE_CHILD_POT_2, logic->IsChild && logic->CanBreakPots()),
|
||||
|
|
|
@ -1011,7 +1011,6 @@ Logic::Logic() {
|
|||
|
||||
uint8_t Logic::BottleCount() {
|
||||
uint8_t count = 0;
|
||||
if (CouldEmptyBigPoes && !AreCheckingBigPoes) {
|
||||
for (int i = SLOT_BOTTLE_1; i <= SLOT_BOTTLE_4; i++) {
|
||||
uint8_t item = GetSaveContext()->inventory.items[i];
|
||||
switch (item) {
|
||||
|
@ -1032,7 +1031,6 @@ uint8_t Logic::BottleCount() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -2407,7 +2405,6 @@ void Logic::Reset() {
|
|||
Bottles = 0;
|
||||
NumBottles = 0;
|
||||
CanEmptyBigPoes = false;
|
||||
CouldEmptyBigPoes = false;
|
||||
|
||||
// Drops and Bottle Contents Access
|
||||
NutPot = false;
|
||||
|
|
|
@ -66,12 +66,6 @@ class Logic {
|
|||
uint8_t NumBottles = 0;
|
||||
// this event covers if the player can currently empty big poes in logic
|
||||
bool CanEmptyBigPoes = false;
|
||||
// this event covers if the player could, if they filled their bottle with big poes in field, empty them at the poe
|
||||
// merchant. Works in tandem with the big poes safety check during entrance validation
|
||||
bool CouldEmptyBigPoes = false;
|
||||
// this check is used to tell logic that we are checking big poes accessibility in logic, to ensure it's not
|
||||
// bottle-locked.
|
||||
bool AreCheckingBigPoes = false;
|
||||
|
||||
// Drops and Bottle Contents Access
|
||||
bool NutPot = false;
|
||||
|
|
|
@ -595,8 +595,6 @@ void Settings::CreateOptionDescriptions() {
|
|||
"rewards on slider does not change.";
|
||||
mOptionDescriptions[RSK_CUCCO_COUNT] = "The amount of cuccos needed to claim the reward from Anju the Cucco Lady.";
|
||||
mOptionDescriptions[RSK_BIG_POE_COUNT] = "The Poe collector will give a reward for turning in this many Big Poes.";
|
||||
mOptionDescriptions[RSK_SKIP_BOTTLING_BIG_POES] =
|
||||
"Collecting big poes will not fill a bottle, but still require a bottle.";
|
||||
mOptionDescriptions[RSK_SKIP_CHILD_STEALTH] =
|
||||
"The crawlspace into Hyrule Castle goes straight to Zelda, skipping the guards.";
|
||||
mOptionDescriptions[RSK_SKIP_CHILD_ZELDA] =
|
||||
|
|
|
@ -5797,7 +5797,6 @@ typedef enum {
|
|||
RSK_SHUFFLE_CHEST_MINIGAME,
|
||||
RSK_CUCCO_COUNT,
|
||||
RSK_BIG_POE_COUNT,
|
||||
RSK_SKIP_BOTTLING_BIG_POES,
|
||||
RSK_SKIP_EPONA_RACE,
|
||||
RSK_COMPLETE_MASK_QUEST,
|
||||
RSK_SKIP_SCARECROWS_SONG,
|
||||
|
|
|
@ -334,7 +334,7 @@ extern "C" void Randomizer_InitSaveFile() {
|
|||
Flags_SetRandomizerInf(RAND_INF_TOT_MASTER_SWORD);
|
||||
}
|
||||
|
||||
HIGH_SCORE(HS_POE_POINTS) = 1000 - (100 * (Randomizer_GetSettingValue(RSK_BIG_POE_COUNT) + 1));
|
||||
HIGH_SCORE(HS_POE_POINTS) = 1000 - (100 * Randomizer_GetSettingValue(RSK_BIG_POE_COUNT));
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_SKIP_EPONA_RACE)) {
|
||||
Flags_SetEventChkInf(EVENTCHKINF_EPONA_OBTAINED);
|
||||
|
|
|
@ -268,8 +268,7 @@ void Settings::CreateOptions() {
|
|||
OPT_BOOL(RSK_SKIP_CHILD_ZELDA, "Skip Child Zelda", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipChildZelda"), mOptionDescriptions[RSK_SKIP_CHILD_ZELDA], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
OPT_BOOL(RSK_SKIP_EPONA_RACE, "Skip Epona Race", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipEponaRace"), mOptionDescriptions[RSK_SKIP_EPONA_RACE], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP);
|
||||
OPT_BOOL(RSK_SKIP_SCARECROWS_SONG, "Skip Scarecrow's Song", CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), mOptionDescriptions[RSK_SKIP_SCARECROWS_SONG]);
|
||||
OPT_U8(RSK_BIG_POE_COUNT, "Big Poe Target Count", {NumOpts(1, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), mOptionDescriptions[RSK_BIG_POE_COUNT], WidgetType::Slider, 9);
|
||||
OPT_BOOL(RSK_SKIP_BOTTLING_BIG_POES, "Skip Bottling Big Poes",CVAR_RANDOMIZER_SETTING("SkipBottlingBigPoes"), mOptionDescriptions[RSK_SKIP_BOTTLING_BIG_POES]);
|
||||
OPT_U8(RSK_BIG_POE_COUNT, "Big Poe Target Count", {NumOpts(0, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), mOptionDescriptions[RSK_BIG_POE_COUNT], WidgetType::Slider, 10);
|
||||
OPT_U8(RSK_CUCCO_COUNT, "Cuccos to return", {NumOpts(0, 7)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("CuccosToReturn"), mOptionDescriptions[RSK_CUCCO_COUNT], WidgetType::Slider, 7);
|
||||
OPT_BOOL(RSK_COMPLETE_MASK_QUEST, "Complete Mask Quest", CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), mOptionDescriptions[RSK_COMPLETE_MASK_QUEST]);
|
||||
OPT_U8(RSK_GOSSIP_STONE_HINTS, "Gossip Stone Hints", {"No Hints", "Need Nothing", "Mask of Truth", "Stone of Agony"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GossipStoneHints"), mOptionDescriptions[RSK_GOSSIP_STONE_HINTS], WidgetType::Combobox, RO_GOSSIP_STONES_NEED_NOTHING, false, IMFLAG_NONE);
|
||||
|
@ -1312,9 +1311,8 @@ void Settings::CreateOptions() {
|
|||
WidgetContainerType::TABLE);
|
||||
mOptionGroups[RSG_TIMESAVERS_IMGUI] = OptionGroup::SubGroup(
|
||||
"Timesavers",
|
||||
{ &mOptions[RSK_CUCCO_COUNT], &mOptions[RSK_BIG_POE_COUNT], &mOptions[RSK_SKIP_BOTTLING_BIG_POES],
|
||||
&mOptions[RSK_SKIP_CHILD_ZELDA], &mOptions[RSK_SKIP_EPONA_RACE], &mOptions[RSK_COMPLETE_MASK_QUEST],
|
||||
&mOptions[RSK_SKIP_SCARECROWS_SONG] },
|
||||
{ &mOptions[RSK_CUCCO_COUNT], &mOptions[RSK_BIG_POE_COUNT], &mOptions[RSK_SKIP_CHILD_ZELDA],
|
||||
&mOptions[RSK_SKIP_EPONA_RACE], &mOptions[RSK_COMPLETE_MASK_QUEST], &mOptions[RSK_SKIP_SCARECROWS_SONG] },
|
||||
WidgetContainerType::COLUMN);
|
||||
mOptionGroups[RSG_ITEM_POOL_HINTS_IMGUI] = OptionGroup::SubGroup("",
|
||||
{
|
||||
|
@ -1579,7 +1577,6 @@ void Settings::CreateOptions() {
|
|||
&mOptions[RSK_SKIP_EPONA_RACE],
|
||||
&mOptions[RSK_SKIP_SCARECROWS_SONG],
|
||||
&mOptions[RSK_BIG_POE_COUNT],
|
||||
&mOptions[RSK_SKIP_BOTTLING_BIG_POES],
|
||||
&mOptions[RSK_CUCCO_COUNT],
|
||||
&mOptions[RSK_COMPLETE_MASK_QUEST],
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue