evac/Types.hs

74 lines
2.3 KiB
Haskell

module Types where
data MainCharacter = Shinji | Asuka | Rei | Misato | Ritsuko | Gendo deriving (Show, Eq)
data MainEva = UnitZero | UnitOne | UnitTwo deriving (Show, Eq)
data Angel = Sachiel | Shamshel | Ramiel | Gaghiel | Israfel | Sandalphon | Matariel | Sahaquiel | Ireul | Leliel | Bardiel | Zeruel | Arael | Armisael | Kaworu | Man | Lilith | Adam
data CardSym = S01_Shinji | S02_Asuka | S03_Rei | S04_Misato | S05_Ritsuko | S06_Gendo deriving (Show, Eq)
-- TODO
-- * Create worker functions for the Card Stack
-- work into playing line
type CardLib = [(CardSym, CardInfo)]
type Downed = [MainCharacter]
type PutCards = [(Either MainCharacter MainEva, CardSym)]
type CardStack = [(PlayerId, CardSym)]
data NeoTokyo = NeoTokyo
{ ntGroups :: Groups
, ntEvas :: Evas
, ntAngels :: Angels
, ntPutCards :: PutCards
, ntDowned :: Downed
}
type Evas = [MainEva]
type Group = [MainCharacter]
type Groups = [Group]
type Angels = [Angel]
data BoardState = BoardState
{ bsNeoTokyo :: NeoTokyo
, bsPlayerLib :: PlayerLib
, bsActivePlayers :: ActivePlayers
, bsPriorityPlayer :: PriorityPlayer
, bsCardStack :: CardStack
, bsCardLib :: CardLib
, bsGameLog :: GameLog
}
type PlayerLib = [(PlayerId, PlayerState)]
type ActivePlayers = [PlayerId]
type PriorityPlayer = PlayerId
type PlayerId = Integer
type PlayerState = (PlayerName, Hand, Deck, Discard)
type PlayerName = String
type Hand = [CardSym]
type Deck = [CardSym]
type Discard = [CardSym]
type GameLog = [GameMessage]
type GameMessage = Either GameLine GameError
type GameLine = String
type GameError = String
data Faction = Blue | Red | White | Green | Yellow | Black deriving (Show)
data TypeSym = Character | Eva | Angel | Drama | Put | Intstrumentality deriving (Show, Eq)
data Trait = Other | Reaction | Male | Female | Weapon deriving (Show)
type Traits = [Trait]
data Mark = Circle | Triangle deriving (Show)
type LineMark = (Mark, Faction)
type LineMarks = [LineMark]
data CardInfo = CardInfo
{ ciName :: String
, ciFaction :: Faction
, ciType :: TypeSym
, ciText :: String
, ciTraits :: Traits
, ciLineMarks :: Maybe LineMarks
, ciLine :: Maybe String
, ciDP :: Maybe Integer
, ciStrength :: Maybe Integer
, ciLevel :: Maybe Integer
, ciNextInst :: Maybe CardSym
} deriving (Show)