Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cd4754901c | ||
|
2a8ee97e76 | ||
|
64354f93f8 |
@ -1,2 +1,5 @@
|
|||||||
# dominionator
|
# Dominionator
|
||||||
|
|
||||||
|
A web-app for making [Dominion](https://www.riograndegames.com/games/dominion/) fan-cards. Inspired by [shardofhonor's dominion-card-generator](https://github.com/shardofhonor/dominion-card-generator), but trying to be more modern and maintainable with React and Typescript. Currently it's not much of a web-app since there are no inputs to edit the cards, but you can mess with the hardcoded array in `src/cards.ts` to render arbitrary cards.
|
||||||
|
|
||||||
|
To run it, clone the repo and run `deno task dev`.
|
16
cards.js
@ -1,16 +0,0 @@
|
|||||||
const cards = [
|
|
||||||
"Chateau",
|
|
||||||
"Consul",
|
|
||||||
"Eclipse",
|
|
||||||
"Flask",
|
|
||||||
"Foundry",
|
|
||||||
"Moonlit_Scheme",
|
|
||||||
"Productive_Village",
|
|
||||||
"Retainer",
|
|
||||||
"Secret_Society",
|
|
||||||
"Shovel",
|
|
||||||
"Silk",
|
|
||||||
"Steelworker",
|
|
||||||
"Vase",
|
|
||||||
"Vendor",
|
|
||||||
]
|
|
Before Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 2.8 MiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 3.7 MiB |
Before Width: | Height: | Size: 3.4 MiB |
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 3.0 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 3.4 MiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 3.9 MiB |
Before Width: | Height: | Size: 1.9 MiB |
45
index.html
@ -1,45 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Dominionator</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
display: block;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.break {
|
|
||||||
page-break-after: always;
|
|
||||||
}
|
|
||||||
.card {
|
|
||||||
width: 2.25in;
|
|
||||||
break-inside: avoid;
|
|
||||||
}
|
|
||||||
.card.horizontal {
|
|
||||||
width: auto;
|
|
||||||
height: 2.25in;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="cards"></div>
|
|
||||||
<script src="cards.js"></script>
|
|
||||||
<script>
|
|
||||||
const cardsDiv = document.getElementById("cards");
|
|
||||||
const addCard = (card) => {
|
|
||||||
cardsDiv.innerHTML += `<img class="card" src="./cards/${card}_v0.1.png"/>`
|
|
||||||
}
|
|
||||||
// // randomizers
|
|
||||||
// for (const card of cards) {
|
|
||||||
// addCard(card);
|
|
||||||
// }
|
|
||||||
// cards
|
|
||||||
for (const card of cards) {
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
addCard(card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
289
src/cards.ts
@ -1,16 +1,16 @@
|
|||||||
import {
|
import {
|
||||||
DominionCard,
|
DominionCard,
|
||||||
TYPE_ACTION,
|
TYPE_ACTION,
|
||||||
TYPE_DURATION,
|
// TYPE_DURATION,
|
||||||
TYPE_NIGHT,
|
// TYPE_NIGHT,
|
||||||
TYPE_TREASURE,
|
// TYPE_TREASURE,
|
||||||
TYPE_VICTORY,
|
// TYPE_VICTORY,
|
||||||
} from "./types.ts";
|
} from "./types.ts";
|
||||||
|
|
||||||
const expansionIcon = "";
|
const expansionIcon = "";
|
||||||
const author = "Dylan";
|
const author = "Dylan";
|
||||||
|
|
||||||
const _sampleCard = {
|
const _sampleCard: DominionCard = {
|
||||||
orientation: "card",
|
orientation: "card",
|
||||||
title: "Sample",
|
title: "Sample",
|
||||||
description: "",
|
description: "",
|
||||||
@ -24,281 +24,4 @@ const _sampleCard = {
|
|||||||
expansionIcon,
|
expansionIcon,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const cards: DominionCard[] = [
|
export const cards: DominionCard[] = [_sampleCard, _sampleCard];
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Flask",
|
|
||||||
description:
|
|
||||||
"+2 Cards\n\nAt the start of your Clean-up phase, you may put a card from your hand onto your deck.",
|
|
||||||
types: [TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$6",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Promising Land",
|
|
||||||
description: "Worth 1% per 4 cards you have that cost $4 or $5.",
|
|
||||||
types: [TYPE_VICTORY],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$4",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Steelworker",
|
|
||||||
description:
|
|
||||||
"If it's your Action phase, +3 Cards.\n\nIf it's your Buy phase, +1 Buy, and +$1.",
|
|
||||||
types: [TYPE_ACTION, TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.2",
|
|
||||||
cost: "$5",
|
|
||||||
preview: "$?",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Shovel",
|
|
||||||
description:
|
|
||||||
"Play a Treasure card from your hand. Then trash it from play to gain a Treasure card costing up to $3 more than it.",
|
|
||||||
types: [TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$6",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "High Council",
|
|
||||||
description:
|
|
||||||
"+2 Cards\n+1 Action\n+1 Buy\n\nEach player (including you) may choose one: +1 Card, or trash a card from their hand.",
|
|
||||||
types: [TYPE_ACTION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author: "Lou + Dylan",
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$7",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Productive Village",
|
|
||||||
description:
|
|
||||||
"If it's your Action phase, +3 Actions.\n\nIf it's your Buy phase, +$1 per unused Action you have (Action, not Action card). +$1 if you have no Actions.",
|
|
||||||
types: [TYPE_ACTION, TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author: "Dylan",
|
|
||||||
version: "0.2",
|
|
||||||
cost: "$3",
|
|
||||||
preview: "$?",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Secret Society",
|
|
||||||
description:
|
|
||||||
"+1 Action\n\nIf you have at least 3 copies of Secret Society in play, trash all of them to gain any number of cards costing at least $2, whose total combined cost is at most $50.\n\n-\n\nThis card cannot be gained other than by buying it. During a player's buy phase, this costs $3 plus $2 per Secret Society they've gained this game.",
|
|
||||||
types: [TYPE_ACTION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author: "Dylan",
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$4*",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Eclipse",
|
|
||||||
description:
|
|
||||||
"+1 Card\n\nIf you have no Actions, +1 Action. If you have no Buys, +1 Buy. Return to your Action phase.",
|
|
||||||
types: [TYPE_NIGHT],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author: "Dylan",
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$5",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Moonlit Scheme",
|
|
||||||
description: "You may play an Action card from your hand.",
|
|
||||||
types: [TYPE_NIGHT],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author: "Dylan",
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$2",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Beaver",
|
|
||||||
description:
|
|
||||||
"Pay $1. If you did, gain a card costing up to the amount of $ you have.",
|
|
||||||
types: [TYPE_NIGHT],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author: "Dylan",
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$3",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Silk",
|
|
||||||
description: "Choose one: +$2, or gain a Silver.",
|
|
||||||
types: [TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$4",
|
|
||||||
preview: "$?",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Foundry",
|
|
||||||
description:
|
|
||||||
"Choose one: +1 Card, +1 Action and +$1; or trash a card from your hand to gain a card that costs up to $2 more than it.",
|
|
||||||
types: [TYPE_ACTION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$5",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Vendor",
|
|
||||||
description:
|
|
||||||
"Choose three different options: +1 Card, +1 Action, +1 Buy, +$1, trash a card from your hand.",
|
|
||||||
types: [TYPE_ACTION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.2",
|
|
||||||
cost: "$5",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Chateau",
|
|
||||||
description:
|
|
||||||
"1%\n\n-\n\nWhen you gain this, choose one: gain an Estate; or +1 Card, +1 Action, +1 Buy, +$1, and if it's your Buy phase, return to your Action phase.",
|
|
||||||
types: [TYPE_VICTORY],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$3",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Retainer",
|
|
||||||
description:
|
|
||||||
"Set aside a card from your hand (under this).\n\nAt any time during any of your turns, you may take +1 Action, and add the set aside card to your hand, discarding this from play.\n\nAt the start of each of your Buy phases, if the card is still set aside, +@1.",
|
|
||||||
types: [TYPE_ACTION, TYPE_DURATION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.2",
|
|
||||||
cost: "$2",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Crop Field",
|
|
||||||
description: "$1\n\n-\n\n1%",
|
|
||||||
types: [TYPE_TREASURE, TYPE_VICTORY],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$3",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Duet",
|
|
||||||
description:
|
|
||||||
"Play one of the set aside cards, leaving it there\n\n-\n\nSetup: set aside two unused non-Duration Action cards of the same cost. This costs $1 more than the cost of the set aside cards.",
|
|
||||||
types: [TYPE_ACTION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$?",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Scraps",
|
|
||||||
description:
|
|
||||||
"If it's your Action phase, trash up to 3 cards from your hand.\n\nIf it's your Buy phase, +$1 per 10 cards in the trash (round down).",
|
|
||||||
types: [TYPE_ACTION, TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$4",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Slogger",
|
|
||||||
description:
|
|
||||||
"+1 Card\n+1 Action\n\nReveal the top 5 cards of your deck. Put the Victory cards into your hand, and put the rest back on top in any order.",
|
|
||||||
types: [TYPE_ACTION],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$4",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orientation: "card",
|
|
||||||
title: "Vase",
|
|
||||||
description:
|
|
||||||
"$2\nReturn this to its pile.\n\n-\n\nWhen you gain this, gain another Vase (that doesn't come with another).",
|
|
||||||
types: [TYPE_TREASURE],
|
|
||||||
image: "",
|
|
||||||
artist: "",
|
|
||||||
author,
|
|
||||||
version: "0.1",
|
|
||||||
cost: "$3",
|
|
||||||
preview: "",
|
|
||||||
expansionIcon,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|