add master sword and shadow crystal checks

This commit is contained in:
gymnast86
2026-04-25 21:43:59 -07:00
parent 8e3306f87f
commit 00929789a1
2 changed files with 26 additions and 6 deletions
+22
View File
@@ -45,6 +45,21 @@ void daObjMasterSword_c::executeWait() {
}
if (fopAcM_checkCarryNow(this)) {
#if TARGET_PC
// In rando, give the master sword and shadow crystal location items
if (randomizer_IsActive()) {
u8 itemToGive = randomizer_getItemAtLocation("Sacred Grove Pedestal Master Sword");
g_randomizerState.addItemToEventQueue(itemToGive);
itemToGive = randomizer_getItemAtLocation("Sacred Grove Pedestal Shadow Crystal");
g_randomizerState.addItemToEventQueue(itemToGive);
// Set the necessary flags to de-spawn the MS and set the save file event flag.
dComIfGs_onTmpBit(0x820);
dComIfGs_onEventBit(0x2120);
return;
}
#endif
dMeter2Info_setCloth(dItemNo_WEAR_KOKIRI_e, false);
fopAcM_orderMapToolEvent(this, getEventID(), 0xFF, 0xFFFF, 1, 0);
}
@@ -186,6 +201,13 @@ int daObjMasterSword_c::execute() {
mBrk.play();
if (dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[73])) {
#if TARGET_PC
// Don't automatically give the master sword in randomizer
if (randomizer_IsActive()) {
fopAcM_delete(this);
return 1;
}
#endif
dComIfGs_onItemFirstBit(dItemNo_MASTER_SWORD_e);
dMeter2Info_setSword(dItemNo_MASTER_SWORD_e, false);
dComIfGs_setSelectEquipSword(dItemNo_MASTER_SWORD_e);
@@ -749,25 +749,23 @@
- Tbox ID: 2
Stage: F_SP117
# TODO
- Name: Sacred Grove Pedestal Master Sword
Original Item: Progressive Sword
Categories:
- Overworld
- Sacred Grove
- Event
Metadata:
- None
- Location Name Lookup
Metadata: Sacred Grove Pedestal Master Sword
# TODO
- Name: Sacred Grove Pedestal Shadow Crystal
Original Item: Shadow Crystal
Categories:
- Overworld
- Sacred Grove
- Event
Metadata:
- None
- Location Name Lookup
Metadata: Sacred Grove Pedestal Shadow Crystal
- Name: Sacred Grove Master Sword Poe
Original Item: Poe Soul