diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index fbc2b0f..490ef0e 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.13.28 +// @version 0.13.29 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -17,7 +17,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.13.28'; +const VERSION = '0.13.29'; const CFG = { // — Battle automation @@ -35,7 +35,7 @@ const CFG = { cureRegenHP: 0.65, // Cast Regen below this HP manaGemMP: 0.45, // Use mana gems below this MP manaPotionMP: 0.25, // Use mana potions at this MP - spiritPotionSP: 0.30, // Use spirit gems/potions below this SP + spiritPotionSP: 0.60, // Use spirit gems/potions below this SP (Spark costs 50%) spiritStanceOC: 80, // Manual spirit stance only (auto-disable at 65% SP for Spark) skillOC: 75, // Use weapon skills at this OC useAttackSpells: false, // Don't use attack spells (let channel proc naturally) @@ -1150,6 +1150,16 @@ function strategyAdept() { if (c) return { type: 'spell', name: c, selfTarget: true }; } + // 2b. Spirit items — Spark of Life costs 50% SP. Keep SP above 55% so + // Spark can actually save us. + if (STATE.sp < 0.55) { + for (const [slot, info] of Object.entries(STATE.itemsKnown)) { + if (slot === 'p') continue; + const def = ITEMS[parseInt(info)]; + if (def && def.t === 'spirit') return { type: 'item', id: slot, selfTarget: true }; + } + } + // 3. Buffs // On first round, cast cheapest-first to proc channeling { @@ -1275,6 +1285,16 @@ function strategyVeteran() { if (c) return { type: 'spell', name: c, selfTarget: true }; } + // 2b. Spirit items — Spark of Life costs 50% SP. Keep SP above 55% so + // Spark can actually save us. Use spirit draughts/potions proactively. + if (STATE.sp < 0.55) { + for (const [slot, info] of Object.entries(STATE.itemsKnown)) { + if (slot === 'p') continue; + const def = ITEMS[parseInt(info)]; + if (def && def.t === 'spirit') return { type: 'item', id: slot, selfTarget: true }; + } + } + // 3. Buffs // On first round, cast cheapest-first to proc channeling if (CFG.autoBuff) { diff --git a/scripts/latest.user.js b/scripts/latest.user.js index fbc2b0f..490ef0e 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.13.28 +// @version 0.13.29 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -17,7 +17,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.13.28'; +const VERSION = '0.13.29'; const CFG = { // — Battle automation @@ -35,7 +35,7 @@ const CFG = { cureRegenHP: 0.65, // Cast Regen below this HP manaGemMP: 0.45, // Use mana gems below this MP manaPotionMP: 0.25, // Use mana potions at this MP - spiritPotionSP: 0.30, // Use spirit gems/potions below this SP + spiritPotionSP: 0.60, // Use spirit gems/potions below this SP (Spark costs 50%) spiritStanceOC: 80, // Manual spirit stance only (auto-disable at 65% SP for Spark) skillOC: 75, // Use weapon skills at this OC useAttackSpells: false, // Don't use attack spells (let channel proc naturally) @@ -1150,6 +1150,16 @@ function strategyAdept() { if (c) return { type: 'spell', name: c, selfTarget: true }; } + // 2b. Spirit items — Spark of Life costs 50% SP. Keep SP above 55% so + // Spark can actually save us. + if (STATE.sp < 0.55) { + for (const [slot, info] of Object.entries(STATE.itemsKnown)) { + if (slot === 'p') continue; + const def = ITEMS[parseInt(info)]; + if (def && def.t === 'spirit') return { type: 'item', id: slot, selfTarget: true }; + } + } + // 3. Buffs // On first round, cast cheapest-first to proc channeling { @@ -1275,6 +1285,16 @@ function strategyVeteran() { if (c) return { type: 'spell', name: c, selfTarget: true }; } + // 2b. Spirit items — Spark of Life costs 50% SP. Keep SP above 55% so + // Spark can actually save us. Use spirit draughts/potions proactively. + if (STATE.sp < 0.55) { + for (const [slot, info] of Object.entries(STATE.itemsKnown)) { + if (slot === 'p') continue; + const def = ITEMS[parseInt(info)]; + if (def && def.t === 'spirit') return { type: 'item', id: slot, selfTarget: true }; + } + } + // 3. Buffs // On first round, cast cheapest-first to proc channeling if (CFG.autoBuff) { diff --git a/src/config.js b/src/config.js index 86c7aed..b2a1be8 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.13.28'; +const VERSION = '0.13.29'; const CFG = { // — Battle automation @@ -20,7 +20,7 @@ const CFG = { cureRegenHP: 0.65, // Cast Regen below this HP manaGemMP: 0.45, // Use mana gems below this MP manaPotionMP: 0.25, // Use mana potions at this MP - spiritPotionSP: 0.30, // Use spirit gems/potions below this SP + spiritPotionSP: 0.60, // Use spirit gems/potions below this SP (Spark costs 50%) spiritStanceOC: 80, // Manual spirit stance only (auto-disable at 65% SP for Spark) skillOC: 75, // Use weapon skills at this OC useAttackSpells: false, // Don't use attack spells (let channel proc naturally) diff --git a/src/header.user.js b/src/header.user.js index 4e6cfb0..1ac42cb 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.13.28 +// @version 0.13.29 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* diff --git a/src/strategy-engine.js b/src/strategy-engine.js index 505d345..b5d8f4d 100644 --- a/src/strategy-engine.js +++ b/src/strategy-engine.js @@ -464,6 +464,16 @@ function strategyAdept() { if (c) return { type: 'spell', name: c, selfTarget: true }; } + // 2b. Spirit items — Spark of Life costs 50% SP. Keep SP above 55% so + // Spark can actually save us. + if (STATE.sp < 0.55) { + for (const [slot, info] of Object.entries(STATE.itemsKnown)) { + if (slot === 'p') continue; + const def = ITEMS[parseInt(info)]; + if (def && def.t === 'spirit') return { type: 'item', id: slot, selfTarget: true }; + } + } + // 3. Buffs // On first round, cast cheapest-first to proc channeling { @@ -589,6 +599,16 @@ function strategyVeteran() { if (c) return { type: 'spell', name: c, selfTarget: true }; } + // 2b. Spirit items — Spark of Life costs 50% SP. Keep SP above 55% so + // Spark can actually save us. Use spirit draughts/potions proactively. + if (STATE.sp < 0.55) { + for (const [slot, info] of Object.entries(STATE.itemsKnown)) { + if (slot === 'p') continue; + const def = ITEMS[parseInt(info)]; + if (def && def.t === 'spirit') return { type: 'item', id: slot, selfTarget: true }; + } + } + // 3. Buffs // On first round, cast cheapest-first to proc channeling if (CFG.autoBuff) {