From eb5f99dbfbd2e6e948ce28cb7a051227964ca552 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Mon, 20 Jul 2026 19:58:27 -0400 Subject: [PATCH] Fix: skills before spirit stance, Rending Blow priority reorder Priority order now: 1. Items 2. Cure 3. Buffs 4. Debuffs 5. Weapon skills (BEFORE spirit stance - fixes Rending Blow never firing) - Rending Blow first (AoE clear) - Shatter Strike second (needs Penetrated Armor) - Great Cleave last (single target, bosses only) 6. Spirit Stance (only if OC didn't get spent on skills) 7. Damage spells 8. Channeling kickstart 9. Basic attack --- scripts/hv-unified.user.js | 32 ++++++++++++++++---------------- scripts/latest.user.js | 32 ++++++++++++++++---------------- src/strategy-engine.js | 32 ++++++++++++++++---------------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index f850933..5ea7f06 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -982,36 +982,36 @@ function strategyAdept() { } } - // 5. Spirit Stance at OC 60 — but only if we have SP to sustain it - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) - return { type: 'toggle_spirit' }; - - // 6. Weapon skills only at OC thresholds with specific conditions - // (checked regardless of spirit stance — if stance failed due to low SP, - // still try to use the OC on skills) - const askillOC2 = CFG.skillOC || 80; - if (STATE.oc >= askillOC2) { - // Great Cleave: boss/rare fights only - if (anyRareMonster() && STATE.skillsKnown.includes('Great Cleave')) { - const t = findStrongestMonster(); - if (t >= 0) return { type: 'skill', name: 'Great Cleave', target: t }; - } - // Rending Blow: AoE armor pen vs 5+ enemies + // 5. Weapon skills — before spirit stance, so we don't burn OC on spirit + // and miss the skill window. This is the highest-value use of OC. + const skillOC_N = CFG.skillOC || 80; + if (STATE.oc >= skillOC_N) { + // Rending Blow: AoE armor pen vs 5+ enemies (highest priority in Grindfest) if (STATE.monsters.length >= 5 && STATE.skillsKnown.includes('Rending Blow')) { const t = findStrongestMonster(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t }; } // Shatter Strike: AoE stun vs 5+ enemies (needs Penetrated Armor from Rending Blow) if (STATE.monsters.length >= 5 && STATE.skillsKnown.includes('Shatter Strike')) { - // Check if at least one monster has Penetrated Armor const hasArmorBreak = STATE.monsters.some((m, i) => checkMonsterDebuff(i, 'penetrated_armor')); if (hasArmorBreak) { const t = findStrongestMonster(); if (t >= 0) return { type: 'skill', name: 'Shatter Strike', target: t }; } } + // Great Cleave: boss/rare fights only (single target, lower priority than AoE) + if (anyRareMonster() && STATE.skillsKnown.includes('Great Cleave')) { + const t = findStrongestMonster(); + if (t >= 0) return { type: 'skill', name: 'Great Cleave', target: t }; + } } + // 6. Spirit Stance at OC 60 — but only if we have SP to sustain it + if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) + return { type: 'toggle_spirit' }; + if (STATE.sp < 0.03 && STATE.spiritStance) + return { type: 'toggle_spirit' }; + // 7. Damage spells const dmg = CFG.useAttackSpells ? getBestDamageSpell() : null; if (dmg && STATE.mp > 0.2) { diff --git a/scripts/latest.user.js b/scripts/latest.user.js index f850933..5ea7f06 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -982,36 +982,36 @@ function strategyAdept() { } } - // 5. Spirit Stance at OC 60 — but only if we have SP to sustain it - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) - return { type: 'toggle_spirit' }; - - // 6. Weapon skills only at OC thresholds with specific conditions - // (checked regardless of spirit stance — if stance failed due to low SP, - // still try to use the OC on skills) - const askillOC2 = CFG.skillOC || 80; - if (STATE.oc >= askillOC2) { - // Great Cleave: boss/rare fights only - if (anyRareMonster() && STATE.skillsKnown.includes('Great Cleave')) { - const t = findStrongestMonster(); - if (t >= 0) return { type: 'skill', name: 'Great Cleave', target: t }; - } - // Rending Blow: AoE armor pen vs 5+ enemies + // 5. Weapon skills — before spirit stance, so we don't burn OC on spirit + // and miss the skill window. This is the highest-value use of OC. + const skillOC_N = CFG.skillOC || 80; + if (STATE.oc >= skillOC_N) { + // Rending Blow: AoE armor pen vs 5+ enemies (highest priority in Grindfest) if (STATE.monsters.length >= 5 && STATE.skillsKnown.includes('Rending Blow')) { const t = findStrongestMonster(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t }; } // Shatter Strike: AoE stun vs 5+ enemies (needs Penetrated Armor from Rending Blow) if (STATE.monsters.length >= 5 && STATE.skillsKnown.includes('Shatter Strike')) { - // Check if at least one monster has Penetrated Armor const hasArmorBreak = STATE.monsters.some((m, i) => checkMonsterDebuff(i, 'penetrated_armor')); if (hasArmorBreak) { const t = findStrongestMonster(); if (t >= 0) return { type: 'skill', name: 'Shatter Strike', target: t }; } } + // Great Cleave: boss/rare fights only (single target, lower priority than AoE) + if (anyRareMonster() && STATE.skillsKnown.includes('Great Cleave')) { + const t = findStrongestMonster(); + if (t >= 0) return { type: 'skill', name: 'Great Cleave', target: t }; + } } + // 6. Spirit Stance at OC 60 — but only if we have SP to sustain it + if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) + return { type: 'toggle_spirit' }; + if (STATE.sp < 0.03 && STATE.spiritStance) + return { type: 'toggle_spirit' }; + // 7. Damage spells const dmg = CFG.useAttackSpells ? getBestDamageSpell() : null; if (dmg && STATE.mp > 0.2) { diff --git a/src/strategy-engine.js b/src/strategy-engine.js index 0cddcad..a313487 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -339,36 +339,36 @@ function strategyAdept() { } } - // 5. Spirit Stance at OC 60 — but only if we have SP to sustain it - if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) - return { type: 'toggle_spirit' }; - - // 6. Weapon skills only at OC thresholds with specific conditions - // (checked regardless of spirit stance — if stance failed due to low SP, - // still try to use the OC on skills) - const askillOC2 = CFG.skillOC || 80; - if (STATE.oc >= askillOC2) { - // Great Cleave: boss/rare fights only - if (anyRareMonster() && STATE.skillsKnown.includes('Great Cleave')) { - const t = findStrongestMonster(); - if (t >= 0) return { type: 'skill', name: 'Great Cleave', target: t }; - } - // Rending Blow: AoE armor pen vs 5+ enemies + // 5. Weapon skills — before spirit stance, so we don't burn OC on spirit + // and miss the skill window. This is the highest-value use of OC. + const skillOC_N = CFG.skillOC || 80; + if (STATE.oc >= skillOC_N) { + // Rending Blow: AoE armor pen vs 5+ enemies (highest priority in Grindfest) if (STATE.monsters.length >= 5 && STATE.skillsKnown.includes('Rending Blow')) { const t = findStrongestMonster(); if (t >= 0) return { type: 'skill', name: 'Rending Blow', target: t }; } // Shatter Strike: AoE stun vs 5+ enemies (needs Penetrated Armor from Rending Blow) if (STATE.monsters.length >= 5 && STATE.skillsKnown.includes('Shatter Strike')) { - // Check if at least one monster has Penetrated Armor const hasArmorBreak = STATE.monsters.some((m, i) => checkMonsterDebuff(i, 'penetrated_armor')); if (hasArmorBreak) { const t = findStrongestMonster(); if (t >= 0) return { type: 'skill', name: 'Shatter Strike', target: t }; } } + // Great Cleave: boss/rare fights only (single target, lower priority than AoE) + if (anyRareMonster() && STATE.skillsKnown.includes('Great Cleave')) { + const t = findStrongestMonster(); + if (t >= 0) return { type: 'skill', name: 'Great Cleave', target: t }; + } } + // 6. Spirit Stance at OC 60 — but only if we have SP to sustain it + if (STATE.oc >= 60 && !STATE.spiritStance && STATE.sp > 0.10) + return { type: 'toggle_spirit' }; + if (STATE.sp < 0.03 && STATE.spiritStance) + return { type: 'toggle_spirit' }; + // 7. Damage spells const dmg = CFG.useAttackSpells ? getBestDamageSpell() : null; if (dmg && STATE.mp > 0.2) {