|
|
|
|
@ -215,6 +215,10 @@ class Board{
|
|
|
|
|
fillStyle: fill,
|
|
|
|
|
strokeStyle: border
|
|
|
|
|
});
|
|
|
|
|
// Add a dropshadow to flight cards (they're flyin)
|
|
|
|
|
if(flight[itemKey]){
|
|
|
|
|
shape.setShadow(true);
|
|
|
|
|
}
|
|
|
|
|
shape.draw();
|
|
|
|
|
|
|
|
|
|
// Draw the card face-up
|
|
|
|
|
@ -222,6 +226,7 @@ class Board{
|
|
|
|
|
this.addCardImage(itemKey);
|
|
|
|
|
this.printCardDetails(itemKey);
|
|
|
|
|
this.printColourRequirements(itemKey);
|
|
|
|
|
this.printCardPassives(itemKey);
|
|
|
|
|
}
|
|
|
|
|
if(!this.isFaceUp(itemKey)){
|
|
|
|
|
this.addCardBack(itemKey);
|
|
|
|
|
@ -346,6 +351,23 @@ class Board{
|
|
|
|
|
// TODO: CardBack/Sleeves as spritesheet like cardArt
|
|
|
|
|
ctx.drawImage(cardBackArt, 0,0, 80,120,positionX,positionY,width,height);
|
|
|
|
|
}
|
|
|
|
|
// Check each passive, if the card has it, add the 'icon' to display it.
|
|
|
|
|
printCardPassives(itemKey){
|
|
|
|
|
|
|
|
|
|
let passiveCount = 0;
|
|
|
|
|
|
|
|
|
|
let positionX = position[itemKey][0];
|
|
|
|
|
let positionY = position[itemKey][1] - 10;
|
|
|
|
|
|
|
|
|
|
if(itemKey in flight){
|
|
|
|
|
this.printCenterText('F', positionX + (10*passiveCount), positionY);
|
|
|
|
|
passiveCount++;
|
|
|
|
|
}
|
|
|
|
|
if(itemKey in reach){
|
|
|
|
|
this.printCenterText('R', positionX + (10*passiveCount), positionY);
|
|
|
|
|
passiveCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printColourRequirements(itemKey){
|
|
|
|
|
// Set the size(s)
|
|
|
|
|
let width = size[itemKey][0]*.1;
|
|
|
|
|
@ -1550,6 +1572,10 @@ function calculateItemSizePosition(itemKey){
|
|
|
|
|
if(itemPlayer == 0 && itemElement == 'board'){
|
|
|
|
|
positionX = canvas.width/2 - (cardWidth * (itemListLength - (i+1)) - (cardMargin * (i+1)));
|
|
|
|
|
positionY = canvas.height - cardHeight-30-(cardHeight);
|
|
|
|
|
// Move up to denote 'Flight' keyword
|
|
|
|
|
if(flight[itemKey]){
|
|
|
|
|
positionY-=10;
|
|
|
|
|
}
|
|
|
|
|
width = cardWidth;
|
|
|
|
|
height = cardHeight;
|
|
|
|
|
}
|
|
|
|
|
|