mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
zelda & impa & malon fully working
This commit is contained in:
parent
72ef5de447
commit
7c748e74ed
4 changed files with 25 additions and 25 deletions
|
@ -413,7 +413,7 @@ void Sram_OpenSave(SramContext* sramCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
||||||
if ((gSaveContext.eventChkInf[4] & 1) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) {
|
if ((gSaveContext.eventChkInf[4] & 1) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
|
||||||
i = gSaveContext.eventChkInf[4] & ~1;
|
i = gSaveContext.eventChkInf[4] & ~1;
|
||||||
gSaveContext.eventChkInf[4] = i;
|
gSaveContext.eventChkInf[4] = i;
|
||||||
|
|
||||||
|
|
|
@ -901,7 +901,8 @@ void func_80986BF8(DemoIm* this, GlobalContext* globalCtx) {
|
||||||
u8 successImpa;
|
u8 successImpa;
|
||||||
void GivePlayerRandoRewardImpa(Actor* impa, GlobalContext* globalCtx, RandomizerCheck check) {
|
void GivePlayerRandoRewardImpa(Actor* impa, GlobalContext* globalCtx, RandomizerCheck check) {
|
||||||
if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
||||||
if (successImpa == 0) {
|
if (successImpa == 0 && (globalCtx->actorCtx.titleCtx.delayTimer == 0) &&
|
||||||
|
(globalCtx->actorCtx.titleCtx.alpha == 0)) {
|
||||||
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
||||||
|
|
||||||
if (func_8002F434(impa, globalCtx, getItemId, 100.0f, 50.0f) == true) {
|
if (func_8002F434(impa, globalCtx, getItemId, 100.0f, 50.0f) == true) {
|
||||||
|
|
|
@ -328,7 +328,6 @@ void func_80AA0EA0(EnMa1* this, GlobalContext* globalCtx) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = func_80AA0EFC;
|
this->actionFunc = func_80AA0EFC;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
if (gSaveContext.n64ddFlag) {
|
||||||
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(HC_GREAT_FAIRY_REWARD, GI_LETTER_ZELDA);
|
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(HC_GREAT_FAIRY_REWARD, GI_LETTER_ZELDA);
|
||||||
func_8002F434(&this->actor, globalCtx, getItemId, 120.0f, 10.0f);
|
func_8002F434(&this->actor, globalCtx, getItemId, 120.0f, 10.0f);
|
||||||
|
@ -347,19 +346,20 @@ void func_80AA0EFC(EnMa1* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 malonSuccess;
|
void GivePlayerRandoRewardMalon(EnMa1* malon, GlobalContext* globalCtx, RandomizerCheck check) {
|
||||||
void GivePlayerRandoRewardMalon(EnMa1* zelda, GlobalContext* globalCtx, RandomizerCheck check) {
|
Player* player = GET_PLAYER(globalCtx);
|
||||||
if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
|
||||||
if (malonSuccess == 0) {
|
|
||||||
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
|
||||||
|
|
||||||
if (func_8002F434(&zelda->actor, globalCtx, getItemId, 100.0f, 50.0f) == true) {
|
if (!Flags_GetTreasure(globalCtx, 0x1F) &&
|
||||||
malonSuccess = 1;
|
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE || INV_CONTENT(ITEM_OCARINA_TIME) != ITEM_NONE) &&
|
||||||
}
|
Actor_TextboxIsClosing(&malon->actor, globalCtx)) {
|
||||||
} else if (malonSuccess == 1) {
|
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
||||||
gSaveContext.unk_13EE = 0x32;
|
|
||||||
gSaveContext.eventChkInf[4] |= 1;
|
if (func_8002F434(&malon->actor, globalCtx, getItemId, 100.0f, 50.0f) == true) {
|
||||||
|
Flags_SetTreasure(globalCtx, 0x1F);
|
||||||
}
|
}
|
||||||
|
} else if (Flags_GetTreasure(globalCtx, 0x1F) && !Player_InBlockingCsMode(globalCtx, player)) {
|
||||||
|
gSaveContext.unk_13EE = 0x32;
|
||||||
|
gSaveContext.eventChkInf[4] |= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,6 +376,11 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gSaveContext.n64ddFlag) {
|
||||||
|
GivePlayerRandoRewardMalon(this, globalCtx, HC_ZELDAS_LETTER);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (gSaveContext.eventChkInf[1] & 0x40) {
|
if (gSaveContext.eventChkInf[1] & 0x40) {
|
||||||
if (player->stateFlags2 & 0x1000000) {
|
if (player->stateFlags2 & 0x1000000) {
|
||||||
player->stateFlags2 |= 0x2000000;
|
player->stateFlags2 |= 0x2000000;
|
||||||
|
@ -420,13 +425,6 @@ void func_80AA1150(EnMa1* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (gSaveContext.n64ddFlag) {
|
|
||||||
GivePlayerRandoRewardMalon(this, globalCtx, HC_ZELDAS_LETTER);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void EnMa1_DoNothing(EnMa1* this, GlobalContext* globalCtx) {
|
void EnMa1_DoNothing(EnMa1* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,16 +227,17 @@ u16 EnZl4_GetText(GlobalContext* globalCtx, Actor* thisx) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 zeldaSuccess;
|
|
||||||
void GivePlayerRandoRewardZeldaChild(EnZl4* zelda, GlobalContext* globalCtx, RandomizerCheck check) {
|
void GivePlayerRandoRewardZeldaChild(EnZl4* zelda, GlobalContext* globalCtx, RandomizerCheck check) {
|
||||||
if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
||||||
if (zeldaSuccess == 0) {
|
if (!Flags_GetTreasure(globalCtx, 0x1F) && Actor_TextboxIsClosing(&zelda->actor, globalCtx) &&
|
||||||
|
gSaveContext.eventChkInf[4] != 1 && (globalCtx->actorCtx.titleCtx.delayTimer == 0) &&
|
||||||
|
(globalCtx->actorCtx.titleCtx.alpha == 0)) {
|
||||||
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
GetItemID getItemId = GetRandomizedItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
||||||
|
|
||||||
if (func_8002F434(&zelda->actor, globalCtx, getItemId, 100.0f, 50.0f) == true) {
|
if (func_8002F434(&zelda->actor, globalCtx, getItemId, 100.0f, 50.0f) == true) {
|
||||||
zeldaSuccess = 1;
|
Flags_SetTreasure(globalCtx, 0x1F);
|
||||||
}
|
}
|
||||||
} else if (zeldaSuccess == 1) {
|
} else if (Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||||
gSaveContext.unk_13EE = 0x32;
|
gSaveContext.unk_13EE = 0x32;
|
||||||
gSaveContext.eventChkInf[4] |= 1;
|
gSaveContext.eventChkInf[4] |= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue