diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 5b3d9bb..66ec63f 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -881,8 +881,6 @@ function findBestChannelingTarget() { if (b.icon === 'regen' && STATE.hp >= CFG.cureRegenHP) continue; // Skip completely fresh Heartseeker (> 50 turns means just cast) if (b.icon === 'heartseeker' && dur > 50) continue; - // Only consider buffs that would benefit from a refresh - if (dur > 10) continue; // Still fresh, don't waste channeling const sp = findSpell(b.spell); const mpCost = sp ? sp.mp : 0; // Score: higher MP cost + lower remaining turns = better channeling target @@ -892,7 +890,11 @@ function findBestChannelingTarget() { if (candidates.length > 0) { candidates.sort((a, b) => b.score - a.score); - return { type: 'spell', name: candidates[0].spell, selfTarget: true }; + // Only use a buff if it actually needs refreshing (score >= 5 means + // e.g. a 50-MP spell with <9 turns left or a 140-MP spell with <27 turns) + if (candidates[0].score >= 5) { + return { type: 'spell', name: candidates[0].spell, selfTarget: true }; + } } // Fallback: ANY damage spell rather than waste the charge on basic attack diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 5b3d9bb..66ec63f 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -881,8 +881,6 @@ function findBestChannelingTarget() { if (b.icon === 'regen' && STATE.hp >= CFG.cureRegenHP) continue; // Skip completely fresh Heartseeker (> 50 turns means just cast) if (b.icon === 'heartseeker' && dur > 50) continue; - // Only consider buffs that would benefit from a refresh - if (dur > 10) continue; // Still fresh, don't waste channeling const sp = findSpell(b.spell); const mpCost = sp ? sp.mp : 0; // Score: higher MP cost + lower remaining turns = better channeling target @@ -892,7 +890,11 @@ function findBestChannelingTarget() { if (candidates.length > 0) { candidates.sort((a, b) => b.score - a.score); - return { type: 'spell', name: candidates[0].spell, selfTarget: true }; + // Only use a buff if it actually needs refreshing (score >= 5 means + // e.g. a 50-MP spell with <9 turns left or a 140-MP spell with <27 turns) + if (candidates[0].score >= 5) { + return { type: 'spell', name: candidates[0].spell, selfTarget: true }; + } } // Fallback: ANY damage spell rather than waste the charge on basic attack diff --git a/src/strategy-engine.js b/src/strategy-engine.js index f7edba8..854c22f 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -233,8 +233,6 @@ function findBestChannelingTarget() { if (b.icon === 'regen' && STATE.hp >= CFG.cureRegenHP) continue; // Skip completely fresh Heartseeker (> 50 turns means just cast) if (b.icon === 'heartseeker' && dur > 50) continue; - // Only consider buffs that would benefit from a refresh - if (dur > 10) continue; // Still fresh, don't waste channeling const sp = findSpell(b.spell); const mpCost = sp ? sp.mp : 0; // Score: higher MP cost + lower remaining turns = better channeling target @@ -244,7 +242,11 @@ function findBestChannelingTarget() { if (candidates.length > 0) { candidates.sort((a, b) => b.score - a.score); - return { type: 'spell', name: candidates[0].spell, selfTarget: true }; + // Only use a buff if it actually needs refreshing (score >= 5 means + // e.g. a 50-MP spell with <9 turns left or a 140-MP spell with <27 turns) + if (candidates[0].score >= 5) { + return { type: 'spell', name: candidates[0].spell, selfTarget: true }; + } } // Fallback: ANY damage spell rather than waste the charge on basic attack