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:
@@ -265,6 +265,19 @@ void GivePlayerRandoRewardRequiem(PlayState* play, RandomizerCheck check) {
|
||||
}
|
||||
}
|
||||
|
||||
void GivePlayerRandoRewardMasterSword(PlayState* play, RandomizerCheck check) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.entranceIndex == 0x02CA && LINK_IS_ADULT && player != NULL &&
|
||||
!Player_InBlockingCsMode(play, player) && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_TOT_MASTER_SWORD)) {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_MASTER_SWORD);
|
||||
GiveItemEntryWithoutActor(play, getItemEntry);
|
||||
player->pendingFlag.flagID = RAND_INF_TOT_MASTER_SWORD;
|
||||
player->pendingFlag.flagType = FLAG_RANDOMIZER_INF;
|
||||
}
|
||||
}
|
||||
|
||||
u8 CheckStoneCount() {
|
||||
u8 stoneCount = 0;
|
||||
|
||||
@@ -1433,6 +1446,7 @@ skip:
|
||||
GivePlayerRandoRewardZeldaLightArrowsGift(play, RC_TOT_LIGHT_ARROWS_CUTSCENE);
|
||||
GivePlayerRandoRewardNocturne(play, RC_SHEIK_IN_KAKARIKO);
|
||||
GivePlayerRandoRewardRequiem(play, RC_SHEIK_AT_COLOSSUS);
|
||||
GivePlayerRandoRewardMasterSword(play, RC_TOT_MASTER_SWORD);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2315,17 +2329,8 @@ void Play_PerformSave(PlayState* play) {
|
||||
if (play != NULL && gSaveContext.fileNum != 0xFF) {
|
||||
Play_SaveSceneFlags(play);
|
||||
gSaveContext.savedSceneNum = play->sceneNum;
|
||||
if (gSaveContext.temporaryWeapon) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_NONE;
|
||||
GET_PLAYER(play)->currentSwordItemId = ITEM_NONE;
|
||||
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_NONE);
|
||||
Save_SaveFile();
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI;
|
||||
GET_PLAYER(play)->currentSwordItemId = ITEM_SWORD_KOKIRI;
|
||||
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_KOKIRI);
|
||||
} else {
|
||||
Save_SaveFile();
|
||||
}
|
||||
Save_SaveFile();
|
||||
|
||||
uint8_t triforceHuntCompleted =
|
||||
IS_RANDO &&
|
||||
gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED) &&
|
||||
|
||||
Reference in New Issue
Block a user