cards
This commit is contained in:
parent
6827b966fd
commit
03fff8576e
41
src/cards.ts
Normal file
41
src/cards.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import {
|
||||
DominionCard,
|
||||
TYPE_ACTION,
|
||||
TYPE_DURATION,
|
||||
TYPE_REACTION,
|
||||
TYPE_TREASURE,
|
||||
TYPE_VICTORY,
|
||||
} from "./types.ts";
|
||||
|
||||
const expansionIcon = "";
|
||||
const author = "Dylan";
|
||||
|
||||
export const cards: DominionCard[] = [
|
||||
{
|
||||
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 3 cards you have that cost $4 or $5.",
|
||||
types: [TYPE_VICTORY],
|
||||
image: "",
|
||||
artist: "",
|
||||
author,
|
||||
version: "",
|
||||
cost: "$3",
|
||||
preview: "",
|
||||
expansionIcon,
|
||||
},
|
||||
];
|
@ -1,12 +1,12 @@
|
||||
import { useState } from "react";
|
||||
import { sampleCards } from "../sampleData.ts";
|
||||
import { cards } from "../cards.ts";
|
||||
import { Card } from "./Card.tsx";
|
||||
|
||||
export const App = () => {
|
||||
const [count, setCount] = useState(0);
|
||||
return <div>
|
||||
{sampleCards.map((sampleCard) => {
|
||||
return <Card key={`${sampleCard.title}-${count}`} card={sampleCard}/>
|
||||
{cards.map((card) => {
|
||||
return <Card key={`${card.title}-${count}`} card={card}/>
|
||||
})}
|
||||
<button onClick={() => {setCount(c => c+1)}}>Rerender (for fonts)</button>
|
||||
</div>;
|
||||
|
@ -15,6 +15,7 @@ export const sampleCards: DominionCard[] = [
|
||||
"+*\n\nReveal the top card of your deck. If it's an Action card, +1 Action. If it has ^ in its cost, +1 Card.",
|
||||
types: [TYPE_ACTION, TYPE_DURATION, TYPE_REACTION],
|
||||
image: "https://wiki.dominionstrategy.com/images/7/76/AdventurerArt.jpg",
|
||||
expansionIcon: "",
|
||||
artist: "Dall-E",
|
||||
author: "John Doe",
|
||||
version: "",
|
||||
@ -27,6 +28,7 @@ export const sampleCards: DominionCard[] = [
|
||||
description: "+1 Card\n+1 Action\n+1 Buy\n+$1",
|
||||
types: [TYPE_ACTION],
|
||||
image: "",
|
||||
expansionIcon: "",
|
||||
artist: "Leonardo DaVinci",
|
||||
author: "Jane Smith",
|
||||
version: "",
|
||||
@ -40,6 +42,7 @@ export const sampleCards: DominionCard[] = [
|
||||
"+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: "",
|
||||
expansionIcon: "",
|
||||
artist: "",
|
||||
author: "",
|
||||
version: "",
|
||||
@ -52,6 +55,7 @@ export const sampleCards: DominionCard[] = [
|
||||
description: "Worth 1% per 3 cards you have that cost $4 or $5.",
|
||||
types: [TYPE_VICTORY],
|
||||
image: "",
|
||||
expansionIcon: "",
|
||||
artist: "",
|
||||
author: "",
|
||||
version: "",
|
||||
@ -64,6 +68,7 @@ export const sampleCards: DominionCard[] = [
|
||||
description: "Choose one: +3 Cards, or +2 Actions.\n\n\n-\n\n\n2%",
|
||||
types: [TYPE_ACTION, TYPE_VICTORY],
|
||||
image: "",
|
||||
expansionIcon: "",
|
||||
artist: "",
|
||||
author: "",
|
||||
version: "",
|
||||
|
@ -43,6 +43,7 @@ export type DominionCard =
|
||||
author: string;
|
||||
version: string;
|
||||
cost: DominionText;
|
||||
expansionIcon: string;
|
||||
preview?: DominionText;
|
||||
}
|
||||
| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user