Skip to content

Commit

Permalink
new card added
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwieth committed Sep 12, 2019
1 parent c0f3083 commit 1f5454d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
Binary file added img/card/16084444310_39c77ccc78_b.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/card/blasturn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions json/cards.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,28 @@
"to the number of chu chu counters on it."
],
"image": "schoolbus"
},
{
"name": "Blasturn, the Capital",
"type": "HQ",
"hp": 22,
"damage": 0,
"speed": 6,
"cost":{
"lumber": 0,
"metal": 0,
"mana": 0,
"energy": 0,
"food": 0
},
"description": [
"Produce - Energy 3, Metal 2, Food 1",
"Periodic - draw a card",
"Starting cards in hand: 5",
"",
"3 Energy, 1 Metal: create a 0/1 Metal Bot",
"with tag 'scrap'"
],
"image": "blasturn"
}
]
17 changes: 10 additions & 7 deletions minter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ function createCard(card, cb) {
ctx.font = 'bold '+specs.typeFontSize+'px Roboto';
ctx.fillText(card.speed, specs.speedPosition[0], specs.speedPosition[1]);

ctx.fillStyle = "rgba(3,192,60,1)";
ctx.font = 'bold '+specs.typeFontSize+'px Roboto';
ctx.fillText(card.damage, specs.damagePosition[0], specs.damagePosition[1]);

ctx.font = 'bold '+specs.typeFontSize+'px Roboto';
ctx.fillStyle = "rgba(255,100,100,1)";
ctx.fillText(card.hp, specs.hpPosition[0], specs.hpPosition[1]);
if(card.damage) {
ctx.fillStyle = "rgba(255,100,100,1)";
ctx.font = 'bold '+specs.typeFontSize+'px Roboto';
ctx.fillText(card.damage, specs.damagePosition[0], specs.damagePosition[1]);
}

if(card.hp) {
ctx.font = 'bold '+specs.typeFontSize+'px Roboto';
ctx.fillStyle = "rgba(3,192,60,1)";
ctx.fillText(card.hp, specs.hpPosition[0], specs.hpPosition[1]);
}

if(card.cost.lumber) {
ctx.fillStyle = "rgba(131,105,83,1)";
Expand Down

0 comments on commit 1f5454d

Please sign in to comment.