evac/Types.hs
2019-05-21 11:37:03 +12:00

80 lines
2.4 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
data PlayerState = PlayerState
{ psPlayerName :: PlayerName
, psHand :: Hand
, psDeck :: Deck
, psDiscard :: Discard
, psDP :: Integer
} deriving (Show, Eq)
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)