diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index a2cc40d24..a89d14574 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -86,6 +86,7 @@ const std::vector enhancementsCvars = { "gNoHeartDrops", "gBombchuDrops", "gGoronPot", + "gFullHealthSpawn", "gDampeWin", "gRedPotionEffect", "gRedPotionHealth", diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index a1bcdbec1..07fd67440 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -443,6 +443,8 @@ namespace GameMenuBar { 32x: Can survive void damage with max health and double defense\n\ 64x: Cannot survive void damage" ); + UIWidgets::PaddedEnhancementCheckbox("Spawn with full health", "gFullHealthSpawn", true, false); + UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts"); UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false); UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses"); bool forceEnableBombchuDrops = gSaveContext.n64ddFlag && diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index fc2f5f561..40dcca14c 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -207,7 +207,7 @@ void Sram_OpenSave() { osSyncPrintf(VT_RST); if (gSaveContext.health < 0x30) { - gSaveContext.health = 0x30; + gSaveContext.health = CVarGetInteger("gFullHealthSpawn", 0) ? gSaveContext.healthCapacity : 0x30; } if (gSaveContext.scarecrowLongSongSet) { diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index f2e87db28..54d23405d 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -4158,7 +4158,7 @@ void KaleidoScope_Update(PlayState* play) Grotto_ForceGrottoReturn(); } gSaveContext.nextTransitionType = 2; - gSaveContext.health = 0x30; + gSaveContext.health = CVarGetInteger("gFullHealthSpawn", 0) ? gSaveContext.healthCapacity : 0x30; Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA); gSaveContext.healthAccumulator = 0; gSaveContext.magicState = 0;