Add [Spell Card] and [Trap Card]

This commit is contained in:
Dragon Fire
2020-11-21 19:52:09 -05:00
parent 7d44608c6a
commit f94261866e
+7 -1
View File
@@ -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);