diff --git a/public/board.js b/public/board.js index 3051e48..c4d90d5 100644 --- a/public/board.js +++ b/public/board.js @@ -1087,8 +1087,9 @@ function createDeckList(playerId){ item.push(itemCount); // Set card data for new item // Use the ID from the deckList of player, and return the card of that ID from cardList/DB - // ID 1 was adding id 0 as array index. Changed to +1 for now (will correct in DB form) - cardData[itemCount] = cardArray[deckList[deckItem]+1]; + // For now, needs to be -1, as ID1 in decklist refers to ID 1 of carlist which is INDEX 0 + // TODO: Make it use the cardList ID, not the index + cardData[itemCount] = cardArray[deckList[deckItem]-1]; // Set to base position of 'deck' boardElement[itemCount] = 'deck'; // Set Attack, ManaCost, ManaColours TODO: When these are implemented seperately