|
|
|
|
@ -35,6 +35,10 @@ let player = {};
|
|
|
|
|
let listPosition = {};
|
|
|
|
|
let cardFace = {};
|
|
|
|
|
let cardSprite = {};
|
|
|
|
|
let deckIn = {}; // NEW, may be used, for now player substitute
|
|
|
|
|
let deckData = {};
|
|
|
|
|
let cardAttack = {}; // TODO: add to the logic
|
|
|
|
|
let cardColours = {};
|
|
|
|
|
let inEvent = null;
|
|
|
|
|
|
|
|
|
|
// To disable drawing each time something changes
|
|
|
|
|
@ -839,10 +843,10 @@ function loadBoard(data) {
|
|
|
|
|
|
|
|
|
|
cardSprite = {}; // TODO: ? Maybe, or this could be done clientside based
|
|
|
|
|
// ^ on card id?
|
|
|
|
|
let deckIn = data.deckIn; // NEW, may be used, for now player substitute
|
|
|
|
|
let deckData = data.deckData;
|
|
|
|
|
let cardAttack = data.cardAttack; // TODO: add to the logic
|
|
|
|
|
let cardColours = data.cardColours; // TODO: add to the logic
|
|
|
|
|
deckIn = data.deckIn; // NEW, may be used, for now player substitute
|
|
|
|
|
deckData = data.deckData;
|
|
|
|
|
cardAttack = data.cardAttack; // TODO: add to the logic
|
|
|
|
|
cardColours = data.cardColours;
|
|
|
|
|
|
|
|
|
|
// TODO: JANK IN, CHANGE CODE TO USE NEW ARRAY!!
|
|
|
|
|
// Temp jank, set colour to first colour req.
|
|
|
|
|
@ -852,7 +856,7 @@ function loadBoard(data) {
|
|
|
|
|
// after && to check if there is a colourReq record in cardColours
|
|
|
|
|
if(cardData[i] !== undefined && i in cardColours){ // i may not have carddata, as realDeck
|
|
|
|
|
console.log(i);
|
|
|
|
|
cardData[i].colour = cardColours[i][0];
|
|
|
|
|
cardData[i].colour = cardColours[i][0][0]; // Colour Id of first req
|
|
|
|
|
// Set the artwork (this would be done front-end I think)
|
|
|
|
|
cardSprite[i] = [0,0];
|
|
|
|
|
// Temp sprite set based on colour TODO: Change to set correct sprite from DB
|
|
|
|
|
|