From 3ec8932b868ce108ae38758c7348652f9a1fefb7 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Wed, 29 Jul 2026 12:35:50 -0400 Subject: [PATCH] v0.14.31 - Skip debuffs during spirit burst (flag >= 1) to prevent toggle loops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: spirit toggle ON → Imperil intercepts → toggle OFF → never fires skill. The 3-state flag for spirit burst worked, but debuffs (Imperil at step 6) came before weapon skills (step 11) in the priority chain. Each time the flag advanced past 1, Imperil fired instead of Rending Blow, consuming the turn and causing spirit to toggle off without ever using the skill. Fix: debuffs now check _spiritForSkill === 0 before firing. When spirit burst is pending (flag >= 1), skip Imperil/Weaken so the weapon skills section fires uninterrupted. --- scripts/hv-unified.user.js | 10 ++++------ scripts/latest.user.js | 10 ++++------ src/config.js | 2 +- src/header.user.js | 2 +- src/strategy-engine.js | 6 ++---- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 6ada40a..59d9f1b 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.30 +// @version 0.14.31 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -17,7 +17,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.30'; +const VERSION = '0.14.31'; const CFG = { // — Battle automation @@ -1567,10 +1567,8 @@ function strategyVeteran() { } } - // 4. Debuffs — conservative: Imperil only on bosses/rares or 5+ mobs (Grindfest) - // Weaken only on high-threat (SP >85%) or bosses. Estoc already applies - // Penetrated Armor natively, so Imperil on 2-mob waves is wasteful. - if (CFG.autoDebuff && STATE.mp > 0.35) { + // 4. Debuffs — only when NOT in spirit burst mode (flag >= 1 means skill pending) + if (STATE._spiritForSkill === 0 && CFG.autoDebuff && STATE.mp > 0.35) { // Imperil: bosses only, or 5+ mobs in Grindfest (Estoc handles <5) if (hasReadySpell('Imperil') && (anyRareMonster() || STATE.monsters.length >= 5)) { const b = findStrongestMonster(); diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 6ada40a..59d9f1b 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.30 +// @version 0.14.31 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -17,7 +17,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.30'; +const VERSION = '0.14.31'; const CFG = { // — Battle automation @@ -1567,10 +1567,8 @@ function strategyVeteran() { } } - // 4. Debuffs — conservative: Imperil only on bosses/rares or 5+ mobs (Grindfest) - // Weaken only on high-threat (SP >85%) or bosses. Estoc already applies - // Penetrated Armor natively, so Imperil on 2-mob waves is wasteful. - if (CFG.autoDebuff && STATE.mp > 0.35) { + // 4. Debuffs — only when NOT in spirit burst mode (flag >= 1 means skill pending) + if (STATE._spiritForSkill === 0 && CFG.autoDebuff && STATE.mp > 0.35) { // Imperil: bosses only, or 5+ mobs in Grindfest (Estoc handles <5) if (hasReadySpell('Imperil') && (anyRareMonster() || STATE.monsters.length >= 5)) { const b = findStrongestMonster(); diff --git a/src/config.js b/src/config.js index bd1106f..b096f97 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.30'; +const VERSION = '0.14.31'; const CFG = { // — Battle automation diff --git a/src/header.user.js b/src/header.user.js index 8befc49..3026237 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.30 +// @version 0.14.31 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* diff --git a/src/strategy-engine.js b/src/strategy-engine.js index 7747eee..77a8b26 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -841,10 +841,8 @@ function strategyVeteran() { } } - // 4. Debuffs — conservative: Imperil only on bosses/rares or 5+ mobs (Grindfest) - // Weaken only on high-threat (SP >85%) or bosses. Estoc already applies - // Penetrated Armor natively, so Imperil on 2-mob waves is wasteful. - if (CFG.autoDebuff && STATE.mp > 0.35) { + // 4. Debuffs — only when NOT in spirit burst mode (flag >= 1 means skill pending) + if (STATE._spiritForSkill === 0 && CFG.autoDebuff && STATE.mp > 0.35) { // Imperil: bosses only, or 5+ mobs in Grindfest (Estoc handles <5) if (hasReadySpell('Imperil') && (anyRareMonster() || STATE.monsters.length >= 5)) { const b = findStrongestMonster();