mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
ruto letter + fire arrow checks
This commit is contained in:
parent
dad5163825
commit
e7061c79d8
2 changed files with 19 additions and 11 deletions
|
@ -2052,7 +2052,11 @@ RandomizerCheck Randomizer::GetCheckFromActor(s16 sceneNum, s16 actorId, s16 act
|
||||||
case 87:
|
case 87:
|
||||||
switch (actorId) {
|
switch (actorId) {
|
||||||
case 271:
|
case 271:
|
||||||
return LH_SUN;
|
if (LINK_IS_ADULT) {
|
||||||
|
return LH_SUN;
|
||||||
|
} else {
|
||||||
|
return LH_UNDERWATER_ITEM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
switch(actorParams) {
|
switch(actorParams) {
|
||||||
case 7686:
|
case 7686:
|
||||||
|
|
|
@ -82,7 +82,8 @@ void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
case ITEM_ETC_LETTER:
|
case ITEM_ETC_LETTER:
|
||||||
Actor_SetScale(&this->actor, 0.5f);
|
Actor_SetScale(&this->actor, 0.5f);
|
||||||
this->futureActionFunc = func_80B858B4;
|
this->futureActionFunc = func_80B858B4;
|
||||||
if (gSaveContext.eventChkInf[3] & 2) {
|
if ((gSaveContext.eventChkInf[3] & 2 && !gSaveContext.n64ddFlag) ||
|
||||||
|
(gSaveContext.n64ddFlag && Flags_GetTreasure(globalCtx, 0x1F))) {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -122,14 +123,16 @@ void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx) {
|
||||||
if ((this->actor.params & 0xFF) == 1) {
|
if ((this->actor.params & 0xFF) == 1) {
|
||||||
gSaveContext.eventChkInf[3] |= 2;
|
gSaveContext.eventChkInf[3] |= 2;
|
||||||
Flags_SetSwitch(globalCtx, 0xB);
|
Flags_SetSwitch(globalCtx, 0xB);
|
||||||
|
|
||||||
|
if (gSaveContext.n64ddFlag) {
|
||||||
|
Flags_SetTreasure(globalCtx, 0x1E);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
s32 getItemId = GetRandomizedItemId(GI_ARROW_FIRE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
s32 getItemId = GetRandomizedItemId(GI_ARROW_FIRE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||||
if (func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f)) {
|
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f);
|
||||||
Flags_SetTreasure(globalCtx, 0x1F);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||||
}
|
}
|
||||||
|
@ -141,17 +144,18 @@ void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) {
|
||||||
if ((this->actor.params & 0xFF) == 1) {
|
if ((this->actor.params & 0xFF) == 1) {
|
||||||
gSaveContext.eventChkInf[3] |= 2;
|
gSaveContext.eventChkInf[3] |= 2;
|
||||||
Flags_SetSwitch(globalCtx, 0xB);
|
Flags_SetSwitch(globalCtx, 0xB);
|
||||||
|
|
||||||
|
if (gSaveContext.n64ddFlag) {
|
||||||
|
Flags_SetTreasure(globalCtx, 0x1F);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
} else {
|
} else {
|
||||||
if (0) {} // Necessary to match
|
if (0) {} // Necessary to match
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
s32 getItemId =
|
s32 getItemId = GetRandomizedItemId(GI_LETTER_RUTO, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||||
GetRandomizedItemId(GI_ARROW_FIRE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f);
|
||||||
if (func_8002F434(&this->actor, globalCtx, getItemId, 30.0f, 50.0f)) {
|
|
||||||
Flags_SetTreasure(globalCtx, 0x1F);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +234,7 @@ void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
ItemEtcetera* this = (ItemEtcetera*)thisx;
|
ItemEtcetera* this = (ItemEtcetera*)thisx;
|
||||||
s32 type = this->actor.params & 0xFF;
|
s32 type = this->actor.params & 0xFF;
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag && type == ITEM_ETC_ARROW_FIRE) {
|
if (gSaveContext.n64ddFlag && (type == ITEM_ETC_ARROW_FIRE || type == ITEM_ETC_LETTER)) {
|
||||||
this->giDrawId = GetItemModelFromId(
|
this->giDrawId = GetItemModelFromId(
|
||||||
GetRandomizedItemId(this->getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum));
|
GetRandomizedItemId(this->getItemId, this->actor.id, this->actor.params, globalCtx->sceneNum));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue