mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-03 08:57:00 -04:00
ilia reward and hdiden village checks
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
daNpcImpal_HIOParam const daNpcImpal_Param_c::m = {
|
||||
135.0f, // attention_offset
|
||||
-3.0f, // gravity
|
||||
@@ -971,6 +975,11 @@ BOOL daNpcImpal_c::EvCut_ImpalAppear1(int i_cut_index) {
|
||||
if (talkProc(NULL, 1, NULL)) {
|
||||
int evt_id = 0;
|
||||
if (mFlow.getEventId(&evt_id) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Ilia Charm"));
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, evt_id, 0, -1, -1, 0, 0);
|
||||
if (mItemPartnerId != 0xffffffff) {
|
||||
@@ -1060,6 +1069,11 @@ BOOL daNpcImpal_c::EvCut_CopyRod(int i_cut_index) {
|
||||
case '0003':
|
||||
int evt_id = 0;
|
||||
if (mFlow.getEventId(&evt_id) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Skybook From Impaz"));
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, evt_id, 0, -1, -1, 0, 0);
|
||||
dComIfGp_event_setItemPartnerId(mItemPartnerId);
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "d/actor/d_a_tag_push.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum Type {
|
||||
/* 0x0 */ TYPE_0,
|
||||
/* 0x1 */ TYPE_1,
|
||||
@@ -1236,6 +1240,11 @@ int daNpc_Len_c::talk(void* param_0) {
|
||||
switch (evt_id) {
|
||||
case 1:
|
||||
if (mItemPartnerId == -1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
local_18 = verifyProgressiveItem(randomizer_getItemAtLocation("Renados Letter"));
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, local_18,
|
||||
0, -1, -1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -2604,6 +2604,11 @@ int dMsgFlow_c::event035(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speak
|
||||
} else if (prm0 == dItemNo_RAFRELS_MEMO_e || prm0 == dItemNo_ASHS_SCRIBBLING_e) {
|
||||
dComIfGs_setItem(SLOT_19, dItemNo_NONE_e);
|
||||
} else if (prm0 == dItemNo_LETTER_e || prm0 == dItemNo_BILL_e || prm0 == dItemNo_WOOD_STATUE_e || prm0 == dItemNo_IRIAS_PENDANT_e) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive())
|
||||
offWarashibeItem(prm0);
|
||||
else
|
||||
#endif
|
||||
dComIfGs_setWarashibeItem(dItemNo_NONE_e);
|
||||
}
|
||||
|
||||
|
||||
+15
-4
@@ -31,6 +31,7 @@
|
||||
|
||||
#if TARGET_PC
|
||||
#include "d/d_item.h"
|
||||
#include "dusk/randomizer/game/stages.h"
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#include "dusk/version.hpp"
|
||||
@@ -686,12 +687,22 @@ u32 dMsgObject_c::getMessageIndex(u32 param_0) {
|
||||
u32 dMsgObject_c::getRevoMessageIndex(u32 param_1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
u32 key = (dMsgObject_getGroupID() << 16) | param_1;
|
||||
auto& flowItemOverrides = randomizer_GetContext().mFlowItemMessageOverrides;
|
||||
if (flowItemOverrides.contains(key)) {
|
||||
u8 itemId = verifyProgressiveItem(flowItemOverrides[key]);
|
||||
// Special case for Ilia Memory Reward Text
|
||||
// If we're in the sanctuary cutscene where we get the reward, override the text.
|
||||
// Otherwise we override the text whenever we get the regular horse call
|
||||
if (param_1 == 233 && playerIsInRoomStage(0, "R_SP109") && dComIfGp_getLayerNo() == 9) {
|
||||
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Ilia Memory Reward"));
|
||||
param_1 = getItemMessageID(itemId);
|
||||
execItemGet(itemId);
|
||||
} else {
|
||||
// Else override the text if we have an override
|
||||
u32 key = (dMsgObject_getGroupID() << 16) | param_1;
|
||||
auto& flowItemOverrides = randomizer_GetContext().mFlowItemMessageOverrides;
|
||||
if (flowItemOverrides.contains(key)) {
|
||||
u8 itemId = verifyProgressiveItem(flowItemOverrides[key]);
|
||||
param_1 = getItemMessageID(itemId);
|
||||
execItemGet(itemId);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1179,7 +1179,7 @@ static int phase_1(dScnPly_c* i_this) {
|
||||
|
||||
// Stage: Ordon Spring, Room: Ordon Spring
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP104") && dComIfGp_getStartStageRoomNo() == 1 &&
|
||||
dComIfGp_getStartStagePoint() == 23 && dComIfGp_getStartStageLayer() == 12)
|
||||
dComIfGp_getStartStagePoint() == 23 && dComIfGp_getStartStageLayer() == 12 IF_DUSK(&& !randomizer_IsActive())) // Don't give the item in rando
|
||||
{
|
||||
dComIfGs_onItemFirstBit(dItemNo_HORSE_FLUTE_e);
|
||||
dComIfGs_setItem(SLOT_21, dItemNo_HORSE_FLUTE_e);
|
||||
|
||||
@@ -1200,6 +1200,13 @@ void dSv_memBit_c::offSwitch(int i_no) {
|
||||
}
|
||||
|
||||
BOOL dSv_memBit_c::isSwitch(int i_no) const {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive() && getStageID() == Hidden_Village_Interiors) {
|
||||
if (i_no == 0x61) { // Is Impaz in her house
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
JUT_ASSERT(2814, 0 <= i_no && i_no < 128);
|
||||
return (mSwitch[i_no >> 5] & 1 << (i_no & 0x1F)) ? TRUE : FALSE;
|
||||
}
|
||||
@@ -1380,6 +1387,19 @@ BOOL dSv_event_c::isEventBit(const u16 i_no) const {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GAVE_ILIA_HER_CHARM: // Gave Ilia the charm
|
||||
case CITY_OOCCOO_CS_WATCHED: // CiTS Intro CS watched
|
||||
{
|
||||
if (daAlink_c::checkStageName(allStages[Hidden_Village])) {
|
||||
if (!dComIfGs_isEventBit(GOT_ILIAS_CHARM)) {
|
||||
// If we haven't gotten the item from Impaz then we need to return false or it
|
||||
// will break her dialogue.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case GORON_MINES_CLEARED:
|
||||
{
|
||||
if (daAlink_c::checkStageName(allStages[Goron_Mines]) || daAlink_c::checkStageName(allStages[Death_Mountain_Interiors])){
|
||||
|
||||
@@ -1387,7 +1387,6 @@
|
||||
- Location Name Lookup
|
||||
Metadata: Talo Sharpshooting
|
||||
|
||||
# TODO
|
||||
- Name: Renados Letter
|
||||
Original Item: Renados Letter
|
||||
Categories:
|
||||
@@ -1395,18 +1394,17 @@
|
||||
- Npc
|
||||
- Kakariko Village
|
||||
- ARC
|
||||
Metadata:
|
||||
- None
|
||||
- Location Name Lookup
|
||||
Metadata: Renados Letter
|
||||
|
||||
# TODO
|
||||
- Name: Ilia Memory Reward
|
||||
Original Item: Horse Call
|
||||
Categories:
|
||||
- Overworld
|
||||
- Npc
|
||||
- Kakariko Village
|
||||
Metadata:
|
||||
- None
|
||||
- Location Name Lookup
|
||||
Metadata: Ilia Memory Reward
|
||||
|
||||
- Name: Rutelas Blessing
|
||||
Original Item: Zora Armor
|
||||
@@ -1779,7 +1777,6 @@
|
||||
- Tbox ID: 2
|
||||
Stage: 36
|
||||
|
||||
# TODO
|
||||
- Name: Skybook From Impaz
|
||||
Original Item: Progressive Sky Book
|
||||
Categories:
|
||||
@@ -1787,10 +1784,9 @@
|
||||
- Npc
|
||||
- Hidden Village
|
||||
- ARC
|
||||
Metadata:
|
||||
- None
|
||||
- Location Name Lookup
|
||||
Metadata: Skybook From Impaz
|
||||
|
||||
# TODO (Might be fine, haven't checked)
|
||||
- Name: Cats Hide and Seek Minigame
|
||||
Original Item: Piece of Heart
|
||||
Categories:
|
||||
@@ -1812,7 +1808,6 @@
|
||||
- Flag: 0x40
|
||||
Stage: 63
|
||||
|
||||
# TODO
|
||||
- Name: Ilia Charm
|
||||
Original Item: Ilias Charm
|
||||
Categories:
|
||||
@@ -1820,8 +1815,8 @@
|
||||
- Npc
|
||||
- Hidden Village
|
||||
- ARC
|
||||
Metadata:
|
||||
- None
|
||||
- Location Name Lookup
|
||||
Metadata: Ilia Charm
|
||||
|
||||
# LANAYRU PROVINCE
|
||||
|
||||
|
||||
@@ -575,7 +575,6 @@ namespace randomizer::logic::world
|
||||
"Telma Invoice",
|
||||
"Wooden Statue",
|
||||
"Ilia Charm",
|
||||
"Ilia Memory Reward",
|
||||
"Defeat Ganondorf",
|
||||
"Twilit Insect",
|
||||
"Twilit Bloat")))
|
||||
|
||||
Reference in New Issue
Block a user