v0.13.6 - Auto-execute on vitals observer (no hover required)
- Added action execution to the vitals MutationObserver so the script fires on every round tick, not only when hovering a monster - This fixes buffs expiring and channeling being wasted when the user isn't actively hovering a monster during auto-battle - Removed unused STATE.battleRound
This commit is contained in:
parent
ee9bba90fc
commit
28a13449bd
4 changed files with 15 additions and 3 deletions
|
|
@ -76,7 +76,6 @@ const STATE = {
|
|||
battleMode: '',
|
||||
inBattle: false,
|
||||
battleInitialized: false,
|
||||
battleRound: 0, // Incremented each round for first-round logic
|
||||
|
||||
hoverTarget: -1,
|
||||
interruptHover: false,
|
||||
|
|
@ -3270,6 +3269,11 @@ function initializeBattle() {
|
|||
const vobs = new MutationObserver(() => {
|
||||
parseBattleState();
|
||||
logRound(); // Also log on vitals changes (catches end-of-round)
|
||||
// Auto-execute strategy even without hover — for auto-battle
|
||||
if (CFG.hoverEnabled && !STATE.interruptHover && !STATE.interruptAlert) {
|
||||
const a = getSmartAction();
|
||||
if (a) executeAction(a);
|
||||
}
|
||||
refreshUI();
|
||||
updateConfigButton();
|
||||
// Check if battle ended (completion pane appeared)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ const STATE = {
|
|||
battleMode: '',
|
||||
inBattle: false,
|
||||
battleInitialized: false,
|
||||
battleRound: 0, // Incremented each round for first-round logic
|
||||
|
||||
hoverTarget: -1,
|
||||
interruptHover: false,
|
||||
|
|
@ -3270,6 +3269,11 @@ function initializeBattle() {
|
|||
const vobs = new MutationObserver(() => {
|
||||
parseBattleState();
|
||||
logRound(); // Also log on vitals changes (catches end-of-round)
|
||||
// Auto-execute strategy even without hover — for auto-battle
|
||||
if (CFG.hoverEnabled && !STATE.interruptHover && !STATE.interruptAlert) {
|
||||
const a = getSmartAction();
|
||||
if (a) executeAction(a);
|
||||
}
|
||||
refreshUI();
|
||||
updateConfigButton();
|
||||
// Check if battle ended (completion pane appeared)
|
||||
|
|
|
|||
|
|
@ -85,6 +85,11 @@ function initializeBattle() {
|
|||
const vobs = new MutationObserver(() => {
|
||||
parseBattleState();
|
||||
logRound(); // Also log on vitals changes (catches end-of-round)
|
||||
// Auto-execute strategy even without hover — for auto-battle
|
||||
if (CFG.hoverEnabled && !STATE.interruptHover && !STATE.interruptAlert) {
|
||||
const a = getSmartAction();
|
||||
if (a) executeAction(a);
|
||||
}
|
||||
refreshUI();
|
||||
updateConfigButton();
|
||||
// Check if battle ended (completion pane appeared)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ const STATE = {
|
|||
battleMode: '',
|
||||
inBattle: false,
|
||||
battleInitialized: false,
|
||||
battleRound: 0, // Incremented each round for first-round logic
|
||||
|
||||
hoverTarget: -1,
|
||||
interruptHover: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue