From cdd0fe598407e9bc872a33e599574f9c8d076d1f Mon Sep 17 00:00:00 2001 From: GaboGG Date: Wed, 22 Jul 2026 06:50:51 -0400 Subject: [PATCH] Spirit Stance: manual only, auto-disable at 65% SP (Spark needs 50%) Spark of Life consumes 50% of your SP bar when triggered. If you're in Spirit Stance with low SP, Spark fails to proc. Changes: - No auto-activation of Spirit Stance (toggle manually with S key) - Auto-disable if SP drops below 65% to reserve SP for Spark trigger - Veteran still has optional auto-activation via CFG.autoSpirit but requires SP > 65% (practically never triggers) --- scripts/hv-unified.user.js | 29 +++++++++++++---------------- scripts/latest.user.js | 29 +++++++++++++---------------- src/config.js | 4 ++-- src/strategy-engine.js | 25 +++++++++++-------------- 4 files changed, 39 insertions(+), 48 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 3c0defc..ee142d5 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -27,7 +27,7 @@ const CFG = { autoBuff: true, autoDebuff: true, autoCure: true, - autoSpirit: false, + autoSpirit: false, // Manual spirit stance only (auto-disable at 65% SP for Spark) // — Thresholds (simulation-backed) cureHP: 0.45, // Cast Cure below this HP @@ -36,7 +36,7 @@ const CFG = { manaGemMP: 0.45, // Use mana gems below this MP manaPotionMP: 0.25, // Use mana potions at this MP spiritPotionSP: 0.30, // Use spirit gems/potions below this SP - spiritStanceOC: 80, // Activate Spirit Stance late (save SP for skills) + spiritStanceOC: 80, // Manual spirit stance only (auto-disable at 65% SP for Spark) skillOC: 75, // Use weapon skills at this OC useAttackSpells: false, // Don't use attack spells (let channel proc naturally) @@ -1021,17 +1021,11 @@ function strategyAdept() { } } - // 6. Spirit Stance at OC 60 — only if we have enough SP to sustain it - // Costs 1 SP + 10% OC per round (wiki formula) - // Minimum 40% SP = ~20 rounds of sustain before we run out - // This prevents wasting a turn toggling on/off when SP is low - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.40 && !STATE._spiritCooldown) { - STATE._spiritCooldown = 3; - return { type: 'toggle_spirit' }; - } - // Toggle off when SP is critically low - if (STATE.sp < 0.03 && STATE.spiritStance && !STATE._spiritCooldown) { - STATE._spiritCooldown = 3; + // 6. Spirit Stance — manual only (no auto-activation) + // Spark of Life consumes 50% SP when triggered. Auto-disable if SP + // drops below 65% to ensure Spark always has enough SP. + if (STATE.spiritStance && STATE.sp < 0.65 && !STATE._spiritCooldown) { + STATE._spiritCooldown = 5; return { type: 'toggle_spirit' }; } if (STATE._spiritCooldown > 0) STATE._spiritCooldown--; @@ -1129,11 +1123,14 @@ function strategyVeteran() { } } - // 5. Spirit Stance at OC 60 - if (CFG.autoSpirit && STATE.oc >= CFG.spiritStanceOC && !STATE.spiritStance && STATE.sp > 0.10) + // 5. Spirit Stance — manual only. Auto-disable if SP < 65% (Spark needs 50%) + if (CFG.autoSpirit && STATE.oc >= CFG.spiritStanceOC && !STATE.spiritStance && STATE.sp > 0.65) return { type: 'toggle_spirit' }; - if (STATE.sp < 0.03 && STATE.spiritStance) + if (STATE.spiritStance && STATE.sp < 0.65 && !STATE._spiritCooldown) { + STATE._spiritCooldown = 5; return { type: 'toggle_spirit' }; + } + if (STATE._spiritCooldown > 0) STATE._spiritCooldown--; // 6. Weapon skills only at OC thresholds (let OC build via basic attacks) const askillOC3 = CFG.skillOC || 80; diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 3c0defc..ee142d5 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -27,7 +27,7 @@ const CFG = { autoBuff: true, autoDebuff: true, autoCure: true, - autoSpirit: false, + autoSpirit: false, // Manual spirit stance only (auto-disable at 65% SP for Spark) // — Thresholds (simulation-backed) cureHP: 0.45, // Cast Cure below this HP @@ -36,7 +36,7 @@ const CFG = { manaGemMP: 0.45, // Use mana gems below this MP manaPotionMP: 0.25, // Use mana potions at this MP spiritPotionSP: 0.30, // Use spirit gems/potions below this SP - spiritStanceOC: 80, // Activate Spirit Stance late (save SP for skills) + spiritStanceOC: 80, // Manual spirit stance only (auto-disable at 65% SP for Spark) skillOC: 75, // Use weapon skills at this OC useAttackSpells: false, // Don't use attack spells (let channel proc naturally) @@ -1021,17 +1021,11 @@ function strategyAdept() { } } - // 6. Spirit Stance at OC 60 — only if we have enough SP to sustain it - // Costs 1 SP + 10% OC per round (wiki formula) - // Minimum 40% SP = ~20 rounds of sustain before we run out - // This prevents wasting a turn toggling on/off when SP is low - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.40 && !STATE._spiritCooldown) { - STATE._spiritCooldown = 3; - return { type: 'toggle_spirit' }; - } - // Toggle off when SP is critically low - if (STATE.sp < 0.03 && STATE.spiritStance && !STATE._spiritCooldown) { - STATE._spiritCooldown = 3; + // 6. Spirit Stance — manual only (no auto-activation) + // Spark of Life consumes 50% SP when triggered. Auto-disable if SP + // drops below 65% to ensure Spark always has enough SP. + if (STATE.spiritStance && STATE.sp < 0.65 && !STATE._spiritCooldown) { + STATE._spiritCooldown = 5; return { type: 'toggle_spirit' }; } if (STATE._spiritCooldown > 0) STATE._spiritCooldown--; @@ -1129,11 +1123,14 @@ function strategyVeteran() { } } - // 5. Spirit Stance at OC 60 - if (CFG.autoSpirit && STATE.oc >= CFG.spiritStanceOC && !STATE.spiritStance && STATE.sp > 0.10) + // 5. Spirit Stance — manual only. Auto-disable if SP < 65% (Spark needs 50%) + if (CFG.autoSpirit && STATE.oc >= CFG.spiritStanceOC && !STATE.spiritStance && STATE.sp > 0.65) return { type: 'toggle_spirit' }; - if (STATE.sp < 0.03 && STATE.spiritStance) + if (STATE.spiritStance && STATE.sp < 0.65 && !STATE._spiritCooldown) { + STATE._spiritCooldown = 5; return { type: 'toggle_spirit' }; + } + if (STATE._spiritCooldown > 0) STATE._spiritCooldown--; // 6. Weapon skills only at OC thresholds (let OC build via basic attacks) const askillOC3 = CFG.skillOC || 80; diff --git a/src/config.js b/src/config.js index 737ba77..dbecee7 100644 --- a/src/config.js +++ b/src/config.js @@ -12,7 +12,7 @@ const CFG = { autoBuff: true, autoDebuff: true, autoCure: true, - autoSpirit: false, + autoSpirit: false, // Manual spirit stance only (auto-disable at 65% SP for Spark) // — Thresholds (simulation-backed) cureHP: 0.45, // Cast Cure below this HP @@ -21,7 +21,7 @@ const CFG = { manaGemMP: 0.45, // Use mana gems below this MP manaPotionMP: 0.25, // Use mana potions at this MP spiritPotionSP: 0.30, // Use spirit gems/potions below this SP - spiritStanceOC: 80, // Activate Spirit Stance late (save SP for skills) + spiritStanceOC: 80, // Manual spirit stance only (auto-disable at 65% SP for Spark) skillOC: 75, // Use weapon skills at this OC useAttackSpells: false, // Don't use attack spells (let channel proc naturally) diff --git a/src/strategy-engine.js b/src/strategy-engine.js index 1b3021b..34829b4 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -376,17 +376,11 @@ function strategyAdept() { } } - // 6. Spirit Stance at OC 60 — only if we have enough SP to sustain it - // Costs 1 SP + 10% OC per round (wiki formula) - // Minimum 40% SP = ~20 rounds of sustain before we run out - // This prevents wasting a turn toggling on/off when SP is low - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.40 && !STATE._spiritCooldown) { - STATE._spiritCooldown = 3; - return { type: 'toggle_spirit' }; - } - // Toggle off when SP is critically low - if (STATE.sp < 0.03 && STATE.spiritStance && !STATE._spiritCooldown) { - STATE._spiritCooldown = 3; + // 6. Spirit Stance — manual only (no auto-activation) + // Spark of Life consumes 50% SP when triggered. Auto-disable if SP + // drops below 65% to ensure Spark always has enough SP. + if (STATE.spiritStance && STATE.sp < 0.65 && !STATE._spiritCooldown) { + STATE._spiritCooldown = 5; return { type: 'toggle_spirit' }; } if (STATE._spiritCooldown > 0) STATE._spiritCooldown--; @@ -484,11 +478,14 @@ function strategyVeteran() { } } - // 5. Spirit Stance at OC 60 - if (CFG.autoSpirit && STATE.oc >= CFG.spiritStanceOC && !STATE.spiritStance && STATE.sp > 0.10) + // 5. Spirit Stance — manual only. Auto-disable if SP < 65% (Spark needs 50%) + if (CFG.autoSpirit && STATE.oc >= CFG.spiritStanceOC && !STATE.spiritStance && STATE.sp > 0.65) return { type: 'toggle_spirit' }; - if (STATE.sp < 0.03 && STATE.spiritStance) + if (STATE.spiritStance && STATE.sp < 0.65 && !STATE._spiritCooldown) { + STATE._spiritCooldown = 5; return { type: 'toggle_spirit' }; + } + if (STATE._spiritCooldown > 0) STATE._spiritCooldown--; // 6. Weapon skills only at OC thresholds (let OC build via basic attacks) const askillOC3 = CFG.skillOC || 80;