v0.14.24 - Fix spirit burst toggle-off (was stuck ON after Rending Blow killed <7 mobs)
- The toggle-off (state 2 -> OFF) was inside the monsters.length >= 7 check - If Rending Blow killed enough enemies to drop below 7, the else block reset _spiritForSkill = 0 without toggling spirit off, leaving it ON - Now toggle-off guard runs independently of monster count - Also resets flag if spirit gets toggled externally
This commit is contained in:
parent
f42e44db34
commit
7c714eb589
5 changed files with 27 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.14.23
|
// @version 0.14.24
|
||||||
// @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.14.23';
|
const VERSION = '0.14.24';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -1462,9 +1462,14 @@ function strategyVeteran() {
|
||||||
STATE._spiritForSkill = 1;
|
STATE._spiritForSkill = 1;
|
||||||
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
|
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
STATE._spiritForSkill = 0;
|
|
||||||
}
|
}
|
||||||
|
// Toggle-off guard: if flag says skill was cast, toggle off even if mob count dropped
|
||||||
|
if (STATE._spiritForSkill === 2 && STATE.spiritStance) {
|
||||||
|
STATE._spiritForSkill = 0;
|
||||||
|
return { type: 'toggle_spirit', _reason: 'spirit_off_7' };
|
||||||
|
}
|
||||||
|
// Reset flag if spirit got turned off externally
|
||||||
|
if (!STATE.spiritStance) STATE._spiritForSkill = 0;
|
||||||
|
|
||||||
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
|
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
|
||||||
const SINGLE_THREAT = Math.round(120 * 90 / 100);
|
const SINGLE_THREAT = Math.round(120 * 90 / 100);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.14.23
|
// @version 0.14.24
|
||||||
// @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.14.23';
|
const VERSION = '0.14.24';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -1462,9 +1462,14 @@ function strategyVeteran() {
|
||||||
STATE._spiritForSkill = 1;
|
STATE._spiritForSkill = 1;
|
||||||
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
|
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
STATE._spiritForSkill = 0;
|
|
||||||
}
|
}
|
||||||
|
// Toggle-off guard: if flag says skill was cast, toggle off even if mob count dropped
|
||||||
|
if (STATE._spiritForSkill === 2 && STATE.spiritStance) {
|
||||||
|
STATE._spiritForSkill = 0;
|
||||||
|
return { type: 'toggle_spirit', _reason: 'spirit_off_7' };
|
||||||
|
}
|
||||||
|
// Reset flag if spirit got turned off externally
|
||||||
|
if (!STATE.spiritStance) STATE._spiritForSkill = 0;
|
||||||
|
|
||||||
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
|
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
|
||||||
const SINGLE_THREAT = Math.round(120 * 90 / 100);
|
const SINGLE_THREAT = Math.round(120 * 90 / 100);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.14.23';
|
const VERSION = '0.14.24';
|
||||||
|
|
||||||
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.14.23
|
// @version 0.14.24
|
||||||
// @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/*
|
||||||
|
|
|
||||||
|
|
@ -736,9 +736,14 @@ function strategyVeteran() {
|
||||||
STATE._spiritForSkill = 1;
|
STATE._spiritForSkill = 1;
|
||||||
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
|
return { type: 'toggle_spirit', _reason: 'spirit_on_7' };
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
STATE._spiritForSkill = 0;
|
|
||||||
}
|
}
|
||||||
|
// Toggle-off guard: if flag says skill was cast, toggle off even if mob count dropped
|
||||||
|
if (STATE._spiritForSkill === 2 && STATE.spiritStance) {
|
||||||
|
STATE._spiritForSkill = 0;
|
||||||
|
return { type: 'toggle_spirit', _reason: 'spirit_off_7' };
|
||||||
|
}
|
||||||
|
// Reset flag if spirit got turned off externally
|
||||||
|
if (!STATE.spiritStance) STATE._spiritForSkill = 0;
|
||||||
|
|
||||||
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
|
// 0e. HIGH-THREAT WEAPON SKILLS — after survival items/cure
|
||||||
const SINGLE_THREAT = Math.round(120 * 90 / 100);
|
const SINGLE_THREAT = Math.round(120 * 90 / 100);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue