mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 01:12:19 -05:00
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:
parent
6ca55aadbd
commit
7f4bd3e98c
@ -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;
|
||||||
|
@ -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)))
|
||||||
;}}),
|
;}}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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() {
|
||||||
|
@ -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 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
|
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
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user