From ad2ff4b482ecd4b5cdec26ff0a20c7976fe62482 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Sun, 26 Jul 2026 15:26:51 -0400 Subject: [PATCH] v0.13.27 - Remove auto Spirit Stance toggle from all tiers - Removed toggle_spirit calls from Novice, Adept, and Veteran strategy functions (was auto-toggling stance at OC 60+) - Spirit Stance is now fully manual (press spirit button yourself) - Spirit Gem auto-consumption remains (fills SP when dropped) - Kept the config guards (CFG.autoSpirit) for future opt-in --- scripts/hv-unified.user.js | 31 ++++--------------------------- scripts/latest.user.js | 31 ++++--------------------------- src/strategy-engine.js | 31 ++++--------------------------- 3 files changed, 12 insertions(+), 81 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 9baa45b..9873501 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -1058,11 +1058,10 @@ function strategyNovice() { const gem = hasUsableGem('mana'); if (gem) return { type: 'item', id: gem.id, selfTarget: true }; } - // Spirit gem (P-slot) — use immediately when available (free to refill) + // Spirit gem (P-slot) — auto-consume when available const pGem = document.getElementById('ikey_p'); const pGemId = pGem ? (pGem.getAttribute('onmouseover') || '').match(/set_infopane_item\((\d+)\)/) : null; if (pGemId && pGemId[1] === '10007') { - // P-slot has a Spirit Gem (10007) — use it if (hasUsableGem('spirit')) return { type: 'item', id: 'p', selfTarget: true }; } // Spirit draughts/potions — only when SP drops below threshold @@ -1077,11 +1076,7 @@ function strategyNovice() { } } - // 5. Spirit Stance at OC 60 — but only if we have SP to sustain it - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) - return { type: 'toggle_spirit' }; - - // 6. Weapon skills only at OC thresholds with specific conditions + // 5. Weapon skills — these are better than basic attacks const skillOC = CFG.skillOC || 80; if (STATE.oc >= skillOC) { // Great Cleave: boss/rare fights only @@ -1180,7 +1175,7 @@ function strategyAdept() { const gem = hasUsableGem('mana'); if (gem) return { type: 'item', id: gem.id, selfTarget: true }; } - // Spirit gem (P-slot) — use immediately + // Spirit gem (P-slot) — auto-consume when available const apGem = document.getElementById('ikey_p'); const apGemId = apGem ? (apGem.getAttribute('onmouseover') || '').match(/set_infopane_item\((\d+)\)/) : null; if (apGemId && apGemId[1] === '10007') { @@ -1234,16 +1229,7 @@ function strategyAdept() { } } - // 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--; - - // 7. Damage spells + // 5. Damage spells const dmg = CFG.useAttackSpells ? getBestDamageSpell() : null; if (dmg && STATE.mp > 0.2) { const t = STATE.monsters.length > 1 ? findWeakestMonster() : findStrongestMonster(); @@ -1343,15 +1329,6 @@ function strategyVeteran() { } } - // 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.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; if (STATE.oc >= askillOC3) { diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 9baa45b..9873501 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1058,11 +1058,10 @@ function strategyNovice() { const gem = hasUsableGem('mana'); if (gem) return { type: 'item', id: gem.id, selfTarget: true }; } - // Spirit gem (P-slot) — use immediately when available (free to refill) + // Spirit gem (P-slot) — auto-consume when available const pGem = document.getElementById('ikey_p'); const pGemId = pGem ? (pGem.getAttribute('onmouseover') || '').match(/set_infopane_item\((\d+)\)/) : null; if (pGemId && pGemId[1] === '10007') { - // P-slot has a Spirit Gem (10007) — use it if (hasUsableGem('spirit')) return { type: 'item', id: 'p', selfTarget: true }; } // Spirit draughts/potions — only when SP drops below threshold @@ -1077,11 +1076,7 @@ function strategyNovice() { } } - // 5. Spirit Stance at OC 60 — but only if we have SP to sustain it - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) - return { type: 'toggle_spirit' }; - - // 6. Weapon skills only at OC thresholds with specific conditions + // 5. Weapon skills — these are better than basic attacks const skillOC = CFG.skillOC || 80; if (STATE.oc >= skillOC) { // Great Cleave: boss/rare fights only @@ -1180,7 +1175,7 @@ function strategyAdept() { const gem = hasUsableGem('mana'); if (gem) return { type: 'item', id: gem.id, selfTarget: true }; } - // Spirit gem (P-slot) — use immediately + // Spirit gem (P-slot) — auto-consume when available const apGem = document.getElementById('ikey_p'); const apGemId = apGem ? (apGem.getAttribute('onmouseover') || '').match(/set_infopane_item\((\d+)\)/) : null; if (apGemId && apGemId[1] === '10007') { @@ -1234,16 +1229,7 @@ function strategyAdept() { } } - // 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--; - - // 7. Damage spells + // 5. Damage spells const dmg = CFG.useAttackSpells ? getBestDamageSpell() : null; if (dmg && STATE.mp > 0.2) { const t = STATE.monsters.length > 1 ? findWeakestMonster() : findStrongestMonster(); @@ -1343,15 +1329,6 @@ function strategyVeteran() { } } - // 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.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; if (STATE.oc >= askillOC3) { diff --git a/src/strategy-engine.js b/src/strategy-engine.js index 3d12a82..505d345 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -372,11 +372,10 @@ function strategyNovice() { const gem = hasUsableGem('mana'); if (gem) return { type: 'item', id: gem.id, selfTarget: true }; } - // Spirit gem (P-slot) — use immediately when available (free to refill) + // Spirit gem (P-slot) — auto-consume when available const pGem = document.getElementById('ikey_p'); const pGemId = pGem ? (pGem.getAttribute('onmouseover') || '').match(/set_infopane_item\((\d+)\)/) : null; if (pGemId && pGemId[1] === '10007') { - // P-slot has a Spirit Gem (10007) — use it if (hasUsableGem('spirit')) return { type: 'item', id: 'p', selfTarget: true }; } // Spirit draughts/potions — only when SP drops below threshold @@ -391,11 +390,7 @@ function strategyNovice() { } } - // 5. Spirit Stance at OC 60 — but only if we have SP to sustain it - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) - return { type: 'toggle_spirit' }; - - // 6. Weapon skills only at OC thresholds with specific conditions + // 5. Weapon skills — these are better than basic attacks const skillOC = CFG.skillOC || 80; if (STATE.oc >= skillOC) { // Great Cleave: boss/rare fights only @@ -494,7 +489,7 @@ function strategyAdept() { const gem = hasUsableGem('mana'); if (gem) return { type: 'item', id: gem.id, selfTarget: true }; } - // Spirit gem (P-slot) — use immediately + // Spirit gem (P-slot) — auto-consume when available const apGem = document.getElementById('ikey_p'); const apGemId = apGem ? (apGem.getAttribute('onmouseover') || '').match(/set_infopane_item\((\d+)\)/) : null; if (apGemId && apGemId[1] === '10007') { @@ -548,16 +543,7 @@ function strategyAdept() { } } - // 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--; - - // 7. Damage spells + // 5. Damage spells const dmg = CFG.useAttackSpells ? getBestDamageSpell() : null; if (dmg && STATE.mp > 0.2) { const t = STATE.monsters.length > 1 ? findWeakestMonster() : findStrongestMonster(); @@ -657,15 +643,6 @@ function strategyVeteran() { } } - // 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.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; if (STATE.oc >= askillOC3) {