Fix any dungeon location pool and fire boss door logic (#4480)

* fix any dungeon location pool and fire boss door logic

* Make GetDungeonLocations consistent

* add All to name
This commit is contained in:
Pepper0ni 2024-10-26 01:51:50 +01:00 committed by GitHub
parent 6ca55aadbd
commit 7f4bd3e98c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 19 deletions

View File

@ -1041,8 +1041,7 @@ static void RandomizeDungeonItems() {
auto ctx = Rando::Context::GetInstance(); auto ctx = Rando::Context::GetInstance();
//Get Any Dungeon and Overworld group locations //Get Any Dungeon and Overworld group locations
std::vector<RandomizerCheck> anyDungeonLocations = Rando::StaticData::GetDungeonLocations(); std::vector<RandomizerCheck> anyDungeonLocations = Rando::StaticData::GetAllDungeonLocations();
//Rando::StaticData::GetOverworldLocations() defined in item_location.cpp
//Create Any Dungeon and Overworld item pools //Create Any Dungeon and Overworld item pools
std::vector<RandomizerGet> anyDungeonItems; std::vector<RandomizerGet> anyDungeonItems;

View File

@ -404,9 +404,9 @@ void RegionTable_Init_FireTemple() {
//Exits //Exits
Entrance(RR_FIRE_TEMPLE_MQ_FIRST_ROOM_UPPER, {[]{return true;}}), Entrance(RR_FIRE_TEMPLE_MQ_FIRST_ROOM_UPPER, {[]{return true;}}),
Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, {[]{return logic->HasItem(RG_FIRE_TEMPLE_BOSS_KEY) && logic->FireTimer() >= 15 && Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, {[]{return logic->HasItem(RG_FIRE_TEMPLE_BOSS_KEY) && logic->FireTimer() >= 15 &&
(logic->IsAdult && (ctx->GetTrickOption(RT_FIRE_BOSS_DOOR_JUMP) || logic->CanUse(RG_HOVER_BOOTS))) || ((logic->IsAdult && (ctx->GetTrickOption(RT_FIRE_BOSS_DOOR_JUMP) || logic->CanUse(RG_HOVER_BOOTS))) ||
(logic->IsAdult && logic->HitFireTemplePlatform) || (logic->IsAdult && logic->HitFireTemplePlatform) ||
(logic->HitFireTemplePlatform && logic->CanUse(RG_HOVER_BOOTS)) (logic->HitFireTemplePlatform && logic->CanUse(RG_HOVER_BOOTS)))
;}}), ;}}),
}); });

View File

@ -136,9 +136,7 @@ void Context::GenerateLocationPool() {
AddLocations(mFishsanity->GetFishsanityLocations().first); AddLocations(mFishsanity->GetFishsanityLocations().first);
} }
for (const auto dungeon : mDungeons->GetDungeonList()) { AddLocations(StaticData::GetAllDungeonLocations());
AddLocations(dungeon->GetDungeonLocations());
}
} }
void Context::AddExcludedOptions() { void Context::AddExcludedOptions() {

View File

@ -1,6 +1,7 @@
#include "static_data.h" #include "static_data.h"
#include "z64save.h" #include "z64save.h"
#include "context.h" #include "context.h"
#include "dungeon.h"
#define TWO_ACTOR_PARAMS(a, b) (abs(a) << 16) | abs(b) #define TWO_ACTOR_PARAMS(a, b) (abs(a) << 16) | abs(b)
@ -117,18 +118,14 @@ std::vector<RandomizerCheck> Rando::StaticData::GetOverworldLocations() {
return overworldLocations; return overworldLocations;
} }
std::vector<RandomizerCheck> Rando::StaticData::GetDungeonLocations() { std::vector<RandomizerCheck> Rando::StaticData::GetAllDungeonLocations() {
std::vector<RandomizerCheck> overworldLocations = {}; auto ctx = Rando::Context::GetInstance();
for (Location& location : locationTable) { std::vector<RandomizerCheck> dungeonLocations;
if ( for (const auto dungeon : ctx->GetDungeons()->GetDungeonList()) {
location.IsDungeon() && std::vector<RandomizerCheck> dungeonLoc = dungeon->GetDungeonLocations();
location.GetRCType() != RCTYPE_STATIC_HINT && dungeonLocations.insert(dungeonLocations.end(), dungeonLoc.begin(), dungeonLoc.end());
location.GetRCType() != RCTYPE_GOSSIP_STONE //don't put items on hints
) {
overworldLocations.push_back(location.GetRandomizerCheck());
} }
} return dungeonLocations;
return overworldLocations;
} }
void Rando::StaticData::InitLocationTable() { // Randomizer Check Quest Type Area Actor ID Scene ID Params Flags Short Name Hint Text Key Vanilla Item Spoiler Collection Check Vanilla Progression Price void Rando::StaticData::InitLocationTable() { // Randomizer Check Quest Type Area Actor ID Scene ID Params Flags Short Name Hint Text Key Vanilla Item Spoiler Collection Check Vanilla Progression Price

View File

@ -36,7 +36,7 @@ class StaticData {
static std::unordered_map<std::string, uint32_t> PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input); static std::unordered_map<std::string, uint32_t> PopulateTranslationMap(std::unordered_map<uint32_t, RandomizerHintTextKey> input);
static std::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> CheckFromActorMultimap; static std::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> CheckFromActorMultimap;
static std::vector<RandomizerCheck> GetOverworldLocations(); static std::vector<RandomizerCheck> GetOverworldLocations();
static std::vector<RandomizerCheck> GetDungeonLocations(); static std::vector<RandomizerCheck> GetAllDungeonLocations();
static std::vector<RandomizerCheck> dungeonRewardLocations; static std::vector<RandomizerCheck> dungeonRewardLocations;
static std::vector<RandomizerCheck> GetShopLocations(); static std::vector<RandomizerCheck> GetShopLocations();
static std::vector<RandomizerCheck> GetScrubLocations(); static std::vector<RandomizerCheck> GetScrubLocations();