From 5fd9defd92dd5d1114649bb46896228859fe5d00 Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Mon, 28 Aug 2023 14:22:07 -0600 Subject: [PATCH] Fix LC teambuilder level setting (#2138) --- js/client-teambuilder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/client-teambuilder.js b/js/client-teambuilder.js index e607ab0c9d..f262ab2dd4 100644 --- a/js/client-teambuilder.js +++ b/js/client-teambuilder.js @@ -3062,7 +3062,7 @@ baseFormat === 'battlefestivaldoubles') { set.level = 50; } - if (baseFormat.substr(0, 2) === 'lc') set.level = 5; + if (baseFormat.startsWith('lc') || baseFormat.endsWith('lc')) set.level = 5; } if (set.happiness) delete set.happiness; if (set.shiny) delete set.shiny; @@ -3275,7 +3275,7 @@ if (this.curTeam && this.curTeam.format) { if (baseFormat.substr(0, 10) === 'battlespot' && baseFormat.substr(0, 19) !== 'battlespotspecial13' || baseFormat.substr(0, 3) === 'vgc' || baseFormat.substr(0, 14) === 'battlefestival') set.level = 50; - if (baseFormat.substr(0, 2) === 'lc' || baseFormat.substr(0, 5) === 'caplc' || baseFormat.substr(-2) === 'lc') set.level = 5; + if (baseFormat.startsWith('lc') || baseFormat.endsWith('lc')) set.level = 5; if (baseFormat.substr(0, 19) === 'battlespotspecial17') set.level = 1; if (format && format.teambuilderLevel) { set.level = format.teambuilderLevel;