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();
//Get Any Dungeon and Overworld group locations
std::vector<RandomizerCheck> anyDungeonLocations = Rando::StaticData::GetDungeonLocations();
//Rando::StaticData::GetOverworldLocations() defined in item_location.cpp
std::vector<RandomizerCheck> anyDungeonLocations = Rando::StaticData::GetAllDungeonLocations();
//Create Any Dungeon and Overworld item pools
std::vector<RandomizerGet> anyDungeonItems;

View File

@ -404,9 +404,9 @@ void RegionTable_Init_FireTemple() {
//Exits
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 &&
(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->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);
}
for (const auto dungeon : mDungeons->GetDungeonList()) {
AddLocations(dungeon->GetDungeonLocations());
}
AddLocations(StaticData::GetAllDungeonLocations());
}
void Context::AddExcludedOptions() {

View File

@ -1,6 +1,7 @@
#include "static_data.h"
#include "z64save.h"
#include "context.h"
#include "dungeon.h"
#define TWO_ACTOR_PARAMS(a, b) (abs(a) << 16) | abs(b)
@ -117,18 +118,14 @@ std::vector<RandomizerCheck> Rando::StaticData::GetOverworldLocations() {
return overworldLocations;
}
std::vector<RandomizerCheck> Rando::StaticData::GetDungeonLocations() {
std::vector<RandomizerCheck> overworldLocations = {};
for (Location& location : locationTable) {
if (
location.IsDungeon() &&
location.GetRCType() != RCTYPE_STATIC_HINT &&
location.GetRCType() != RCTYPE_GOSSIP_STONE //don't put items on hints
) {
overworldLocations.push_back(location.GetRandomizerCheck());
std::vector<RandomizerCheck> Rando::StaticData::GetAllDungeonLocations() {
auto ctx = Rando::Context::GetInstance();
std::vector<RandomizerCheck> dungeonLocations;
for (const auto dungeon : ctx->GetDungeons()->GetDungeonList()) {
std::vector<RandomizerCheck> dungeonLoc = dungeon->GetDungeonLocations();
dungeonLocations.insert(dungeonLocations.end(), dungeonLoc.begin(), dungeonLoc.end());
}
}
return overworldLocations;
return dungeonLocations;
}
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::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> CheckFromActorMultimap;
static std::vector<RandomizerCheck> GetOverworldLocations();
static std::vector<RandomizerCheck> GetDungeonLocations();
static std::vector<RandomizerCheck> GetAllDungeonLocations();
static std::vector<RandomizerCheck> dungeonRewardLocations;
static std::vector<RandomizerCheck> GetShopLocations();
static std::vector<RandomizerCheck> GetScrubLocations();