Rando: Master Sword Shuffle (#2981)

* The mother of all commits

* Removed `GI_SWORD_MASTER`;
"Master Sword" Items now actually give MS

* Removed dupe MS entries in item pool;
updated GIMESSAGE (should stop crashing on non-Windows);
re-added MS in item list

* Give Adult Link a freebie with shuffle MS on;
cihld -> adult no longer gives MS;
ToT Master Sword now gives correct item

* add master sword GI draw func based on ToT MS object

* Force `MasterSword` logic var to only update upon getting MS

* Dorf funny line now activates with LA and MS in inv

* Apply suggestions

* Updated RAND_INF;
Check Tracker changes;
Gave RAND_INF and ice trap logic to ToT MS check;
Fixed swordless behavior for HBA/fishing

* ToT MS Check now works in check tracker;
Visual bug where box hovers over non-existent MS gone;
Fixed RAND_INF check with ToT MS pedestal;
Ganon no longer gives free MS

* adult equips no longer reset in MS shuffle

* Apply (most) locacc review suggestions

Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>

* Reorganized swordless check for interface to fit edge cases;
getting master sword no longer highlights box

* Edge case for BGS but no bow

* Fix implicit declaration error for GI hooks (#9)

* Adjusted `CanAdultAttack/Damage`; applied logic suggestions

* Fixed build errors (hopefully)

* Cleanup merge

* get shit working again

* Tidied up remaining uses of DD flag as rando indicator

* make master sword invisible and fix ms flag (#10)

* Add text to sheik if go mode is obtained but barrier is still up

* overhaul swordless behavior in `func_80083108`

* reworked ToT MS Check to have an actual GI

* suggestions

* Apply suggestions

* Better swordless handling with temp B (#11)

* better swordless handling with temp B

* prevent auto save in fishing pond

* prevent auto save during bombchu bowling

* enum fix

---------

Co-authored-by: Adam Bird <archez39@me.com>
Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>
Co-authored-by: RaelCappra <rael.cappra@gmail.com>
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
This commit is contained in:
Ralphie Morell 2023-10-21 21:51:37 -04:00 committed by GitHub
commit 2eaed8d81e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 558 additions and 310 deletions

View file

@ -58,6 +58,7 @@ bool showMerchants;
bool showCows;
bool showAdultTrade;
bool showKokiriSword;
bool showMasterSword;
bool showWeirdEgg;
bool showGerudoCard;
bool showFrogSongRupees;
@ -424,6 +425,7 @@ bool HasItemBeenCollected(RandomizerCheck rc) {
case SpoilerCollectionCheckType::SPOILER_CHK_COW:
case SpoilerCollectionCheckType::SPOILER_CHK_SCRUB:
case SpoilerCollectionCheckType::SPOILER_CHK_RANDOMIZER_INF:
case SpoilerCollectionCheckType::SPOILER_CHK_MASTER_SWORD:
return Flags_GetRandomizerInf(OTRGlobals::Instance->gRandomizer->GetRandomizerInfFromCheck(rc));
case SpoilerCollectionCheckType::SPOILER_CHK_EVENT_CHK_INF:
return gSaveContext.eventChkInf[flag / 16] & (0x01 << flag % 16);
@ -1018,6 +1020,9 @@ void LoadSettings() {
showKokiriSword = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_KOKIRI_SWORD) == RO_GENERIC_YES
: true;
showMasterSword = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MASTER_SWORD) == RO_GENERIC_YES
: true;
showWeirdEgg = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_WEIRD_EGG) == RO_GENERIC_YES
: true;
@ -1126,6 +1131,7 @@ bool IsVisibleInCheckTracker(RandomizerCheckObject rcObj) {
rcObj.rc == RC_DMT_TRADE_CLAIM_CHECK // even when shuffle adult trade is off
) &&
(rcObj.rc != RC_KF_KOKIRI_SWORD_CHEST || showKokiriSword) &&
(rcObj.rc != RC_TOT_MASTER_SWORD || showMasterSword) &&
(rcObj.rc != RC_ZR_MAGIC_BEAN_SALESMAN || showBeans) &&
(rcObj.rc != RC_HC_MALON_EGG || showWeirdEgg) &&
(rcObj.rcType != RCTYPE_FROG_SONG || showFrogSongRupees) &&