From f0a50e419f92cdbabb6d2c0a9caea4dcccc59501 Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:18:48 -0600 Subject: [PATCH 1/2] Fix level setting for LC variants --- js/client-teambuilder.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/client-teambuilder.js b/js/client-teambuilder.js index f262ab2dd4..5d3d0d283a 100644 --- a/js/client-teambuilder.js +++ b/js/client-teambuilder.js @@ -3026,6 +3026,10 @@ if (baseFormat.substr(0, 3) === 'gen') baseFormat = baseFormat.substr(4); if (baseFormat.substr(0, 4) === 'bdsp') baseFormat = baseFormat.substr(4); if (baseFormat.substr(0, 8) === 'pokebank') baseFormat = baseFormat.substr(8); + if (baseFormat.substr(0, 6) === 'natdex') baseFormat = baseFormat.substr(6); + if (baseFormat.substr(0, 11) === 'nationaldex') baseFormat = baseFormat.substr(11); + if (baseFormat.substr(-5) === 'draft') baseFormat = baseFormat.substr(0, baseFormat.length - 5); + if (!baseFormat) basrFormat = 'ou'; if (this.curTeam && this.curTeam.format) { if (baseFormat === 'battlespotsingles' || baseFormat === 'battlespotdoubles' || baseFormat.substr(0, 3) === 'vgc' || baseFormat === 'battlefestivaldoubles') { @@ -3057,6 +3061,10 @@ if (baseFormat.substr(0, 3) === 'gen') baseFormat = baseFormat.substr(4); if (baseFormat.substr(0, 4) === 'bdsp') baseFormat = baseFormat.substr(4); if (baseFormat.substr(0, 8) === 'pokebank') baseFormat = baseFormat.substr(8); + if (baseFormat.substr(0, 6) === 'natdex') baseFormat = baseFormat.substr(6); + if (baseFormat.substr(0, 11) === 'nationaldex') baseFormat = baseFormat.substr(11); + if (baseFormat.substr(-5) === 'draft') baseFormat = baseFormat.substr(0, baseFormat.length - 5); + if (!baseFormat) basrFormat = 'ou'; if (this.curTeam && this.curTeam.format) { if (baseFormat === 'battlespotsingles' || baseFormat === 'battlespotdoubles' || baseFormat.substr(0, 3) === 'vgc' || baseFormat === 'battlefestivaldoubles') { @@ -3272,6 +3280,10 @@ if (baseFormat.substr(0, 3) === 'gen') baseFormat = baseFormat.substr(4); if (baseFormat.substr(0, 4) === 'bdsp') baseFormat = baseFormat.substr(4); if (baseFormat.substr(0, 8) === 'pokebank') baseFormat = baseFormat.substr(8); + if (baseFormat.substr(0, 6) === 'natdex') baseFormat = baseFormat.substr(6); + if (baseFormat.substr(0, 11) === 'nationaldex') baseFormat = baseFormat.substr(11); + if (baseFormat.substr(-5) === 'draft') baseFormat = baseFormat.substr(0, baseFormat.length - 5); + if (!baseFormat) basrFormat = 'ou'; 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; From 2a9a5a4707464c7741bd37f40479b24a0e1c2357 Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:24:18 -0600 Subject: [PATCH 2/2] Fix failsafe typo --- js/client-teambuilder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/client-teambuilder.js b/js/client-teambuilder.js index 5d3d0d283a..c96a8f39bc 100644 --- a/js/client-teambuilder.js +++ b/js/client-teambuilder.js @@ -3029,7 +3029,7 @@ if (baseFormat.substr(0, 6) === 'natdex') baseFormat = baseFormat.substr(6); if (baseFormat.substr(0, 11) === 'nationaldex') baseFormat = baseFormat.substr(11); if (baseFormat.substr(-5) === 'draft') baseFormat = baseFormat.substr(0, baseFormat.length - 5); - if (!baseFormat) basrFormat = 'ou'; + if (!baseFormat) baseFormat = 'ou'; if (this.curTeam && this.curTeam.format) { if (baseFormat === 'battlespotsingles' || baseFormat === 'battlespotdoubles' || baseFormat.substr(0, 3) === 'vgc' || baseFormat === 'battlefestivaldoubles') { @@ -3064,7 +3064,7 @@ if (baseFormat.substr(0, 6) === 'natdex') baseFormat = baseFormat.substr(6); if (baseFormat.substr(0, 11) === 'nationaldex') baseFormat = baseFormat.substr(11); if (baseFormat.substr(-5) === 'draft') baseFormat = baseFormat.substr(0, baseFormat.length - 5); - if (!baseFormat) basrFormat = 'ou'; + if (!baseFormat) baseFormat = 'ou'; if (this.curTeam && this.curTeam.format) { if (baseFormat === 'battlespotsingles' || baseFormat === 'battlespotdoubles' || baseFormat.substr(0, 3) === 'vgc' || baseFormat === 'battlefestivaldoubles') { @@ -3283,7 +3283,7 @@ if (baseFormat.substr(0, 6) === 'natdex') baseFormat = baseFormat.substr(6); if (baseFormat.substr(0, 11) === 'nationaldex') baseFormat = baseFormat.substr(11); if (baseFormat.substr(-5) === 'draft') baseFormat = baseFormat.substr(0, baseFormat.length - 5); - if (!baseFormat) basrFormat = 'ou'; + if (!baseFormat) baseFormat = 'ou'; 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;