diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 1572815..a62dff3 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.17.2 +// @version 0.17.3 // @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils) // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -18,7 +18,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.17.2'; +const VERSION = '0.17.3'; const CFG = { // — Battle strategy advisory @@ -1562,6 +1562,7 @@ let jpxChainRounds = 0; // rounds chained this battle let jpxChainTimer = null; let jpxLastActive = null; // last known isActiveBattle from jpx let jpxChainCooldown = 0; // timestamp guard to avoid double-trigger +let jpxChainRetryCount = 0; // lazy-start retry counter function jpxPresent() { return !!(document.getElementById('ctrl-widget') || @@ -1575,7 +1576,6 @@ function jpxChainStart() { if (jpxChainEnabled) return; if (!jpxPresent()) { // Retry a few times over ~6s before giving up - if (!jpxChainRetryCount) jpxChainRetryCount = 0; if (jpxChainRetryCount < 10) { jpxChainRetryCount++; setTimeout(jpxChainStart, 600); @@ -1666,6 +1666,7 @@ function jpxChainOnState(detail) { function jpxChainStop(reason) { if (!jpxChainEnabled) return; jpxChainEnabled = false; + jpxChainRetryCount = 0; console.log('%c[HV] ⛓ jpx auto-chain stopped: ' + reason, 'color:#f80'); } diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 1572815..a62dff3 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.17.2 +// @version 0.17.3 // @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils) // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -18,7 +18,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.17.2'; +const VERSION = '0.17.3'; const CFG = { // — Battle strategy advisory @@ -1562,6 +1562,7 @@ let jpxChainRounds = 0; // rounds chained this battle let jpxChainTimer = null; let jpxLastActive = null; // last known isActiveBattle from jpx let jpxChainCooldown = 0; // timestamp guard to avoid double-trigger +let jpxChainRetryCount = 0; // lazy-start retry counter function jpxPresent() { return !!(document.getElementById('ctrl-widget') || @@ -1575,7 +1576,6 @@ function jpxChainStart() { if (jpxChainEnabled) return; if (!jpxPresent()) { // Retry a few times over ~6s before giving up - if (!jpxChainRetryCount) jpxChainRetryCount = 0; if (jpxChainRetryCount < 10) { jpxChainRetryCount++; setTimeout(jpxChainStart, 600); @@ -1666,6 +1666,7 @@ function jpxChainOnState(detail) { function jpxChainStop(reason) { if (!jpxChainEnabled) return; jpxChainEnabled = false; + jpxChainRetryCount = 0; console.log('%c[HV] ⛓ jpx auto-chain stopped: ' + reason, 'color:#f80'); } diff --git a/src/config.js b/src/config.js index f40e4f4..8755d24 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.17.2'; +const VERSION = '0.17.3'; const CFG = { // — Battle strategy advisory diff --git a/src/header.user.js b/src/header.user.js index 012741e..f00d29e 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.17.2 +// @version 0.17.3 // @description HV Unified — Bridge & Strategy/Gear Advisor for HentaiVerse (complements Monsterbation & HVUtils) // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* diff --git a/src/jpx-bridge.js b/src/jpx-bridge.js index 88c6ad5..f0dcb66 100644 --- a/src/jpx-bridge.js +++ b/src/jpx-bridge.js @@ -15,6 +15,7 @@ let jpxChainRounds = 0; // rounds chained this battle let jpxChainTimer = null; let jpxLastActive = null; // last known isActiveBattle from jpx let jpxChainCooldown = 0; // timestamp guard to avoid double-trigger +let jpxChainRetryCount = 0; // lazy-start retry counter function jpxPresent() { return !!(document.getElementById('ctrl-widget') || @@ -28,7 +29,6 @@ function jpxChainStart() { if (jpxChainEnabled) return; if (!jpxPresent()) { // Retry a few times over ~6s before giving up - if (!jpxChainRetryCount) jpxChainRetryCount = 0; if (jpxChainRetryCount < 10) { jpxChainRetryCount++; setTimeout(jpxChainStart, 600); @@ -119,6 +119,7 @@ function jpxChainOnState(detail) { function jpxChainStop(reason) { if (!jpxChainEnabled) return; jpxChainEnabled = false; + jpxChainRetryCount = 0; console.log('%c[HV] ⛓ jpx auto-chain stopped: ' + reason, 'color:#f80'); }