diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index ae831e8..f7750cf 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.24 +// @version 0.14.25 // @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.24'; +const VERSION = '0.14.25'; const CFG = { // — Battle automation @@ -1644,6 +1644,20 @@ function strategyVeteran() { if (ch) return ch; } + // ── Stalling: when 1 normal enemy remains, prefer buff refreshes over killing + // This gives weapon skill cooldowns time to tick down before next round. + if (STATE.monsters && STATE.monsters.length === 1 && !anyRareMonster() && !hasHighThreat(THREAT_PX)) { + for (const b of BUFF_PRIORITY) { + const dur = buffDuration(b.icon); + if (dur === 0 || dur < 15) { + if (b.icon === 'regen' && STATE.hp >= CFG.cureRegenHP) continue; + if (hasReadySpell(b.spell) && STATE.mp > 0.15) { + return { type: 'spell', name: b.spell, selfTarget: true, _reason: 'stall' }; + } + } + } + } + const t = hasHighThreat(THREAT_PX) ? findDangerousMonster() : (STATE.monsters.length > 2 ? findOptimalDominoTarget() : findWeakestMonster()); if (t >= 0 && STATE.monsters[t] && STATE.monsters[t].hasAttribute('onclick')) return { type: 'attack', target: t, _reason: hasHighThreat(THREAT_PX) ? 'threat' : 'fallback' }; diff --git a/scripts/latest.user.js b/scripts/latest.user.js index ae831e8..f7750cf 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.24 +// @version 0.14.25 // @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.24'; +const VERSION = '0.14.25'; const CFG = { // — Battle automation @@ -1644,6 +1644,20 @@ function strategyVeteran() { if (ch) return ch; } + // ── Stalling: when 1 normal enemy remains, prefer buff refreshes over killing + // This gives weapon skill cooldowns time to tick down before next round. + if (STATE.monsters && STATE.monsters.length === 1 && !anyRareMonster() && !hasHighThreat(THREAT_PX)) { + for (const b of BUFF_PRIORITY) { + const dur = buffDuration(b.icon); + if (dur === 0 || dur < 15) { + if (b.icon === 'regen' && STATE.hp >= CFG.cureRegenHP) continue; + if (hasReadySpell(b.spell) && STATE.mp > 0.15) { + return { type: 'spell', name: b.spell, selfTarget: true, _reason: 'stall' }; + } + } + } + } + const t = hasHighThreat(THREAT_PX) ? findDangerousMonster() : (STATE.monsters.length > 2 ? findOptimalDominoTarget() : findWeakestMonster()); if (t >= 0 && STATE.monsters[t] && STATE.monsters[t].hasAttribute('onclick')) return { type: 'attack', target: t, _reason: hasHighThreat(THREAT_PX) ? 'threat' : 'fallback' }; diff --git a/src/config.js b/src/config.js index 70a56db..50f1367 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.24'; +const VERSION = '0.14.25'; const CFG = { // — Battle automation diff --git a/src/header.user.js b/src/header.user.js index cf0bf36..b3e5893 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.24 +// @version 0.14.25 // @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 c4dc54e..1d3dc92 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -918,6 +918,20 @@ function strategyVeteran() { if (ch) return ch; } + // ── Stalling: when 1 normal enemy remains, prefer buff refreshes over killing + // This gives weapon skill cooldowns time to tick down before next round. + if (STATE.monsters && STATE.monsters.length === 1 && !anyRareMonster() && !hasHighThreat(THREAT_PX)) { + for (const b of BUFF_PRIORITY) { + const dur = buffDuration(b.icon); + if (dur === 0 || dur < 15) { + if (b.icon === 'regen' && STATE.hp >= CFG.cureRegenHP) continue; + if (hasReadySpell(b.spell) && STATE.mp > 0.15) { + return { type: 'spell', name: b.spell, selfTarget: true, _reason: 'stall' }; + } + } + } + } + const t = hasHighThreat(THREAT_PX) ? findDangerousMonster() : (STATE.monsters.length > 2 ? findOptimalDominoTarget() : findWeakestMonster()); if (t >= 0 && STATE.monsters[t] && STATE.monsters[t].hasAttribute('onclick')) return { type: 'attack', target: t, _reason: hasHighThreat(THREAT_PX) ? 'threat' : 'fallback' };