mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
Add faster farores enhancement (#2394)
* Add faster farores enhancement * Add preset entry
This commit is contained in:
parent
6d6c1c8c32
commit
7a75fe8411
@ -177,6 +177,7 @@ const std::vector<const char*> enhancementsCvars = {
|
|||||||
"gSilverRupeeJingleExtend",
|
"gSilverRupeeJingleExtend",
|
||||||
"gStaticExplosionRadius",
|
"gStaticExplosionRadius",
|
||||||
"gNoInputForCredits",
|
"gNoInputForCredits",
|
||||||
|
"gFastFarores",
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<const char*> randomizerCvars = {
|
const std::vector<const char*> randomizerCvars = {
|
||||||
@ -620,6 +621,8 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
|
|||||||
PRESET_ENTRY_S32("gMinFrameCount", 200),
|
PRESET_ENTRY_S32("gMinFrameCount", 200),
|
||||||
|
|
||||||
PRESET_ENTRY_S32("gNoInputForCredits", 1),
|
PRESET_ENTRY_S32("gNoInputForCredits", 1),
|
||||||
|
|
||||||
|
PRESET_ENTRY_S32("gFastFarores", 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<PresetEntry> s6PresetEntries = {
|
const std::vector<PresetEntry> s6PresetEntries = {
|
||||||
|
@ -374,6 +374,8 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Exit Market at Night", "gMarketSneak", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Exit Market at Night", "gMarketSneak", true, false);
|
||||||
UIWidgets::Tooltip("Allows exiting Hyrule Castle Market Town to Hyrule Field at night by speaking "
|
UIWidgets::Tooltip("Allows exiting Hyrule Castle Market Town to Hyrule Field at night by speaking "
|
||||||
"to the guard next to the gate.");
|
"to the guard next to the gate.");
|
||||||
|
UIWidgets::PaddedEnhancementCheckbox("Faster Farore's Wind", "gFastFarores", true, false);
|
||||||
|
UIWidgets::Tooltip("Greatly increases cast time of Farore's Wind magic spell.");
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2311,7 +2311,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
|||||||
D_8015BC14 = 60;
|
D_8015BC14 = 60;
|
||||||
D_8015BC18 = 1.0f;
|
D_8015BC18 = 1.0f;
|
||||||
} else if (D_8015BC14) {
|
} else if (D_8015BC14) {
|
||||||
D_8015BC14--;
|
D_8015BC14-= CVarGetInteger("gFastFarores", 0) ? 5 : 1;
|
||||||
} else if (D_8015BC18 > 0.0f) {
|
} else if (D_8015BC18 > 0.0f) {
|
||||||
static Vec3f effectVel = { 0.0f, -0.05f, 0.0f };
|
static Vec3f effectVel = { 0.0f, -0.05f, 0.0f };
|
||||||
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
|
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
|
||||||
|
@ -4969,7 +4969,14 @@ void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) {
|
|||||||
this->unk_84F = magicSpell - 3;
|
this->unk_84F = magicSpell - 3;
|
||||||
func_80087708(play, sMagicSpellCosts[magicSpell], 4);
|
func_80087708(play, sMagicSpellCosts[magicSpell], 4);
|
||||||
|
|
||||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, &gPlayerAnim_link_magic_tame, 0.83f);
|
u8 isFastFarores = CVarGetInteger("gFastFarores", 0) && this->itemAction == PLAYER_IA_FARORES_WIND;
|
||||||
|
|
||||||
|
if (isFastFarores) {
|
||||||
|
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, &gPlayerAnim_link_magic_tame, 0.83f * 2);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, &gPlayerAnim_link_magic_tame, 0.83f);
|
||||||
|
}
|
||||||
|
|
||||||
if (magicSpell == 5) {
|
if (magicSpell == 5) {
|
||||||
this->subCamId = OnePointCutscene_Init(play, 1100, -101, NULL, MAIN_CAM);
|
this->subCamId = OnePointCutscene_Init(play, 1100, -101, NULL, MAIN_CAM);
|
||||||
@ -13794,15 +13801,16 @@ static struct_80832924 D_80854A8C[][2] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void func_808507F4(Player* this, PlayState* play) {
|
void func_808507F4(Player* this, PlayState* play) {
|
||||||
|
u8 isFastFarores = CVarGetInteger("gFastFarores", 0) && this->itemAction == PLAYER_IA_FARORES_WIND;
|
||||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||||
if (this->unk_84F < 0) {
|
if (this->unk_84F < 0) {
|
||||||
if ((this->itemAction == PLAYER_IA_NAYRUS_LOVE) || (gSaveContext.magicState == 0)) {
|
if ((this->itemAction == PLAYER_IA_NAYRUS_LOVE) || isFastFarores || (gSaveContext.magicState == 0)) {
|
||||||
func_80839FFC(this, play);
|
func_80839FFC(this, play);
|
||||||
func_8005B1A4(Play_GetCamera(play, 0));
|
func_8005B1A4(Play_GetCamera(play, 0));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this->unk_850 == 0) {
|
if (this->unk_850 == 0) {
|
||||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A58[this->unk_84F], 0.83f);
|
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A58[this->unk_84F], 0.83f * (isFastFarores ? 2 : 1));
|
||||||
|
|
||||||
if (func_80846A00(play, this, this->unk_84F) != NULL) {
|
if (func_80846A00(play, this, this->unk_84F) != NULL) {
|
||||||
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
|
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
|
||||||
@ -13813,7 +13821,7 @@ void func_808507F4(Player* this, PlayState* play) {
|
|||||||
func_800876C8(play);
|
func_800876C8(play);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LinkAnimation_PlayLoopSetSpeed(play, &this->skelAnime, D_80854A64[this->unk_84F], 0.83f);
|
LinkAnimation_PlayLoopSetSpeed(play, &this->skelAnime, D_80854A64[this->unk_84F], 0.83f * (isFastFarores ? 2 : 1));
|
||||||
|
|
||||||
if (this->unk_84F == 0) {
|
if (this->unk_84F == 0) {
|
||||||
this->unk_850 = -10;
|
this->unk_850 = -10;
|
||||||
@ -13849,8 +13857,8 @@ void func_808507F4(Player* this, PlayState* play) {
|
|||||||
if ((this->unk_84F == 2) && LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) {
|
if ((this->unk_84F == 2) && LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) {
|
||||||
this->stateFlags1 &= ~(PLAYER_STATE1_28 | PLAYER_STATE1_29);
|
this->stateFlags1 &= ~(PLAYER_STATE1_28 | PLAYER_STATE1_29);
|
||||||
}
|
}
|
||||||
} else if (D_80854A7C[this->unk_84F] < this->unk_850++) {
|
} else if ((isFastFarores ? 10 : D_80854A7C[this->unk_84F]) < this->unk_850++) {
|
||||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A70[this->unk_84F], 0.83f);
|
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80854A70[this->unk_84F], 0.83f * (isFastFarores ? 2 : 1));
|
||||||
this->currentYaw = this->actor.shape.rot.y;
|
this->currentYaw = this->actor.shape.rot.y;
|
||||||
this->unk_84F = -1;
|
this->unk_84F = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user