From e914c08475065e8ff366244a8b59d23ea9d5cc86 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Sun, 26 Jul 2026 14:31:38 -0400 Subject: [PATCH] v0.13.19 - Fix on-cooldown spells missing from spellsKnown - Magic pane query used '.btsd[onclick]' which excludes on-cooldown spells (opacity:0.5, no onclick attribute) - Heartseeker was invisible to hasSpell() during its cooldown period, which is exactly when channeling procs from it - Changed to '.btsd' with onmouseover fallback --- scripts/hv-unified.user.js | 8 +++++--- scripts/latest.user.js | 8 +++++--- src/battle-parser.js | 4 +++- src/config.js | 2 +- src/header.user.js | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 8fcb6c7..508784f 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.13.18 +// @version 0.13.19 // @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.13.18'; +const VERSION = '0.13.19'; const CFG = { // — Battle automation @@ -428,8 +428,10 @@ function parseBattleState() { STATE.spellsKnown = []; const magicPane = document.getElementById('pane_magic'); if (magicPane) { - $$('.btsd[onclick]', magicPane).forEach(el => { + // Read all btsd elements with onmouseover (including on-cooldown spells) + $$('.btsd', magicPane).forEach(el => { const omo = el.getAttribute('onmouseover') || ''; + if (!omo) return; const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/); if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) }); }); diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 8fcb6c7..508784f 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.13.18 +// @version 0.13.19 // @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.13.18'; +const VERSION = '0.13.19'; const CFG = { // — Battle automation @@ -428,8 +428,10 @@ function parseBattleState() { STATE.spellsKnown = []; const magicPane = document.getElementById('pane_magic'); if (magicPane) { - $$('.btsd[onclick]', magicPane).forEach(el => { + // Read all btsd elements with onmouseover (including on-cooldown spells) + $$('.btsd', magicPane).forEach(el => { const omo = el.getAttribute('onmouseover') || ''; + if (!omo) return; const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/); if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) }); }); diff --git a/src/battle-parser.js b/src/battle-parser.js index e635136..a5082b0 100644 --- a/src/battle-parser.js +++ b/src/battle-parser.js @@ -86,8 +86,10 @@ function parseBattleState() { STATE.spellsKnown = []; const magicPane = document.getElementById('pane_magic'); if (magicPane) { - $$('.btsd[onclick]', magicPane).forEach(el => { + // Read all btsd elements with onmouseover (including on-cooldown spells) + $$('.btsd', magicPane).forEach(el => { const omo = el.getAttribute('onmouseover') || ''; + if (!omo) return; const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/); if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) }); }); diff --git a/src/config.js b/src/config.js index 08dc1df..e45aaea 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.13.18'; +const VERSION = '0.13.19'; const CFG = { // — Battle automation diff --git a/src/header.user.js b/src/header.user.js index 04ed7e9..00cd0b5 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.13.18 +// @version 0.13.19 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/*