v0.14.24 - Fix spirit burst toggle-off (was stuck ON after Rending Blow killed <7 mobs)

- The toggle-off (state 2 -> OFF) was inside the monsters.length >= 7 check
- If Rending Blow killed enough enemies to drop below 7, the else block
  reset _spiritForSkill = 0 without toggling spirit off, leaving it ON
- Now toggle-off guard runs independently of monster count
- Also resets flag if spirit gets toggled externally
This commit is contained in:
GaboGG 2026-07-28 09:19:22 -04:00
parent f42e44db34
commit 7c714eb589
5 changed files with 27 additions and 12 deletions

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.14.23
// @version 0.14.24
// @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.23';
const VERSION = '0.14.24';
const CFG = {
// — Battle automation
@ -1462,9 +1462,14 @@ function strategyVeteran() {
STATE._spiritForSkill = 1;
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
}
} else {
STATE._spiritForSkill = 0;
}
// Toggle-off guard: if flag says skill was cast, toggle off even if mob count dropped
if (STATE._spiritForSkill === 2 && STATE.spiritStance) {
STATE._spiritForSkill = 0;
return { type: 'toggle_spirit', _reason: 'spirit_off_7' };
}
// Reset flag if spirit got turned off externally
if (!STATE.spiritStance) STATE._spiritForSkill = 0;
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
const SINGLE_THREAT = Math.round(120 * 90 / 100);

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.14.23
// @version 0.14.24
// @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.23';
const VERSION = '0.14.24';
const CFG = {
// — Battle automation
@ -1462,9 +1462,14 @@ function strategyVeteran() {
STATE._spiritForSkill = 1;
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
}
} else {
STATE._spiritForSkill = 0;
}
// Toggle-off guard: if flag says skill was cast, toggle off even if mob count dropped
if (STATE._spiritForSkill === 2 && STATE.spiritStance) {
STATE._spiritForSkill = 0;
return { type: 'toggle_spirit', _reason: 'spirit_off_7' };
}
// Reset flag if spirit got turned off externally
if (!STATE.spiritStance) STATE._spiritForSkill = 0;
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
const SINGLE_THREAT = Math.round(120 * 90 / 100);

View file

@ -2,7 +2,7 @@
// CONFIG — default settings
// ═══════════════════════════════════════════════════════════════════════
const VERSION = '0.14.23';
const VERSION = '0.14.24';
const CFG = {
// — Battle automation

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name HV Unified
// @namespace hvunified
// @version 0.14.23
// @version 0.14.24
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
// @author GaboGG + Hermes
// @match *://*.hentaiverse.org/*

View file

@ -736,9 +736,14 @@ function strategyVeteran() {
STATE._spiritForSkill = 1;
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
}
} else {
STATE._spiritForSkill = 0;
}
// Toggle-off guard: if flag says skill was cast, toggle off even if mob count dropped
if (STATE._spiritForSkill === 2 && STATE.spiritStance) {
STATE._spiritForSkill = 0;
return { type: 'toggle_spirit', _reason: 'spirit_off_7' };
}
// Reset flag if spirit got turned off externally
if (!STATE.spiritStance) STATE._spiritForSkill = 0;
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
const SINGLE_THREAT = Math.round(120 * 90 / 100);