diff --git a/src/d/actor/d_a_npc_rafrel.cpp b/src/d/actor/d_a_npc_rafrel.cpp index dfc6e912fe..23f96ecc6f 100644 --- a/src/d/actor/d_a_npc_rafrel.cpp +++ b/src/d/actor/d_a_npc_rafrel.cpp @@ -10,6 +10,11 @@ #include "d/d_debug_viewer.h" #include +#if TARGET_PC +#include "dusk/randomizer/game/verify_item_functions.h" +#include "dusk/randomizer/game/flags.h" +#endif + static daNpc_GetParam2 l_bckGetParamList[29] = { {-1, 2, 0}, {9, 0, 0}, @@ -194,7 +199,12 @@ int daNpcRafrel_c::Create() { mType = 0; } else if (strcmp(dComIfGp_getStartStageName(), "F_SP115") == 0 && dComIfGp_getStartStageRoomNo() == 0) { - if (daNpcF_chkEvtBit(0x169) || !daNpcF_chkEvtBit(0x108)) { +#if TARGET_PC + // Only despawn Auru in randomizer if we already collected his item + if ((randomizer_IsActive() ? dComIfGs_isEventBit(GOT_AURUS_MEMO) : daNpcF_chkEvtBit(0x169)) || !daNpcF_chkEvtBit(0x108)) { +#else + if ( daNpcF_chkEvtBit(0x169) || !daNpcF_chkEvtBit(0x108)) { +#endif return cPhs_ERROR_e; } @@ -1310,6 +1320,12 @@ bool daNpcRafrel_c::talk(void* param_0) { OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventId, itemNo); if (eventId == 1) { +#if TARGET_PC + if (randomizer_IsActive()) { + u8 itemId = randomizer_getItemAtLocation("Auru Gift To Fyer"); + itemNo = verifyProgressiveItem(itemId); + } +#endif field_0xe00 = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL); if (field_0xe00 != fpcM_ERROR_PROCESS_ID_e) { s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); @@ -1562,6 +1578,12 @@ int daNpcRafrel_c::EvCut_Appear(int i_staffId) { int itemNo = 0; u16 eventId = mFlow.getEventId(&itemNo); if (eventId == 1) { +#if TARGET_PC + if (randomizer_IsActive()) { + u8 itemId = randomizer_getItemAtLocation("Auru Gift To Fyer"); + itemNo = verifyProgressiveItem(itemId); + } +#endif field_0xe00 = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL); dComIfGp_event_setItemPartnerId(field_0xe00); field_0xe00 = fpcM_ERROR_PROCESS_ID_e; diff --git a/src/dusk/randomizer/generator/data/actor_additions.yaml b/src/dusk/randomizer/generator/data/actor_additions.yaml index dd72babb38..a98b9d1659 100644 --- a/src/dusk/randomizer/generator/data/actor_additions.yaml +++ b/src/dusk/randomizer/generator/data/actor_additions.yaml @@ -2,12 +2,27 @@ # NOTE: All data is expressed in little endian format -# Objects which have the ACTR dzx type -ACTR: - # Sacred Grove - F_SP117: - # Pedestal of Time - 1: + +ACTR: # Objects which have the ACTR dzx type + F_SP115: # Lake Hylia + 0: # Room 0 - Main Lake + # Spawn Auru on layer 3 + - name: Rafrel + parameters: 0x00001D01 + position: + x: -116486.945 + y: -13860.0 + z: 58533.0078 + angle: + x: 0x0000 + y: 0xCCCD + z: 0x0000 + layers: + - 1 + - 3 + + F_SP117: # Sacred Grove + 1: # Room 1 - Pedestal of Time # Spawn in the Master Sword actor - name: mstrsrd parameters: 0x00020110 @@ -20,4 +35,5 @@ ACTR: y: 0x0000 z: 0x0000 layers: - - 2 \ No newline at end of file + - 2 + diff --git a/src/dusk/randomizer/generator/data/locations.yaml b/src/dusk/randomizer/generator/data/locations.yaml index 6e4f924107..9d44675455 100644 --- a/src/dusk/randomizer/generator/data/locations.yaml +++ b/src/dusk/randomizer/generator/data/locations.yaml @@ -2758,7 +2758,6 @@ Metadata: - None -# TODO - Name: Auru Gift To Fyer Original Item: Aurus Memo Categories: @@ -2766,8 +2765,8 @@ - Npc - Lake Hylia - ARC - Metadata: - - None + - Location Name Lookup + Metadata: Auru Gift To Fyer - Name: Lake Hylia Tower Poe Original Item: Poe Soul