diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 4a1f99f..1d9a8b0 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.14.20 +// @version 0.14.21 // @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.14.20'; +const VERSION = '0.14.21'; const CFG = { // — Battle automation @@ -3312,13 +3312,19 @@ function logGearSummary() { const db = getGearDB(); const equipped = db.filter(e => e.source === 'character'); const armory = db.filter(e => e.source === 'armory'); - console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} equipped, ${armory.length} armory)`, 'color:#0f0'); + const buy = db.filter(e => e.source === 'buy'); + console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} 🟢 equipped, ${armory.length} 📦 stored, ${buy.length} 🛒 purchasable)`, 'color:#0f0'); equipped.forEach(item => { - console.log(` 🗡 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); - }); - armory.forEach(item => { - console.log(` 📦 [${item.category}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); + console.log(` 🟢 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); }); + if (buy.length > 0) { + const used = new Set(armory.map(i => i.id).concat(equipped.filter(i => i.id).map(i => i.id))); + const newOnly = buy.filter(i => !used.has(i.id)); + console.log(`%c 🛒 ${buy.length} purchasable (${newOnly.length} not in armory)`, 'color:#0f0'); + newOnly.slice(0, 5).forEach(item => { + console.log(` 💰 ${item.name} — ${item.price || '?'}${item.stats ? ' (' + Object.keys(item.stats).length + ' stats)' : ''}`); + }); + } } // ── Parse tooltip HTML string into structured stats ── diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 4a1f99f..1d9a8b0 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.20 +// @version 0.14.21 // @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.14.20'; +const VERSION = '0.14.21'; const CFG = { // — Battle automation @@ -3312,13 +3312,19 @@ function logGearSummary() { const db = getGearDB(); const equipped = db.filter(e => e.source === 'character'); const armory = db.filter(e => e.source === 'armory'); - console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} equipped, ${armory.length} armory)`, 'color:#0f0'); + const buy = db.filter(e => e.source === 'buy'); + console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} 🟢 equipped, ${armory.length} 📦 stored, ${buy.length} 🛒 purchasable)`, 'color:#0f0'); equipped.forEach(item => { - console.log(` 🗡 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); - }); - armory.forEach(item => { - console.log(` 📦 [${item.category}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); + console.log(` 🟢 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); }); + if (buy.length > 0) { + const used = new Set(armory.map(i => i.id).concat(equipped.filter(i => i.id).map(i => i.id))); + const newOnly = buy.filter(i => !used.has(i.id)); + console.log(`%c 🛒 ${buy.length} purchasable (${newOnly.length} not in armory)`, 'color:#0f0'); + newOnly.slice(0, 5).forEach(item => { + console.log(` 💰 ${item.name} — ${item.price || '?'}${item.stats ? ' (' + Object.keys(item.stats).length + ' stats)' : ''}`); + }); + } } // ── Parse tooltip HTML string into structured stats ── diff --git a/src/config.js b/src/config.js index f9ecd48..56a5ae8 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.20'; +const VERSION = '0.14.21'; const CFG = { // — Battle automation diff --git a/src/gear-scraper.js b/src/gear-scraper.js index 62398f8..7012e7e 100644 --- a/src/gear-scraper.js +++ b/src/gear-scraper.js @@ -41,13 +41,19 @@ function logGearSummary() { const db = getGearDB(); const equipped = db.filter(e => e.source === 'character'); const armory = db.filter(e => e.source === 'armory'); - console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} equipped, ${armory.length} armory)`, 'color:#0f0'); + const buy = db.filter(e => e.source === 'buy'); + console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} 🟢 equipped, ${armory.length} 📦 stored, ${buy.length} 🛒 purchasable)`, 'color:#0f0'); equipped.forEach(item => { - console.log(` 🗡 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); - }); - armory.forEach(item => { - console.log(` 📦 [${item.category}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); + console.log(` 🟢 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); }); + if (buy.length > 0) { + const used = new Set(armory.map(i => i.id).concat(equipped.filter(i => i.id).map(i => i.id))); + const newOnly = buy.filter(i => !used.has(i.id)); + console.log(`%c 🛒 ${buy.length} purchasable (${newOnly.length} not in armory)`, 'color:#0f0'); + newOnly.slice(0, 5).forEach(item => { + console.log(` 💰 ${item.name} — ${item.price || '?'}${item.stats ? ' (' + Object.keys(item.stats).length + ' stats)' : ''}`); + }); + } } // ── Parse tooltip HTML string into structured stats ── diff --git a/src/header.user.js b/src/header.user.js index f164bea..51fda58 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.20 +// @version 0.14.21 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/*