ADD: Rando Spiritual Stones Power (#910)

* ADD: Try to use Spiritual Stone alpha on altar

Not super advanced but it kinda work, n eeds to figure out why the gSaveContext.inventory.questItems doesn't seems to care

* TWEAK: Full working + added on child link side

* TWEAK: added else with comment

* frogot a }
This commit is contained in:
PurpleHato 2022-07-27 00:46:02 +02:00 committed by GitHub
parent 8bdc4458c7
commit 477cf7f6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 55 additions and 0 deletions

View File

@ -1540,7 +1540,34 @@ void DemoEffect_UpdateJewelAdult(DemoEffect* this, GlobalContext* globalCtx) {
this->jewel.timer++;
this->actor.shape.rot.y += 0x0400;
DemoEffect_PlayJewelSfx(this, globalCtx);
if (gSaveContext.n64ddFlag) {
switch (this->jewel.type) {
case DEMO_EFFECT_JEWEL_KOKIRI:
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
DemoEffect_SetJewelColor(this, 1.0f);
} else {
DemoEffect_SetJewelColor(this, 0.0f);
}
break;
case DEMO_EFFECT_JEWEL_GORON:
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
DemoEffect_SetJewelColor(this, 1.0f);
} else {
DemoEffect_SetJewelColor(this, 0.0f);
}
break;
case DEMO_EFFECT_JEWEL_ZORA:
if (CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) {
DemoEffect_SetJewelColor(this, 1.0f);
} else {
DemoEffect_SetJewelColor(this, 0.0f);
}
break;
}
} else {
DemoEffect_SetJewelColor(this, 1.0f);
}
}
/**
@ -1604,6 +1631,34 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, GlobalContext* globalCtx) {
thisx->shape.rot.y += 0x0400;
DemoEffect_PlayJewelSfx(this, globalCtx);
this->effectFlags &= ~1;
if (gSaveContext.n64ddFlag) {
switch (this->jewel.type) {
case DEMO_EFFECT_JEWEL_KOKIRI:
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
DemoEffect_SetJewelColor(this, 1.0f);
} else {
DemoEffect_SetJewelColor(this, 0.0f);
}
break;
case DEMO_EFFECT_JEWEL_GORON:
if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
DemoEffect_SetJewelColor(this, 1.0f);
} else {
DemoEffect_SetJewelColor(this, 0.0f);
}
break;
case DEMO_EFFECT_JEWEL_ZORA:
if (CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) {
DemoEffect_SetJewelColor(this, 1.0f);
} else {
DemoEffect_SetJewelColor(this, 0.0f);
}
break;
}
} else {
// Contrary to it's adult conterpart Authenthic doesn't use DemoEffect_SetJewelColor(this, 1.0f); here
}
}
/**