Skip to content

HVAA优化及BUG修复#155

Open
WayneFerdon wants to merge 440 commits into
dodying:masterfrom
WayneFerdon:master
Open

HVAA优化及BUG修复#155
WayneFerdon wants to merge 440 commits into
dodying:masterfrom
WayneFerdon:master

Conversation

@WayneFerdon

@WayneFerdon WayneFerdon commented Aug 21, 2025

Copy link
Copy Markdown
Contributor
  1. 增加初始闲置竞技场配置非空检测
  2. 修正其他技能的OC判断及选择范围判断,修正条件判断中iscd的值与Readme中示例不相符的问题 (修复技能可释放判断及其他技能技能排序无效问题 #154 未进行冲突处理直接覆盖了,因此按照其中实际有效的内容重新修改了)

@Qiyue0515

Copy link
Copy Markdown

最近转法发现一个问题:
// 先处理特殊的 “先给全体上buff”
let skillPack = ['We', 'Im'];
这里改成先上weaken再上Imperil会比较好,这样血线的压力会小一点

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

最近转法发现一个问题: // 先处理特殊的 “先给全体上buff” let skillPack = ['We', 'Im']; 这里改成先上weaken再上Imperil会比较好,这样血线的压力会小一点

@Qiyue0515 现在这个应该就是先we再im的啊

@DreamSeeker08

Copy link
Copy Markdown

最近转法发现一个问题: // 先处理特殊的 “先给全体上buff” let skillPack = ['We', 'Im']; 这里改成先上weaken再上Imperil会比较好,这样血线的压力会小一点

你好,能分享一个法系的设置给我导入吗?
我不太会弄,更新到最新的v2.90.22.20还是不会释放陷危、虚弱等debuf

@Kotone-Hikaru

Copy link
Copy Markdown

法师好像不能正确的释放im 只会释放weaken 在给每个怪都上完weaken之后就卡在这里了

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

@DreamSeeker08 @SakuyaSaki 之前的debuff逻辑有条件判断时可能会有点问题,分支新上传了一版(2.90.22.22),可以测试看下还有没有问题

@Kotone-Hikaru

Copy link
Copy Markdown

@WayneFerdon 2.90.22.22 imp正确释放了 但是全部上好imp之后不会自动释放攻击,但是鼠标移动到对应的怪上后才会攻击 且有的时候只会用普通攻击 不会释放t123法术

@WayneFerdon

WayneFerdon commented Oct 23, 2025

Copy link
Copy Markdown
Contributor Author

@WayneFerdon 2.90.22.22 imp正确释放了 但是全部上好imp之后不会自动释放攻击,但是鼠标移动到对应的怪上后才会攻击 且有的时候只会用普通攻击 不会释放t123法术

@SakuyaSaki
我这里测试是正常的,普通和高级的都能够释放,不确定是什么原因
不过推测可能是战斗中途启用新脚本,导致ability数据未初始化,战斗中读取技能范围数据出错,这个节点刚好是点击完技能还没选目标(在算范围),如果有mb等脚本的话刚好移上去就选中了?
新的版本(2.90.22.23)增加了非空检测,可以再看下

@Kotone-Hikaru

Copy link
Copy Markdown

@WayneFerdon 确实是因为中途才开启脚本导致的 如果在一开始就开启然后再进入战斗的话就能正常释放t123
不过这个 自动闲置竞技场好像有点问题 还是说逻辑改变了

@Kotone-Hikaru

Copy link
Copy Markdown

AR好像是ok 的但是GF不行 不知道为什么

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

AR好像是ok 的但是GF不行 不知道为什么

@SakuyaSaki 有bug,修复了(2.90.22.24)

@Kotone-Hikaru

Kotone-Hikaru commented Oct 23, 2025

Copy link
Copy Markdown

发现现在的全部上debuff好像逻辑和之前的相比 不一样 之前会优先释放258这3个位子然后再释放没有释放到的
现在是按照优先级来释放的 大部分时候是乱序 会导致有的时候会多1t 理论上来说假如敌人是8个的话 第一次释放 2 5 7 这样应该是最好的 (有机会补到6号位没有上到debuff的情况)其他的按照258释放 一遍然后补漏掉的 比较好

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

@SakuyaSaki
给全体放debuff的两个各加了选项,可以选是按照位置还是权重释放
按位置还是用权重的逻辑,但是统一权重为-1而非按状态计算,保留结合用死亡、已有debuff等的特殊权重进行排除
本来想直接改了,但是We给高权重的先放有时也能降低自己受到的伤害,所以各自处理了(

@Kotone-Hikaru

Copy link
Copy Markdown

@WayneFerdon 感谢 现在自动gf 已经正常工作了 但是debuff顺序释放好像还是没生效 现在还是按照权重来释放的

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

@WayneFerdon 感谢 现在自动gf 已经正常工作了 但是debuff顺序释放好像还是没生效 现在还是按照权重来释放的

@SakuyaSaki 应该修复了(2.90.22.26)
漏了选初始目标也要按顺序了(

@Kotone-Hikaru

Copy link
Copy Markdown

@WayneFerdon 观察了一下 现在的释放 第一次 释放目标1 会给 123上(可能是机制?给第一位上会顺延到后面) 第二次就会释放4 但是这个时候只会给45上debuff 这样3的位置会被重复上debuff 浪费了一个轮次 感觉还是应该改为给2 5 8位置轮流释放

@Kotone-Hikaru

Copy link
Copy Markdown
function getRangeCenterID(target, range = undefined, isWeaponAttack = false, excludeCondition = undefined, forceUseIndex = undefined) {
    // 静态计数器
    if (typeof getRangeCenterID.callCount === 'undefined') getRangeCenterID.callCount = 0;
    getRangeCenterID.callCount++;

    // --- 固定顺序目标 ---
    const fixedIndices = [1, 4, 7]; // 数组索引
    let msTemp = JSON.parse(JSON.stringify(g('battle').monsterStatus));
    msTemp.sort(objArrSort('order'));

    if (getRangeCenterID.callCount <= fixedIndices.length) {
        // 尝试获取固定目标,如果越界或死亡就跳过
        for (let i = getRangeCenterID.callCount - 1; i < fixedIndices.length; i++) {
            const idx = fixedIndices[i];
            if (idx >= 0 && idx < msTemp.length && !msTemp[idx].isDead) {
                return getMonsterID(msTemp[idx].order);
            }
        }
        // 如果固定顺序没有可用目标,回归正常逻辑
    }

    // ---------------- 原本逻辑 ----------------
    if (!range) return getMonsterID(target);

    const centralExtraWeight = -1 * Math.log10(1 + (isWeaponAttack ? ((g('option').centralExtraRatio / 100) ?? 0) : 0));
    let order = target.order;
    let newOrder = order;

    let unreachableWeight = g('option').unreachableWeight;
    let minRank = Infinity;

    for (let i = order - range; i <= order + range; i++) {
        if (i < 0 || i >= msTemp.length || msTemp[i].isDead) continue;

        let rank = 0;
        for (let j = i - range; j <= i + range; j++) {
            let cew = (j === i) ? centralExtraWeight : 0;
            let mon = msTemp[j];

            if (j < 0 || j >= msTemp.length || mon.isDead || (excludeCondition && excludeCondition(mon))) {
                rank += unreachableWeight - cew;
                continue;
            }

            rank += cew;
            rank += forceUseIndex ? -1 : mon.finWeight;
        }

        if (rank < minRank) {
            minRank = rank;
            newOrder = i;
        }
    }

    return getMonsterID(newOrder);
}

让GPT写了一下 我试了一下这样是ok的 可以正确的释放到正确的258的位置()

@WayneFerdon

WayneFerdon commented Oct 25, 2025

Copy link
Copy Markdown
Contributor Author

@WayneFerdon 观察了一下 现在的释放 第一次 释放目标1 会给 123上(可能是机制?给第一位上会顺延到后面) 第二次就会释放4 但是这个时候只会给45上debuff 这样3的位置会被重复上debuff 浪费了一个轮次 感觉还是应该改为给2 5 8位置轮流释放

@SakuyaSaki
gpt这个即使不是全体或按顺序也会强行按顺序,而且目标死亡往后跳一个实际也会将死亡的包含在范围内了,也是不对的

原来的是按照顺序从上往下选需要释放的
但是释放本身可能会失败(被抵抗了)
你的这个可能是放了123,然后选5放456,但是6被抵抗了
例如:

  1. 在2放完123
  2. 在5放456,5失败
  3. 此时因为5需要释放,而包含5的最优的范围为567,就会在6释放567

不过这个也有问题,新的版本已经改为:

  1. 释放全体时会遍历全部需要放的目标
  2. 然后选出包含任意目标中权重最优的(按顺序的话仍是单个权重为-1)
  3. 这样就能优先往后去释放一片目标(无论是按顺序还是实际权重,确保收益最大化)
  4. 然后再进行补漏(失败或者未释放到的)

@Kotone-Hikaru

Copy link
Copy Markdown

新版这个 选择权重好像还是有点问题 在8个怪的时候 有时候会先在2或者6释放,这样123 567都会上上debuff 然后就会空下来4和8 这样会多放一次imp 这里的逻辑感觉如果是要按照释放的debuff到底有没有赋予 然后再对应的改变逻辑好像有点复杂()

@Kotone-Hikaru

Copy link
Copy Markdown

想到一个逻辑大概是就是重下往上检测第一个带debuff的 然后+2就是下一个需要释放的目标
比如给123上好imp了 然后下一个就应该上在5
假如1和3抵抗了 就给2的+2上 那就是345 然后漏掉的之后再补?
不知道能不能实现()

@WayneFerdon

WayneFerdon commented Oct 25, 2025

Copy link
Copy Markdown
Contributor Author

@SakuyaSaki 遍历的时候忘记按照顺序遍历了,导致还是按照权重遍历,后面权重高,先遍历到被记录了,然后遍历到前面的低权重的时候,算出来有效范围都一样,不大于先记录的,所以没覆盖掉
2.90.22.29已改为要按顺序的话就会按顺序遍历,这下应该行了(

想到一个逻辑大概是就是重下往上检测第一个带debuff的 然后+2就是下一个需要释放的目标 比如给123上好imp了 然后下一个就应该上在5 假如1和3抵抗了 就给2的+2上 那就是345 然后漏掉的之后再补? 不知道能不能实现()

从下往上找这个如果之前手动选了最后一个,就会变成直接补漏,所以还是得上面这个修复(

@Kotone-Hikaru

Copy link
Copy Markdown

@WayneFerdon 试了一下好像好像正常工作了 感谢更新

@Kotone-Hikaru

Kotone-Hikaru commented Oct 27, 2025

Copy link
Copy Markdown

发现卷轴使用有点异常 守护卷轴好像 有点问题 同样的条件 一次 gf 其他卷轴都是15左右 守护卷轴用了150
image
且这个好像没有效果 在ar也会不停释放守护卷轴

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

发现卷轴使用有点异常 守护卷轴好像 有点问题 同样的条件 一次 gf 其他卷轴都是15左右 守护卷轴用了150 image 且这个好像没有效果 在ar也会不停释放守护卷轴

@SakuyaSaki 我这里是正常的啊(
没有一直放,而且筛选也是有用的
不过原来的释放逻辑也有点问题,也稍微改了下(2.90.22.30)

@Kotone-Hikaru

Copy link
Copy Markdown

@WayneFerdon 这个有没有什么办法能导出log之类的吗

@Kotone-Hikaru

Kotone-Hikaru commented Oct 27, 2025

Copy link
Copy Markdown
You evade the attack from Macallan. -- Aiga Mizuki crits you for 3810 wind damage. You evade the attack from Google Dancing Israelis. You evade the attack from Hemidactylus. You evade the attack from Storyteller. Youshi153 gains the effect Imperiled. Hemidactylus gains the effect Coalesced Mana. Hemidactylus gains the effect Imperiled. Practiced Ass Spanker gains the effect Imperiled. You cast Imperil.   Cooldown expired for Storms of Njord You are healed for 11583 Health Points. You cast Cure.   You gain the effect Protection. You use Scroll of Protection.   Cooldown expired for Cure You evade the attack from Youshi153. You evade the attack from Practiced Ass Spanker. Hemidactylus gains the effect Coalesced Mana. Hemidactylus gains the effect Imperiled. Practiced Ass Spanker gains the effect Imperiled. Macallan gains the effect Imperiled. You cast Imperil.   You evade the attack from Macallan. Aiga Mizuki crits you for 3487 wind damage. You evade the attack from Storyteller. Hemidactylus crits you for 5077 slashing damage. Your spirit shield absorbs 1553 points of damage from the attack into 24 points of spirit damage. Aiga Mizuki gains the effect Imperiled. Storyteller gains the effect Coalesced Mana. Storyteller gains the effect Imperiled. Google Dancing Israelis gains the effect Imperiled. You cast Imperil.   Google Dancing Israelis hits you for 2676 wind damage. You evade the attack from Youshi153. You are healed for 11583 Health Points. You cast Cure.   Spawned Monster G: MID=282436 (Youshi153) LV=500 HP=174260 Spawned Monster F: MID=110494 (Hemidactylus) LV=500 HP=203444 Spawned Monster E: MID=153284 (Practiced Ass Spanker) LV=500 HP=183060 Spawned Monster D: MID=124000 (Macallan) LV=500 HP=183060 Spawned Monster C: MID=112618 (Aiga Mizuki) LV=500 HP=179060 Spawned Monster B: MID=194240 (Storyteller) LV=500 HP=171860 image 这是一次异常的释放保护卷轴的战斗记录

我试了几次 每次在异常释放卷轴的时候 都会放一个cure

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

@lukasva77 It should be harmless, be still fixed in 2.91.16.

@JKU533

JKU533 commented Jun 21, 2026

Copy link
Copy Markdown

userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5987
Uncaught TypeError: Cannot set properties of undefined (setting 'isDead')
at countMonsterHP (userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5987:35)
at onBattleRound (userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5057:7)
at eventEnd.onclick (userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5314:11)
at b.onload (:12:47)

爆火花的时候时不时会出现,需要刷新页面才能恢复运行

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5987 Uncaught TypeError: Cannot set properties of undefined (setting 'isDead') at countMonsterHP (userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5987:35) at onBattleRound (userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5057:7) at eventEnd.onclick (userscript.html?name=%255BHV%255DAutoAttack.user.js&id=3f7312a3-4de3-4254-be84-fca477d537ea:5314:11) at b.onload (:12:47)

爆火花的时候时不时会出现,需要刷新页面才能恢复运行

@JKU533 更新2.91.17试试

不确定是什么原因导致怪物数据丢失了,不过这里本来就是相当于重新加载,因此先只做了个非空兼容

而且看报错不是整体丢失,像是丢失了其中部分怪物(应该是末尾的)。之前只在战斗中途开关脚本,导致读取了以前的怪物数据,导致数量对不上这种情况出现过类似的报错(

@JKU533

JKU533 commented Jun 26, 2026

Copy link
Copy Markdown

有开启次要攻击模式的时候会误触发"以太之触"一直平A

@WayneFerdon

WayneFerdon commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

有开启次要攻击模式的时候会误触发"以太之触"一直平A

@JKU533 2.91.22 应该正常了

因为 2.91.22 把原来判断里的 没有 EtherTap 或 只剩 1 turn 给去掉了,想着可以自行配置,但是忘了会导致没配置条件时一直用法杖物理攻击有CM的目标

想了下还是加回去才对,因为如果确实需要完全自定义条件,其实可以通过
次要攻击-物理
以及
公式targetBuffTurn_coalescemana && (buffTurn_wpn_et <= 1 || buffStack_wpn_et <= 1) && ...
之类的来实现,可以不用动原来的以太之触逻辑(

另外2.91.22 新增了buffStack、targetBuffStack作为公式参数

@lukasva77

Copy link
Copy Markdown

2.91.20

getting defeated spams the developer console on firefox I'm not sure if there were any different red messages cause it lags the browser if they're too many closing the developer tools restores performance

In hindsight should have copied all messages to .txt and looked them over

Uncaught TypeError: can't access property "style" of null
start_flash_loop https://hentaiverse.org/z/091c/hvc.js:42
setInterval handler*Battle/this.start_flash_loop https://hentaiverse.org/z/091c/hvc.js:41
Battle https://hentaiverse.org/z/091c/hvc.js:45
battle moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5915
until moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:1236
loadUnsafeWindowBattle moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5915
onRoundEnd moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5460
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5409
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
commit_target https://hentaiverse.org/z/091c/hvc.js:38
onclick https://hentaiverse.org/?s=Battle&ss=gr:1
clickMonster moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6473
tryAttack moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6782
onAttack moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6769
attack moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6691
onBattleRound moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5192
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5400
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
onclick https://hentaiverse.org/?s=Battle&ss=gr:1
autoRecover moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6158
Cure moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5165
onBattleRound moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5192
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5400
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
onclick https://hentaiverse.org/?s=Battle&ss=gr:1
useBuffSkill moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6344
onBattleRound moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5192
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5400
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
commit_target https://hentaiverse.org/z/091c/hvc.js:38
onclick https://hentaiverse.org/?s=Battle&ss=gr:1
clickMonster moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6473
useDebuffSkill moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6662
useDeSkill moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6568
onBattleRound moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5192
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5400
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
commit_target https://hentaiverse.org/z/091c/hvc.js:38
onclick https://hentaiverse.org/?s=Battle&ss=gr:1
clickMonster moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6473
useDebuffSkill moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6662
useDeSkill moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6568
onBattleRound moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5192
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5400
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
onclick https://hentaiverse.org/?s=Battle&ss=gr:1
autoRecover moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:6158
Cure moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5165
onBattleRound moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5192
onclick moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ [HV]AutoAttack.user.js#23:5400
onload https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:12
api_call https://hentaiverse.org/?s=Battle&ss=gr line 5523 > injectedScript:10
touch_and_go https://hentaiverse.org/z/091c/hvc.js:38
hvc.js:42:96

@lukasva77

lukasva77 commented Jun 26, 2026

Copy link
Copy Markdown

2.91.22
Also this outside battle happened once

null
unhandledrejection { target: Window, isTrusted: true, promise: Promise { "rejected" }, reason: DOMException, srcElement: Window, currentTarget: Window, eventPhase: 2, bubbles: false, cancelable: true, returnValue: true, … }
[HV]AutoAttack.user.js:802:70

Uncaught (in promise) DOMException: Node cannot be used in a document other than the one in which it was created
$xpath moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:194
show_base moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:3955
show_base moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:3954
init moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:3946
VM4qk1919twx6 moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:4090
VM4qk1919twx6 moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:9711
ln moz-extension://30326764-a8bc-4293-9765-e4fad582e458/sandbox/injected-web.js:1
moz-extension://30326764-a8bc-4293-9765-e4fad582e458/ HV Utils.user.js#2:1
HV Utils.user.js:194:60

@WayneFerdon

Copy link
Copy Markdown
Contributor Author

@lukasva77

seems both these 2 errors are not caused by hvAA but by other scripts and caught by hvAA's exception handling (or at least by compatibility issues). Which are unhandled in their process, such as the second one is by HVUT.

The first one spams because the hvAA is waiting for the window to returns a Battle (for every 300ms), yet the window keeps failing by unknown reason (perhaps something is causing some element missing), meanwhile the same error is likely misleading the hvAA to wait for a Battle, yet the battle should not be waited for since it is already defeated.

@WayneFerdon

WayneFerdon commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

2.91.23 improved the compatibility when defeated, which should fix the spamming error.
Meanwhile the HVUT error is likely caused by an unresponsive fetch, which is usually due to a network issue.

@JKU533

JKU533 commented Jun 26, 2026

Copy link
Copy Markdown

2.91.22 应该正常了
因为 2.91.22 把原来判断里的 没有 EtherTap 或 只剩 1 turn 给去掉了,想着可以自行配置,但是忘了会导致没配置条件时一直用法杖物理攻击有CM的目标

次要攻击勾选某个攻击模式后,还是会一直用法杖平A

@WayneFerdon

WayneFerdon commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

2.91.22 应该正常了
因为 2.91.22 把原来判断里的 没有 EtherTap 或 只剩 1 turn 给去掉了,想着可以自行配置,但是忘了会导致没配置条件时一直用法杖物理攻击有CM的目标

次要攻击勾选某个攻击模式后,还是会一直用法杖平A

@JKU533 那可能是条件判定出了问题
看下现在的配置是什么样的?
可以公式前面加个@看看log输出的参数正不正常

@JKU533

JKU533 commented Jun 26, 2026

Copy link
Copy Markdown

那可能是条件判定出了问题 看下现在的配置是什么样的? 可以公式前面加个@看看log输出的参数正不正常

根本没公式...我现在用的是遭遇战配置 非常干净
我试过选其他的次要攻击模式都是法杖平A,不论有次要攻击有没有条件

折叠配置 {"version":"2.91.3","lang":"0","buffSkillSwitch":true,"debuffSkillSwitch":true,"dropMonitor":true,"optionStandalone":true,"pauseButton":true,"stepInButton":true,"alert":true,"notification":true,"delay":0,"delay2":0,"attackStatus":1,"battleOrderName":"Pause","battleOrder":{"autoPause":true},"attackStatusSwitch":{"5":true},"attackStatusSwitchCondition5":{"0":["(skillOTOS.151+skillOTOS.152+skillOTOS.153) == 0"]},"highSkillCondition":{"0":["monsterAlive,3,2"],"1":["roundType,5,\"rb\""],"2":["roundLeft,5,0"],"3":["roundType,5,\"ba\""]},"turnOnSS":true,"turnOnSSCondition":{"0":["oc,1,249"]},"turnOffSSCondition":{"0":["oc,2,120"],"1":["_isCd_1111,5,0","oc,2,180"]},"autoPause":true,"pauseCondition":{"1":["roundType,5,\"rb\""],"2":["sp,4,50"],"3":["roundType,5,\"gr\""],"4":["roundType,5,\"iw\""],"5":["roundType,5,\"ar\""]},"battleUnresponsive":{"Alert":true,"Reload":true},"battleUnresponsiveTime":{"Alert":20,"Reload":20},"encounterDisplay":true,"idleArenaLevels":"1,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,165,180,200,225,250,300","idleArenaValue":"1,3,5,8,9,11,12,13,15,16,17,19,20,21,23,24,26,27,28,29,32,33","arLevel":{"1":true,"10":true,"20":true,"30":true,"40":true,"50":true,"60":true,"70":true,"80":true,"90":true,"100":true,"110":true,"120":true,"130":true,"140":true,"150":true,"165":true,"180":true,"200":true,"225":true,"250":true,"300":true},"staminaEncounter":20,"staminaLow":30,"itemOrderName":"FC,Cure,HP,SP","itemOrderValue":"313,311,11195,11395","itemOrder":{"FC":true,"HP":true,"Cure":true,"SP":true},"item":{"FC":true,"HP":true,"Cure":true,"SP":true},"itemFCCondition":{"0":["_buffTurn_sparklife,5,0"]},"itemHPCondition":{"0":["_buffTurn_sparklife,5,0"]},"itemCureCondition":{"0":["hp,4,65"]},"itemMPCondition":{"0":["mp,4,50"]},"itemMECondition":{"0":["mp,4,20"]},"itemSPCondition":{"0":["sp,4,55"]},"itemSECondition":{"0":["sp,2,45"]},"channelSkill":{"AF":true},"channelSkill2":true,"channelSkill2OrderName":"AF","channelSkill2OrderValue":"432","channelSkill2Order":{"AF":true},"buffSkillOrderValue":"Re,AF","buffSkillOrder":{"Re":true,"AF":true},"buffSkillMDCondition":{"0":["mp,2,85"]},"buffSkillSDCondition":{"0":["sp,2,85"]},"buffSkillSLCondition":{"0":["hp,2,35"]},"buffSkillSSCondition":{"0":["hp,2,60"]},"buffSkill":{"AF":true,"Re":true},"buffSkillAFCondition":{"0":["mp,1,40"]},"buffSkillHeCondition":{"0":["mp,1,40"]},"debuffSkillTurnAlert":0,"debuffSkillOrderValue":"Im","debuffSkillOrder":{"Im":true},"debuffSkillWeAll":true,"debuffSkillDrCondition":{"0":["monsterAlive,5,1","bossAlive,5,1"]},"debuffSkill":{"Im":true},"debuffSkillImAll":true,"skillOrderValue":"OFC","skillOrder":{"OFC":true},"skillOFCCondition":{"0":["bossAll,3,1","monsterAlive,3,3"],"1":["monsterAlive,3,5"]},"scrollRoundType":{"rb":true},"scroll":{"Av":true,"Go":true},"scrollAvCondition":{"0":["turn,5, 2"]},"scrollGoCondition":{"0":["turn,5, 1"]},"weight":{"We":-4,"Bl":3,"Slo":3,"Si":-4,"Sle":5,"Im":-5,"PA":-4,"BW":-4,"Co":-1,"Dr":-4,"MN":-4,"Stun":-4,"CM":-5},"dropQuality":"0","roundNow":1,"roundAll":1}

@WayneFerdon

WayneFerdon commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@JKU533 2.91.24应该好了(

原因是新的功能 先尝试完所有模式的高阶魔法技能再继续中阶和低阶 未开启时tier = undefined,遍历开头的tier--会导致传入实际尝试攻击时的tierNaN(预期应该是undefined),导致判断出了问题(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.