mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-15 22:15:16 -05:00
First pass on logic
This commit is contained in:
parent
d117b13c46
commit
0a2bbabbed
@ -87,7 +87,7 @@ void AreaTable_Init_GanonsCastle() {
|
||||
areaTable[GANONS_CASTLE_SPIRIT_TRIAL] = Area("Ganon's Castle Spirit Trial", "Ganon's Castle", GANONS_CASTLE, NO_DAY_NIGHT_CYCLE, {
|
||||
//Events
|
||||
EventAccess(&NutPot, {[]{return NutPot || ((LogicSpiritTrialHookshot || CanUse(HOOKSHOT)) && HasBombchus && Bow && MirrorShield && IsAdult);}}),
|
||||
EventAccess(&SpiritTrialClear, {[]{return CanUse(LIGHT_ARROWS) && MirrorShield && HasBombchus && (LogicSpiritTrialHookshot || CanUse(HOOKSHOT));}}),
|
||||
EventAccess(&SpiritTrialClear, {[]{return CanUse(LIGHT_ARROWS) && (MirrorShield || SunlightArrows) && HasBombchus && (LogicSpiritTrialHookshot || CanUse(HOOKSHOT));}}),
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(GANONS_CASTLE_SPIRIT_TRIAL_CRYSTAL_SWITCH_CHEST, {[]{return LogicSpiritTrialHookshot || CanUse(HOOKSHOT);}}),
|
||||
|
@ -114,7 +114,7 @@ void AreaTable_Init_SpiritTemple() {
|
||||
|
||||
areaTable[SPIRIT_TEMPLE_BEYOND_CENTRAL_LOCKED_DOOR] = Area("Spirit Temple Beyond Central Locked Door", "Spirit Temple", SPIRIT_TEMPLE, NO_DAY_NIGHT_CYCLE, {}, {
|
||||
//Locations
|
||||
LocationAccess(SPIRIT_TEMPLE_NEAR_FOUR_ARMOS_CHEST, {[]{return MirrorShield && HasExplosives;}}),
|
||||
LocationAccess(SPIRIT_TEMPLE_NEAR_FOUR_ARMOS_CHEST, {[]{return (MirrorShield || (SunlightArrows && CanUse(LIGHT_ARROWS))) && HasExplosives;}}),
|
||||
LocationAccess(SPIRIT_TEMPLE_HALLWAY_LEFT_INVISIBLE_CHEST, {[]{return (LogicLensSpirit || CanUse(LENS_OF_TRUTH)) && HasExplosives;}}),
|
||||
LocationAccess(SPIRIT_TEMPLE_HALLWAY_RIGHT_INVISIBLE_CHEST, {[]{return (LogicLensSpirit || CanUse(LENS_OF_TRUTH)) && HasExplosives;}}),
|
||||
}, {
|
||||
@ -128,7 +128,7 @@ void AreaTable_Init_SpiritTemple() {
|
||||
}, {
|
||||
//Locations
|
||||
LocationAccess(SPIRIT_TEMPLE_BOSS_KEY_CHEST, {[]{return CanPlay(ZeldasLullaby) && ((CanTakeDamage && LogicFlamingChests) || (Bow && Hookshot));}}),
|
||||
LocationAccess(SPIRIT_TEMPLE_TOPMOST_CHEST, {[]{return MirrorShield;}}),
|
||||
LocationAccess(SPIRIT_TEMPLE_TOPMOST_CHEST, {[]{return MirrorShield || (SunlightArrows && CanUse(LIGHT_ARROWS));}}),
|
||||
LocationAccess(SPIRIT_TEMPLE_TWINROVA_HEART, {[]{return MirrorShield && HasExplosives && Hookshot && BossKeySpiritTemple;}}),
|
||||
LocationAccess(TWINROVA, {[]{return MirrorShield && HasExplosives && Hookshot && BossKeySpiritTemple;}}),
|
||||
}, {});
|
||||
|
@ -702,7 +702,7 @@ namespace Logic {
|
||||
Nuts = DekuNutDrop || Nuts;
|
||||
Sticks = DekuStickDrop || Sticks;
|
||||
Bugs = HasBottle && BugsAccess;
|
||||
BlueFire = HasBottle && BlueFireAccess;
|
||||
BlueFire = (HasBottle && BlueFireAccess) || (BlueFireArrows && CanUse(ICE_ARROWS));
|
||||
Fish = HasBottle && FishAccess;
|
||||
Fairy = HasBottle && FairyAccess;
|
||||
|
||||
|
@ -896,6 +896,16 @@ string_view gkDurabilityRandomSafe = "Each Giant's Knife will get a random du
|
||||
"between 10 and 50, with an average of 30."; //
|
||||
//
|
||||
/*------------------------------ //
|
||||
| BLUE FIRE ARROWS | //
|
||||
------------------------------*/ //
|
||||
string_view blueFireArrowsDesc = "Ice Arrows gain the ability to melt red ice\n" //
|
||||
"and break the mud walls in Dodongo's Cavern."; //
|
||||
/*------------------------------ //
|
||||
| SUNLIGHT ARROWS | //
|
||||
------------------------------*/ //
|
||||
string_view sunlightArrowsDesc = "Light Arrows gain the ability to activate sun\n" //
|
||||
"switches."; //
|
||||
/*------------------------------ //
|
||||
| MULTIPLAYER | //
|
||||
------------------------------*/ //
|
||||
string_view mp_EnabledDesc = "Enables multiplayer.\n" //
|
||||
|
@ -284,6 +284,9 @@ extern string_view gkDurabilityVanilla;
|
||||
extern string_view gkDurabilityRandomRisk;
|
||||
extern string_view gkDurabilityRandomSafe;
|
||||
|
||||
extern string_view blueFireArrowsDesc;
|
||||
extern string_view sunlightArrowsDesc;
|
||||
|
||||
extern string_view mp_EnabledDesc;
|
||||
extern string_view mp_SharedProgressDesc;
|
||||
extern string_view mp_SyncIdDesc;
|
||||
|
@ -304,6 +304,8 @@ namespace Settings {
|
||||
Option IngameSpoilers = Option::Bool("Ingame Spoilers", {"Hide", "Show"}, {ingameSpoilersHideDesc, ingameSpoilersShowDesc });
|
||||
Option MenuOpeningButton = Option::U8 ("Open Info Menu with", {"Select","Start","D-Pad Up","D-Pad Down","D-Pad Right","D-Pad Left",}, {menuButtonDesc});
|
||||
Option RandomTrapDmg = Option::U8 ("Random Trap Damage", {"Off", "Basic", "Advanced"}, {randomTrapDmgDesc, basicTrapDmgDesc, advancedTrapDmgDesc}, OptionCategory::Setting, 1); // Basic
|
||||
Option BlueFireArrows = Option::Bool("Blue Fire Arrows", {"No", "Yes"}, {blueFireArrowsDesc});
|
||||
Option SunlightArrows = Option::Bool("Sunlight Arrows", {"No", "Yes"}, {sunlightArrowsDesc});
|
||||
bool HasNightStart = false;
|
||||
std::vector<Option *> miscOptions = {
|
||||
&GossipStoneHints,
|
||||
@ -320,6 +322,8 @@ namespace Settings {
|
||||
&IngameSpoilers,
|
||||
&MenuOpeningButton,
|
||||
&RandomTrapDmg,
|
||||
&BlueFireArrows,
|
||||
&SunlightArrows
|
||||
};
|
||||
|
||||
//Item Usability Settings
|
||||
@ -1322,6 +1326,8 @@ namespace Settings {
|
||||
ctx.ingameSpoilers = (IngameSpoilers) ? 1 : 0;
|
||||
ctx.menuOpeningButton = MenuOpeningButton.Value<uint8_t>();
|
||||
ctx.randomTrapDmg = RandomTrapDmg.Value<uint8_t>();
|
||||
ctx.blueFireArrows = (BlueFireArrows) ? 1 : 0;
|
||||
ctx.sunLightArrows = (SunlightArrows) ? 1 : 0;
|
||||
|
||||
ctx.faroresWindAnywhere = (FaroresWindAnywhere) ? 1 : 0;
|
||||
ctx.stickAsAdult = (StickAsAdult) ? 1 : 0;
|
||||
@ -2567,6 +2573,8 @@ namespace Settings {
|
||||
GossipStoneHints.SetSelectedIndex(cvarSettings[RSK_GOSSIP_STONE_HINTS]);
|
||||
ClearerHints.SetSelectedIndex(cvarSettings[RSK_HINT_CLARITY]);
|
||||
HintDistribution.SetSelectedIndex(cvarSettings[RSK_HINT_DISTRIBUTION]);
|
||||
BlueFireArrows.SetSelectedIndex(cvarSettings[RSK_BLUE_FIRE_ARROWS]);
|
||||
SunlightArrows.SetSelectedIndex(cvarSettings[RSK_SUNLIGHT_ARROWS]);
|
||||
|
||||
ItemPoolValue.SetSelectedIndex(cvarSettings[RSK_ITEM_POOL]);
|
||||
IceTrapValue.SetSelectedIndex(cvarSettings[RSK_ICE_TRAPS]);
|
||||
|
@ -458,6 +458,8 @@ typedef struct {
|
||||
uint8_t ingameSpoilers;
|
||||
uint8_t menuOpeningButton;
|
||||
uint8_t randomTrapDmg;
|
||||
uint8_t blueFireArrows;
|
||||
uint8_t sunLightArrows;
|
||||
|
||||
uint8_t faroresWindAnywhere;
|
||||
uint8_t stickAsAdult;
|
||||
@ -960,6 +962,8 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
|
||||
extern Option IngameSpoilers;
|
||||
extern Option MenuOpeningButton;
|
||||
extern Option RandomTrapDmg;
|
||||
extern Option BlueFireArrows;
|
||||
extern Option SunlightArrows;
|
||||
extern bool HasNightStart;
|
||||
|
||||
extern Option FaroresWindAnywhere;
|
||||
|
@ -578,6 +578,8 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
||||
{ "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS },
|
||||
{ "Misc Settings:Hint Clarity", RSK_HINT_CLARITY },
|
||||
{ "Misc Settings:Hint Distribution", RSK_HINT_DISTRIBUTION },
|
||||
{ "Misc Settings:Blue Fire Arrows", RSK_BLUE_FIRE_ARROWS },
|
||||
{ "Misc Settings:Sunlight Arrows", RSK_SUNLIGHT_ARROWS },
|
||||
{ "Skip Child Zelda", RSK_SKIP_CHILD_ZELDA },
|
||||
{ "Start with Consumables", RSK_STARTING_CONSUMABLES },
|
||||
{ "Start with Max Rupees", RSK_FULL_WALLETS },
|
||||
@ -816,6 +818,8 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
||||
case RSK_STARTING_KOKIRI_SWORD:
|
||||
case RSK_COMPLETE_MASK_QUEST:
|
||||
case RSK_ENABLE_GLITCH_CUTSCENES:
|
||||
case RSK_BLUE_FIRE_ARROWS:
|
||||
case RSK_SUNLIGHT_ARROWS:
|
||||
if(it.value() == "Off") {
|
||||
gSaveContext.randoSettings[index].value = 0;
|
||||
} else if(it.value() == "On") {
|
||||
@ -3088,6 +3092,8 @@ void GenerateRandomizerImgui() {
|
||||
cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVar_GetS32("gRandomizeGossipStoneHints", 1);
|
||||
cvarSettings[RSK_HINT_CLARITY] = CVar_GetS32("gRandomizeHintClarity", 2);
|
||||
cvarSettings[RSK_HINT_DISTRIBUTION] = CVar_GetS32("gRandomizeHintDistribution", 1);
|
||||
cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVar_GetS32("gBlueFireArrows", 0);
|
||||
cvarSettings[RSK_SUNLIGHT_ARROWS] = CVar_GetS32("gSunlightArrows", 0);
|
||||
cvarSettings[RSK_KEYSANITY] = CVar_GetS32("gRandomizeKeysanity", 2);
|
||||
cvarSettings[RSK_GERUDO_KEYS] = CVar_GetS32("gRandomizeGerudoKeys", 0);
|
||||
cvarSettings[RSK_BOSS_KEYSANITY] = CVar_GetS32("gRandomizeBossKeysanity", 2);
|
||||
|
@ -1017,7 +1017,9 @@ typedef enum {
|
||||
RSK_ENABLE_GLITCH_CUTSCENES,
|
||||
RSK_SKULLS_SUNS_SONG,
|
||||
RSK_SHUFFLE_ADULT_TRADE,
|
||||
RSK_SHUFFLE_MAGIC_BEANS
|
||||
RSK_SHUFFLE_MAGIC_BEANS,
|
||||
RSK_BLUE_FIRE_ARROWS,
|
||||
RSK_SUNLIGHT_ARROWS
|
||||
} RandomizerSettingKey;
|
||||
|
||||
typedef struct ScrubIdentity {
|
||||
|
Loading…
Reference in New Issue
Block a user