/* --------------- Settings --------------- */
let deckId = "nHMEqy7N7gna2X3w";
let baseUrl = "cards/dark-gold/";
/* --------------- Script --------------- */
let deck = game.cards.get(deckId);
let suits = ["Spades", "Clubs", "Hearts", "Diamonds"];
let names = ["Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"];
for (let suit of suits) {
let value = 1;
for (let name of names) {
let cName = "";
let sName = suit.toLowerCase();
if (value > 1 && value < 11) cName = value.toString().padStart(2, "0");
else cName = name.toLowerCase();
let fileName = `${baseUrl}${sName}-${cName}.webp`;
let cardName = `${name} of ${suit}`;
console.log(value, cardName, fileName);
await Card.create({
name: cardName, suit: suit, type: "base", origin: deck.id, value,
faces: [{
img: fileName,
name: cardName
}]
}, { parent: deck }
);
value++;
}
}