26 lines
617 B
Haskell
26 lines
617 B
Haskell
module Card where
|
|
|
|
import Mana
|
|
|
|
data Rarity = Land
|
|
| Common
|
|
| Uncommon
|
|
| Rare
|
|
| Mythic
|
|
| Special
|
|
deriving (Show, Eq)
|
|
|
|
data Card = Card { card_name :: String
|
|
, card_cost :: Cost
|
|
, card_type :: String
|
|
, card_subtypes :: [String]
|
|
, card_rarity :: Rarity
|
|
, card_abilities :: [String]
|
|
, card_power :: Int
|
|
, card_toughness :: Int
|
|
}
|
|
deriving (Show, Eq)
|
|
|
|
instance Mana Card where
|
|
colors c = colors $ card_cost c
|
|
converted c = converted $ card_cost c
|