rutela and ralis checks

This commit is contained in:
gymnast86
2026-04-30 04:39:41 -07:00
parent 2b9dd50a8d
commit 622920d8c0
5 changed files with 63 additions and 7 deletions
+8
View File
@@ -10,6 +10,9 @@
#include "SSystem/SComponent/c_math.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "Z2AudioLib/Z2Instances.h"
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum Event_Cut_Nums {
/* 0x2 */ NUM_EVT_CUTS_e = 0x2,
@@ -1685,6 +1688,11 @@ BOOL daNpc_zrC_c::ECut_earringGet(int i_staffID) {
case 40: {
int item_no = 0;
if (mFlow.getEventId(&item_no) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Gift From Ralis"));
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no,
0, -1, -1, NULL, NULL);
}
+16 -1
View File
@@ -14,6 +14,11 @@
#include "Z2AudioLib/Z2Instances.h"
#include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/flags.h"
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
static NPC_ZRZ_HIO_CLASS l_HIO;
daNpc_zrZ_HIOParam const daNpc_zrZ_Param_c::m = {
@@ -892,7 +897,12 @@ BOOL daNpc_zrZ_c::isDelete() {
if (((mDemoMode == DEMO_COME_HERE || mDemoMode == DEMO_WAIT)
&& dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this)))
|| (mDemoMode == DEMO_COME_HERE_2 && (!dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this))
|| dComIfGs_isSwitch(mSwitch2, fopAcM_GetRoomNo(this)))))
#if TARGET_PC
// Don't delete Rutela in the graveyard until we've picked up Rutelas Blessing in rando
|| (dComIfGs_isSwitch(mSwitch2, fopAcM_GetRoomNo(this)) && (!randomizer_IsActive() || dComIfGs_isEventBit(GOT_ZORA_ARMOR_FROM_RUTELA))))))
#else
|| dComIfGs_isSwitch(mSwitch2, fopAcM_GetRoomNo(this)))))
#endif
{
return true;
} else {
@@ -1729,6 +1739,11 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) {
}
item_no = 0;
if (mFlow.getEventId(&item_no) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Rutelas Blessing"));
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no,
0, -1, -1, NULL, NULL);
}
+25
View File
@@ -11,6 +11,10 @@
#include "d/d_a_itembase_static.h"
#include "f_pc/f_pc_name.h"
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
void daObjZCloth_c::initBaseMtx() {
mpModel->setBaseScale(scale);
setBaseMtx();
@@ -32,6 +36,27 @@ int daObjZCloth_c::Create() {
int daObjZCloth_c::create() {
fopAcM_ct(this, daObjZCloth_c);
m_itemNo = 0x31;
#if TARGET_PC
// Override the item id in randomizer
if (randomizer_IsActive()) {
m_itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Rutelas Blessing"));
// TODO: Set rotation/height/scale depending on the item (low prio, can figure this out later)
scale.setall(1.5f);
switch (m_itemNo) {
case dItemNo_Randomizer_WOOD_STICK_e:
shape_angle.x = 0x4000;
break;
case dItemNo_Randomizer_MASTER_SWORD_e:
case dItemNo_Randomizer_LIGHT_SWORD_e:
shape_angle.x = 0x4000;
current.pos.z -= 40.0f;
scale.setall(1.0f);
break;
default:
break;
}
}
#endif
int phase = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo));
if (phase == cPhs_COMPLEATE_e) {
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)CheckFieldItemCreateHeap, 0x2fb0)) {
+10
View File
@@ -10,6 +10,10 @@
#include "d/d_bg_w.h"
#include "f_pc/f_pc_name.h"
#if TARGET_PC
#include "dusk/randomizer/game/flags.h"
#endif
static char const* l_arcName = "H_ZraRock";
void daObjZraRock_c::setAttnPos() {
@@ -80,6 +84,12 @@ cPhs_Step daObjZraRock_c::create() {
int dzb_id = dComIfG_getObjctResName2Index(l_arcName, "H_ZoraRock.dzb");
step = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_Trans, 0x2050, NULL);
if (dComIfGs_isSwitch((fopAcM_GetParam(this) >> 8) & 0xff, fopAcM_GetRoomNo(this))) {
#if TARGET_PC
// Don't delete the rock when we're following rutela
if (randomizer_IsActive() && !dComIfGs_isEventBit(GOT_ZORA_ARMOR_FROM_RUTELA) && dComIfGs_isEventBit(ZORA_ESCORT_CLEARED)) {
return step;
}
#endif
step = cPhs_ERROR_e;
}
}
@@ -1408,7 +1408,6 @@
Metadata:
- None
# TODO
- Name: Rutelas Blessing
Original Item: Zora Armor
Categories:
@@ -1416,10 +1415,9 @@
- Npc
- Kakariko Graveyard
- ARC
Metadata:
- None
- Location Name Lookup
Metadata: Rutelas Blessing
# TODO
- Name: Gift From Ralis
Original Item: Progressive Fishing Rod
Categories:
@@ -1427,8 +1425,8 @@
- Npc
- Kakariko Graveyard
- ARC
Metadata:
- None
- Location Name Lookup
Metadata: Gift From Ralis
- Name: Kakariko Graveyard Lantern Chest
Original Item: Purple Rupee