Skip to content

Commit

Permalink
Add Restoration Twinmold Option (#66)
Browse files Browse the repository at this point in the history
* Twinmold Option and Logic Fixes

- Adds toggle for Twinmold Restoration
- Fixes Great Fairys Sword starting inventory option to actually remove the sword from the pool when toggled on
- Fixes description on D-Pad Ocarina to show D-Pad Right instead of D-Pad Down
- Fixes Twin Islands Goron Racetrack Grotto Requirements
- Fixes Road to Snowhead Pillar HP Requirements to require Hookshot
- Removes Light Arrows as potential requirement from Beneath the Well Mirror Shield Chest

* Update mm3dr base repo for more patch changes.

---------

Co-authored-by: Tacoman369 <[email protected]>
  • Loading branch information
PhlexPlexico and Tacoman369 authored Feb 29, 2024
1 parent 94fceca commit 06d2320
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions source/include/setting_descriptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ extern string_view fastZoraSwimDesc;
extern string_view dpadMaskDesc;
extern string_view dpadOcarinaDesc;
extern string_view dpadArrowDesc;
extern string_view twinmoldRestorationDesc;
extern string_view customMapButtonDesc;
extern string_view customItemsButtonDesc;
extern string_view customMasksButtonDesc;
Expand Down
4 changes: 4 additions & 0 deletions source/include/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ namespace Settings {
extern Option SkipSongReplays;
extern Option FastZoraSwim;
extern Option OcarinaDive;
extern Option DpadTransform;
extern Option DpadOcarina;
extern Option DpadArrows;
extern Option TwinmoldRestoraion;

//Trial Skips
extern Option OdolwaTrialSkip;
Expand Down
9 changes: 6 additions & 3 deletions source/location_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ void AreaTable_Init() {
areaTable[CLOCK_TOWN_OBSERVATORY] = Area("Astral Observatory/Bombers Hideout", "Astral Obseravtory/Bombers Hideout", NONE, {
//Events
EventAccess(&WatchMoonTearFall, {[]{return true;}}),
EventAccess(&ScarecrowSong, {[]{return Ocarina;}}),
},
{
//Locations
Expand Down Expand Up @@ -502,6 +503,8 @@ void AreaTable_Init() {

areaTable[CLOCK_TOWN_TRADING_POST] = Area("Trading Post", "Trading Post", NONE, {
//Events
EventAccess(&ScarecrowSong, {[]{return Ocarina;}}),
EventAccess(&SpringWater, {[]{return SpringWater;}}),
},
{
//Locations
Expand Down Expand Up @@ -1112,7 +1115,7 @@ void AreaTable_Init() {
{
//Exits
Entrance(TWIN_ISLANDS, {[]{return true;}}),
Entrance(TWIN_ISLANDS_GORON_RACETRACK_GROTTO, {[]{return AnyBombBag || (Hookshot || GoronMask);}}),
Entrance(TWIN_ISLANDS_GORON_RACETRACK_GROTTO, {[]{return AnyBombBag && ( (Hookshot && ScarecrowSong) || GoronMask);}}),
});

areaTable[TWIN_ISLANDS_GORON_RACETRACK_GROTTO] = Area("Goron Racetrack Grotto", "Goron Racetrack Grotto", NONE, {
Expand Down Expand Up @@ -1211,7 +1214,7 @@ void AreaTable_Init() {
},
{
//Locations
LocationAccess(ROAD_TO_SNOWHEAD_PILLAR, {[] {return GoronMask && MagicMeter && LensOfTruth;}}),
LocationAccess(ROAD_TO_SNOWHEAD_PILLAR, {[] {return GoronMask && MagicMeter && LensOfTruth && Hookshot && ScarecrowSong;}}),

},
{
Expand Down Expand Up @@ -3332,7 +3335,7 @@ void AreaTable_Init() {
},
{
//Locations
LocationAccess(BENEATH_THE_WELL_MIRROR_SHIELD_CHEST, {[] {return (FireArrows || LightArrows) && Bow && MagicMeter;}}),//Either burn the cloth or just light arow the switch
LocationAccess(BENEATH_THE_WELL_MIRROR_SHIELD_CHEST, {[] {return FireArrows && Bow && MagicMeter;}}),//Either burn the cloth or just light arow the switch
},
{
//Exits
Expand Down
4 changes: 3 additions & 1 deletion source/setting_descriptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,12 @@ string_view ocarinaDiveDesc = "Enables Ocarina Diving";
string_view dpadMaskDesc = "Enables using the 3 D-Pad buttons to use\n" //
"transformation masks. This option will also\n" //
"patch using Down A with Mask Storage."; //
string_view dpadOcarinaDesc = "Enables using D-Pad down to activate your\n" //
string_view dpadOcarinaDesc = "Enables using D-Pad right to activate your\n" //
"ocarina."; //
string_view dpadArrowDesc = "Enables using D-Pad up to change your current\n" //
"arrow that is being used."; //
string_view twinmoldRestorationDesc = "Fixes Twinmold boss fight so Red Twinmold does not\n"
"regen health when it burrows."; //
//
/*------------------------------- //
| CUSTOM BUTTON MAPPING | //
Expand Down
3 changes: 3 additions & 0 deletions source/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ namespace Settings {
Option DpadTransform = Option::Bool("DPad Transformation", { "No", "Yes" }, {dpadMaskDesc});
Option DpadOcarina = Option::Bool("DPad Ocarina", { "No", "Yes" }, {dpadOcarinaDesc});
Option DpadArrows = Option::Bool("Dpad Arrow Swap", { "No", "Yes" }, {dpadArrowDesc});
Option TwinmoldRestoration = Option::Bool("Twinmold Restoration", { "No", "Yes" }, {twinmoldRestorationDesc});

std::vector<Option *> restorationOptions = {
//&SkipMinigamePhases,
Expand All @@ -412,6 +413,7 @@ namespace Settings {
&DpadTransform,
&DpadOcarina,
&DpadArrows,
&TwinmoldRestoration,
//&SkipSongReplays,
};

Expand Down Expand Up @@ -775,6 +777,7 @@ namespace Settings {
ctx.enableFastMaskTransform = (DpadTransform) ? 1 : 0;
ctx.enableFastOcarina = (DpadOcarina) ? 1 : 0;
ctx.enableFastArrowSwap = (DpadArrows) ? 1 : 0;
ctx.twinmoldRestoration = (TwinmoldRestoration) ? 1 : 0;

//Cutscene Skips
ctx.skipHMSCutscenes = (SkipHMSCutscenes) ? 1 : 0;
Expand Down
1 change: 1 addition & 0 deletions source/starting_inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ void GenerateStartingInventory() {
if (StartingKokiriSword.Value<u8>() == (u8)3){ AddItemToInventory(PROGRESSIVE_SWORD, 0);}
if (StartingShield.Value<u8>() == (u8)0){ AddItemToInventory(HEROS_SHIELD, 1);}
if (StartingShield.Value<u8>() == (u8)1){ AddItemToInventory(MIRROR_SHIELD, 1);}
AddItemToInventory(GREAT_FAIRYS_SWORD, StartingGreatFairySword.Value<u8>());
AddItemToInventory(PROGRESSIVE_MAGIC_METER, StartingMagicMeter.Value<u8>());
AddItemToInventory(PROGRESSIVE_WALLET, StartingWallet.Value<u8>());
AddItemToInventory(DOUBLE_DEFENSE, StartingDoubleDefense.Value<u8>());
Expand Down

0 comments on commit 06d2320

Please sign in to comment.