jamuraa/gatherling — Issue #41: Card structure does not have enough fields to contain all card data
Author: Dabil
Created: 2012-02-17 18:50:24+00:00
State: open

Need to add fields to contain all of the card data. In this way the database can be used to replace the deckbox functions that show the card pic in a little pop-up box when you hover over the card name. Also will be able to develop a deck editor on the site. That way it makes it easy for people to build decks for alt formats and other crazy formats we may want to run.

Thinking the new structure should be:

name: varchar(40) // name of card
cardset: varchar(40) // card set card is from
type: varchar(40) // type of card: Instant, Sorcery, Land, Creature, etc.
pow/Tgh: varchar(40) // Power and toughness of creatures
cost: varchar(40) // Mana cost of card.
rarity:varchar(40) // lists rarity of cards common, uncommon, rare, mythic.
rules:varchar(200) // Contains card text. ex. T: Draw a card and discard a card.
flavor: varchar(200) // Contains flavor text of card
ID:bigint(20) unsigned // Card ID:
image:varchar(40) // Card Image file name, card images should be in a directory inside of Gatherling

Do away with fields:

isw, isr, isg, isu, isb, isp, convertedcost: all these fields can be calculated from the cost field.