|
|
|
@ -350,13 +350,15 @@ function drawCardInHand(entity){
|
|
|
|
// TODO: Change card colour based on its colours
|
|
|
|
// TODO: Change card colour based on its colours
|
|
|
|
|
|
|
|
|
|
|
|
// Draw the card shape
|
|
|
|
// Draw the card shape
|
|
|
|
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
|
|
|
|
if(entity in gameData.cardStatus.targetable){ strokeStyle = '#222'; }
|
|
|
|
let shape = new Shape({
|
|
|
|
let shape = new Shape({
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
y: gameData.position[entity][1],
|
|
|
|
y: gameData.position[entity][1],
|
|
|
|
width: gameData.size[entity][0],
|
|
|
|
width: gameData.size[entity][0],
|
|
|
|
height: gameData.size[entity][1],
|
|
|
|
height: gameData.size[entity][1],
|
|
|
|
fillStyle: '#EEE',
|
|
|
|
fillStyle: '#EEE',
|
|
|
|
strokeStyle: '#AAA',
|
|
|
|
strokeStyle: strokeStyle,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
shape.draw();
|
|
|
|
shape.draw();
|
|
|
|
|
|
|
|
|
|
|
|
@ -370,7 +372,9 @@ function drawCardOnBoard(entity){
|
|
|
|
// TODO: Passives, flight, etc. effects
|
|
|
|
// TODO: Passives, flight, etc. effects
|
|
|
|
|
|
|
|
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
if(entity in gameData.cardStatus.tapped){ strokeStyle = '#555'; }
|
|
|
|
if(entity in gameData.cardStatus.tapped){ strokeStyle = '#6D0202'; }
|
|
|
|
|
|
|
|
if(entity in gameData.cardStatus.targetable){ strokeStyle = '#FF9A00'; }
|
|
|
|
|
|
|
|
if(entity in gameData.cardStatus.targetted){ strokeStyle = '#EC5300'; }
|
|
|
|
// Draw the card shape
|
|
|
|
// Draw the card shape
|
|
|
|
let shape = new Shape({
|
|
|
|
let shape = new Shape({
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
@ -392,6 +396,7 @@ function drawShield(entity){
|
|
|
|
|
|
|
|
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
if(entity in gameData.cardStatus.tapped){ strokeStyle = '#555'; }
|
|
|
|
if(entity in gameData.cardStatus.tapped){ strokeStyle = '#555'; }
|
|
|
|
|
|
|
|
if(entity in gameData.cardStatus.targetable){ strokeStyle = '#222'; }
|
|
|
|
// Draw the card shape
|
|
|
|
// Draw the card shape
|
|
|
|
let shape = new Shape({
|
|
|
|
let shape = new Shape({
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
@ -416,6 +421,7 @@ function drawMana(entity){
|
|
|
|
|
|
|
|
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
let strokeStyle = '#AAA';
|
|
|
|
if(entity in gameData.cardStatus.tapped){ strokeStyle = '#555'; }
|
|
|
|
if(entity in gameData.cardStatus.tapped){ strokeStyle = '#555'; }
|
|
|
|
|
|
|
|
if(entity in gameData.cardStatus.targetable){ strokeStyle = '#222'; }
|
|
|
|
// Draw the card shape
|
|
|
|
// Draw the card shape
|
|
|
|
let shape = new Shape({
|
|
|
|
let shape = new Shape({
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
x: gameData.position[entity][0],
|
|
|
|
|