v0.13.14 - Fix observer crash, raise channeling threshold to 30
- Removed call to undefined finalizeBattleLog() that was spamming ReferenceErrors and potentially corrupting the MutationObserver - Raised channeling score threshold from 5 to 30: now only picks a buff for channeling if it's at least 30% empty on a 100-MP spell or 60% empty on a 50-MP spell - Spark at 30/60 turns (50% empty, score 44) now falls to cheap damage fallback instead of wasting channeling
This commit is contained in:
parent
5f9297435d
commit
23f00450be
6 changed files with 18 additions and 18 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.13.13
|
// @version 0.13.14
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.13.13';
|
const VERSION = '0.13.14';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -908,9 +908,9 @@ function findBestChannelingTarget() {
|
||||||
|
|
||||||
if (candidates.length > 0) {
|
if (candidates.length > 0) {
|
||||||
candidates.sort((a, b) => b.score - a.score);
|
candidates.sort((a, b) => b.score - a.score);
|
||||||
// Only use a buff if it actually needs refreshing (score >= 5 means
|
// Only use a buff if it actually needs refreshing (score >= 30 means
|
||||||
// e.g. 10% emptiness on a 50-MP spell, or 5% on a 100-MP spell)
|
// e.g. 30% emptiness on a 100-MP spell, or 60% on a 50-MP spell)
|
||||||
if (candidates[0].score >= 5) {
|
if (candidates[0].score >= 30) {
|
||||||
return { type: 'spell', name: candidates[0].spell, selfTarget: true };
|
return { type: 'spell', name: candidates[0].spell, selfTarget: true };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3310,7 +3310,7 @@ function initializeBattle() {
|
||||||
updateConfigButton();
|
updateConfigButton();
|
||||||
// Check if battle ended (completion pane appeared)
|
// Check if battle ended (completion pane appeared)
|
||||||
if (document.getElementById('pane_completion')) {
|
if (document.getElementById('pane_completion')) {
|
||||||
finalizeBattleLog();
|
// Battle ended — handled by log observer
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vobs.observe(vitals, { childList: true, subtree: true, attributes: true });
|
vobs.observe(vitals, { childList: true, subtree: true, attributes: true });
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.13.13
|
// @version 0.13.14
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.13.13';
|
const VERSION = '0.13.14';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -908,9 +908,9 @@ function findBestChannelingTarget() {
|
||||||
|
|
||||||
if (candidates.length > 0) {
|
if (candidates.length > 0) {
|
||||||
candidates.sort((a, b) => b.score - a.score);
|
candidates.sort((a, b) => b.score - a.score);
|
||||||
// Only use a buff if it actually needs refreshing (score >= 5 means
|
// Only use a buff if it actually needs refreshing (score >= 30 means
|
||||||
// e.g. 10% emptiness on a 50-MP spell, or 5% on a 100-MP spell)
|
// e.g. 30% emptiness on a 100-MP spell, or 60% on a 50-MP spell)
|
||||||
if (candidates[0].score >= 5) {
|
if (candidates[0].score >= 30) {
|
||||||
return { type: 'spell', name: candidates[0].spell, selfTarget: true };
|
return { type: 'spell', name: candidates[0].spell, selfTarget: true };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3310,7 +3310,7 @@ function initializeBattle() {
|
||||||
updateConfigButton();
|
updateConfigButton();
|
||||||
// Check if battle ended (completion pane appeared)
|
// Check if battle ended (completion pane appeared)
|
||||||
if (document.getElementById('pane_completion')) {
|
if (document.getElementById('pane_completion')) {
|
||||||
finalizeBattleLog();
|
// Battle ended — handled by log observer
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vobs.observe(vitals, { childList: true, subtree: true, attributes: true });
|
vobs.observe(vitals, { childList: true, subtree: true, attributes: true });
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.13.13';
|
const VERSION = '0.13.14';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.13.13
|
// @version 0.13.14
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ function initializeBattle() {
|
||||||
updateConfigButton();
|
updateConfigButton();
|
||||||
// Check if battle ended (completion pane appeared)
|
// Check if battle ended (completion pane appeared)
|
||||||
if (document.getElementById('pane_completion')) {
|
if (document.getElementById('pane_completion')) {
|
||||||
finalizeBattleLog();
|
// Battle ended — handled by log observer
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vobs.observe(vitals, { childList: true, subtree: true, attributes: true });
|
vobs.observe(vitals, { childList: true, subtree: true, attributes: true });
|
||||||
|
|
|
||||||
|
|
@ -249,9 +249,9 @@ function findBestChannelingTarget() {
|
||||||
|
|
||||||
if (candidates.length > 0) {
|
if (candidates.length > 0) {
|
||||||
candidates.sort((a, b) => b.score - a.score);
|
candidates.sort((a, b) => b.score - a.score);
|
||||||
// Only use a buff if it actually needs refreshing (score >= 5 means
|
// Only use a buff if it actually needs refreshing (score >= 30 means
|
||||||
// e.g. 10% emptiness on a 50-MP spell, or 5% on a 100-MP spell)
|
// e.g. 30% emptiness on a 100-MP spell, or 60% on a 50-MP spell)
|
||||||
if (candidates[0].score >= 5) {
|
if (candidates[0].score >= 30) {
|
||||||
return { type: 'spell', name: candidates[0].spell, selfTarget: true };
|
return { type: 'spell', name: candidates[0].spell, selfTarget: true };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue