oskarrough / slaytheweb

Slay the Web is a singleplayer, deck builder, roguelike card crawl game for the web based on Slay the Spire
https://slaytheweb.cards
GNU Affero General Public License v3.0
193 stars 40 forks source link

Move cards into separate files #204

Closed oskarrough closed 1 year ago

oskarrough commented 1 year ago

Each card now has its own file and must follow provide two exports:

export default { ... card }
export const upgrade = (card) => card

This has the benefit that cards no longer have a upgrade method on the card object itself, which was giving trouble when serializing game state.

Closes https://github.com/oskarrough/slaytheweb/issues/185

cloudflare-pages[bot] commented 1 year ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 638cdf6
Status: ✅  Deploy successful!
Preview URL: https://70dbcf4b.slaytheweb.pages.dev
Branch Preview URL: https://feat-card-upgrade.slaytheweb.pages.dev

View logs