From 81f2e785da80b10d190c55cf6b3f94bcd0a4855e Mon Sep 17 00:00:00 2001 From: Waleed Hassan Date: Wed, 30 Oct 2024 22:01:00 +0300 Subject: [PATCH] Deepclone specie when importing Pokemon Fixes #661 --- src/js/moveset_import.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/moveset_import.js b/src/js/moveset_import.js index f66bdbce7..7cb1edbf5 100644 --- a/src/js/moveset_import.js +++ b/src/js/moveset_import.js @@ -285,7 +285,7 @@ function addSets(pokes, name) { for (var j = 0; j < currentRow.length; j++) { currentRow[j] = checkExeptions(currentRow[j].trim()); if (calc.SPECIES[9][currentRow[j].trim()] !== undefined) { - currentPoke = calc.SPECIES[9][currentRow[j].trim()]; + currentPoke = JSON.parse(JSON.stringify(calc.SPECIES[9][currentRow[j].trim()])); currentPoke.name = currentRow[j].trim(); currentPoke.item = getItem(currentRow, j + 1); if (j === 1 && currentRow[0].trim()) {