diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index f547d58..fd45412 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.33 +// @version 0.14.34 // @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.33'; +const VERSION = '0.14.34'; const CFG = { // — Battle automation @@ -2554,8 +2554,8 @@ function getDifficultyAdvice() { reason = ''; } - const currentIdx = difficulties.indexOf(difficulty.toUpperCase()); - const suggestedIdx = difficulties.indexOf(suggested); + const currentIdx = difficulties.findIndex(d => d.toLowerCase() === (difficulty || '').toLowerCase()); + const suggestedIdx = difficulties.findIndex(d => d.toLowerCase() === suggested.toLowerCase()); // Only warn if current difficulty is LOWER than suggested // (don't nag if you're already on a higher difficulty) diff --git a/scripts/latest.user.js b/scripts/latest.user.js index f547d58..fd45412 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.33 +// @version 0.14.34 // @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.33'; +const VERSION = '0.14.34'; const CFG = { // — Battle automation @@ -2554,8 +2554,8 @@ function getDifficultyAdvice() { reason = ''; } - const currentIdx = difficulties.indexOf(difficulty.toUpperCase()); - const suggestedIdx = difficulties.indexOf(suggested); + const currentIdx = difficulties.findIndex(d => d.toLowerCase() === (difficulty || '').toLowerCase()); + const suggestedIdx = difficulties.findIndex(d => d.toLowerCase() === suggested.toLowerCase()); // Only warn if current difficulty is LOWER than suggested // (don't nag if you're already on a higher difficulty) diff --git a/src/config.js b/src/config.js index b24256f..ce060fe 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.33'; +const VERSION = '0.14.34'; const CFG = { // — Battle automation diff --git a/src/guidance.js b/src/guidance.js index 9bdc84e..2b10fcf 100644 --- a/src/guidance.js +++ b/src/guidance.js @@ -62,8 +62,8 @@ function getDifficultyAdvice() { reason = ''; } - const currentIdx = difficulties.indexOf(difficulty.toUpperCase()); - const suggestedIdx = difficulties.indexOf(suggested); + const currentIdx = difficulties.findIndex(d => d.toLowerCase() === (difficulty || '').toLowerCase()); + const suggestedIdx = difficulties.findIndex(d => d.toLowerCase() === suggested.toLowerCase()); // Only warn if current difficulty is LOWER than suggested // (don't nag if you're already on a higher difficulty) diff --git a/src/header.user.js b/src/header.user.js index 023514d..87fc706 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.33 +// @version 0.14.34 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/*