From 782a09469148c64e0f080bb0e80121d9539cde25 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Tue, 28 Jul 2026 10:40:16 -0400 Subject: [PATCH] v0.14.29 - Fix Rending Blow positioning + remove hp guard on OC build - Rending Blow now uses findOptimalDominoTarget() which scores monsters by how many alive neighbors are within 2 slots left/right. This ensures RB hits max targets instead of wasting half the AoE on edge monsters (previously used findDangerousMonster which ignores positioning). - Removed STATE.hp > 0.40 guard from step 2c OC-building check. When Spark of Life procs, hp=0 in the DOM but the player is still alive. The old guard blocked OC building in this state, causing Imperil to fire instead of basic attacking to build OC. --- scripts/hv-unified.user.js | 16 +++++++++------- scripts/latest.user.js | 16 +++++++++------- src/config.js | 2 +- src/header.user.js | 2 +- src/strategy-engine.js | 12 +++++++----- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 724258e..f493c25 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.28 +// @version 0.14.29 // @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.28'; +const VERSION = '0.14.29'; const CFG = { // — Battle automation @@ -1477,7 +1477,8 @@ function strategyVeteran() { const isHighThreatEarly = hasHighThreat(THREAT_PX); if ((isHighThreatEarly || anyImminent) && STATE.oc >= 20) { if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Rending Blow')) { - const t = findDangerousMonster(); + // Use findOptimalDominoTarget for max AoE coverage (target + 2 left + 2 right) + const t = findOptimalDominoTarget(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t, _reason: 'threat_early' }; } if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Shatter Strike')) { @@ -1505,12 +1506,13 @@ function strategyVeteran() { // 2c. OC-building priority: when 5+ monsters, OC < 60, and AoE skills ready, // skip debuffs/non-essential buffs and basic attack to build OC fast. - const needsOC = STATE.monsters && STATE.monsters.length >= 5 + const needsOC = STATE.monsters && STATE.monsters.length >= 4 && STATE.oc < (CFG.skillOC || 60) && STATE.skillsKnown.includes('Rending Blow') && document.querySelector(`.btqs[onmouseover*="set_infopane_spell('Rending Blow'"], .btsd[onmouseover*="set_infopane_spell('Rending Blow'"]`) ?.hasAttribute('onclick'); - if (needsOC && STATE.hp > 0.40 && STATE.mp > 0.20) { + if (needsOC) { + // No hp/mp guard — if Spark procced, hp=0 but we still need OC const t = hasHighThreat(THREAT_PX) ? findDangerousMonster() : findOptimalDominoTarget(); if (t >= 0 && STATE.monsters[t] && STATE.monsters[t].hasAttribute('onclick')) return { type: 'attack', target: t, _reason: 'oc_build' }; @@ -1591,9 +1593,9 @@ function strategyVeteran() { if (STATE.oc >= askillOC3 || isHighThreat) { if (isHighThreat && STATE.oc < askillOC3) console.log('%c[HV] ⚠ emergency: using skill at OC=' + STATE.oc.toFixed(0), 'color:#f80'); // Emergency: 2+ monsters about to special — spend OC to kill them fast - // Rending Blow: AoE armor pen vs 3+ enemies (reduced from 5 for IWBTH survivability) + // Rending Blow: AoE armor pen vs 3+ enemies. Target center monster for max 5-target splash. if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Rending Blow')) { - const t = isHighThreat ? findDangerousMonster() : findStrongestMonster(); + const t = isHighThreat ? findDangerousMonster() : findOptimalDominoTarget(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t, _reason: isHighThreat ? 'threat' : 'oc' }; } // Shatter Strike: AoE stun vs 3+ enemies with armor break diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 724258e..f493c25 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.28 +// @version 0.14.29 // @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.28'; +const VERSION = '0.14.29'; const CFG = { // — Battle automation @@ -1477,7 +1477,8 @@ function strategyVeteran() { const isHighThreatEarly = hasHighThreat(THREAT_PX); if ((isHighThreatEarly || anyImminent) && STATE.oc >= 20) { if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Rending Blow')) { - const t = findDangerousMonster(); + // Use findOptimalDominoTarget for max AoE coverage (target + 2 left + 2 right) + const t = findOptimalDominoTarget(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t, _reason: 'threat_early' }; } if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Shatter Strike')) { @@ -1505,12 +1506,13 @@ function strategyVeteran() { // 2c. OC-building priority: when 5+ monsters, OC < 60, and AoE skills ready, // skip debuffs/non-essential buffs and basic attack to build OC fast. - const needsOC = STATE.monsters && STATE.monsters.length >= 5 + const needsOC = STATE.monsters && STATE.monsters.length >= 4 && STATE.oc < (CFG.skillOC || 60) && STATE.skillsKnown.includes('Rending Blow') && document.querySelector(`.btqs[onmouseover*="set_infopane_spell('Rending Blow'"], .btsd[onmouseover*="set_infopane_spell('Rending Blow'"]`) ?.hasAttribute('onclick'); - if (needsOC && STATE.hp > 0.40 && STATE.mp > 0.20) { + if (needsOC) { + // No hp/mp guard — if Spark procced, hp=0 but we still need OC const t = hasHighThreat(THREAT_PX) ? findDangerousMonster() : findOptimalDominoTarget(); if (t >= 0 && STATE.monsters[t] && STATE.monsters[t].hasAttribute('onclick')) return { type: 'attack', target: t, _reason: 'oc_build' }; @@ -1591,9 +1593,9 @@ function strategyVeteran() { if (STATE.oc >= askillOC3 || isHighThreat) { if (isHighThreat && STATE.oc < askillOC3) console.log('%c[HV] ⚠ emergency: using skill at OC=' + STATE.oc.toFixed(0), 'color:#f80'); // Emergency: 2+ monsters about to special — spend OC to kill them fast - // Rending Blow: AoE armor pen vs 3+ enemies (reduced from 5 for IWBTH survivability) + // Rending Blow: AoE armor pen vs 3+ enemies. Target center monster for max 5-target splash. if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Rending Blow')) { - const t = isHighThreat ? findDangerousMonster() : findStrongestMonster(); + const t = isHighThreat ? findDangerousMonster() : findOptimalDominoTarget(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t, _reason: isHighThreat ? 'threat' : 'oc' }; } // Shatter Strike: AoE stun vs 3+ enemies with armor break diff --git a/src/config.js b/src/config.js index 7809283..3221022 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.28'; +const VERSION = '0.14.29'; const CFG = { // — Battle automation diff --git a/src/header.user.js b/src/header.user.js index f9e99a1..acf3ac8 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.28 +// @version 0.14.29 // @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 2e6e615..2fb1368 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -751,7 +751,8 @@ function strategyVeteran() { const isHighThreatEarly = hasHighThreat(THREAT_PX); if ((isHighThreatEarly || anyImminent) && STATE.oc >= 20) { if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Rending Blow')) { - const t = findDangerousMonster(); + // Use findOptimalDominoTarget for max AoE coverage (target + 2 left + 2 right) + const t = findOptimalDominoTarget(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t, _reason: 'threat_early' }; } if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Shatter Strike')) { @@ -779,12 +780,13 @@ function strategyVeteran() { // 2c. OC-building priority: when 5+ monsters, OC < 60, and AoE skills ready, // skip debuffs/non-essential buffs and basic attack to build OC fast. - const needsOC = STATE.monsters && STATE.monsters.length >= 5 + const needsOC = STATE.monsters && STATE.monsters.length >= 4 && STATE.oc < (CFG.skillOC || 60) && STATE.skillsKnown.includes('Rending Blow') && document.querySelector(`.btqs[onmouseover*="set_infopane_spell('Rending Blow'"], .btsd[onmouseover*="set_infopane_spell('Rending Blow'"]`) ?.hasAttribute('onclick'); - if (needsOC && STATE.hp > 0.40 && STATE.mp > 0.20) { + if (needsOC) { + // No hp/mp guard — if Spark procced, hp=0 but we still need OC const t = hasHighThreat(THREAT_PX) ? findDangerousMonster() : findOptimalDominoTarget(); if (t >= 0 && STATE.monsters[t] && STATE.monsters[t].hasAttribute('onclick')) return { type: 'attack', target: t, _reason: 'oc_build' }; @@ -865,9 +867,9 @@ function strategyVeteran() { if (STATE.oc >= askillOC3 || isHighThreat) { if (isHighThreat && STATE.oc < askillOC3) console.log('%c[HV] ⚠ emergency: using skill at OC=' + STATE.oc.toFixed(0), 'color:#f80'); // Emergency: 2+ monsters about to special — spend OC to kill them fast - // Rending Blow: AoE armor pen vs 3+ enemies (reduced from 5 for IWBTH survivability) + // Rending Blow: AoE armor pen vs 3+ enemies. Target center monster for max 5-target splash. if (STATE.monsters.length >= 3 && STATE.skillsKnown.includes('Rending Blow')) { - const t = isHighThreat ? findDangerousMonster() : findStrongestMonster(); + const t = isHighThreat ? findDangerousMonster() : findOptimalDominoTarget(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t, _reason: isHighThreat ? 'threat' : 'oc' }; } // Shatter Strike: AoE stun vs 3+ enemies with armor break