From f94261866e74692d476b135d5e1259527b989dbb Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 21 Nov 2020 19:52:09 -0500 Subject: [PATCH] Add [Spell Card] and [Trap Card] --- commands/edit-image/yu-gi-oh-gen.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/edit-image/yu-gi-oh-gen.js b/commands/edit-image/yu-gi-oh-gen.js index e9ca1fbd..b6afbc78 100644 --- a/commands/edit-image/yu-gi-oh-gen.js +++ b/commands/edit-image/yu-gi-oh-gen.js @@ -126,8 +126,8 @@ module.exports = class YuGiOhGenCommand extends Command { ctx.font = '87px Matrix'; ctx.fillText(name, 60, 57, 620); ctx.fillStyle = 'black'; - ctx.font = '31px Stone Serif Small Caps'; if (type === 'monster') { + ctx.font = '31px Stone Serif Small Caps'; let typeStr = `[ ${firstUpperCase(species)} / ${firstUpperCase(monsterType)}`; if (monsterType !== 'normal' && monsterType !== 'effect' && monsterType !== 'token') { typeStr += ' / Effect'; @@ -137,6 +137,12 @@ module.exports = class YuGiOhGenCommand extends Command { ctx.font = '29px Stone Serif'; ctx.fillText(atk, 514, 1079); ctx.fillText(def, monsterType === 'link' ? 722 : 675, 1079); + } else if (type === 'spell') { + ctx.font = '35px Stone Serif Small Caps'; + ctx.fillText('[Spell Card]', 502, 141); + } else if (type === 'trap') { + ctx.font = '35px Stone Serif Small Caps'; + ctx.fillText('[Trap Card]', 512, 141); } ctx.font = '27px Matrix Book'; const wrappedEffect = await wrapText(ctx, effect, 690);