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/*