Files
loop/src/Dodge/Creature/State/Data.hs
T

48 lines
1.0 KiB
Haskell

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Creature.State.Data
where
--import Geometry
import Geometry.Data
import Dodge.Data.DamageType
import Color
import Control.Lens
import qualified Data.IntSet as IS
import qualified Data.Vector as V
data CreatureState = CrSt
{ _crDamage :: [Damage]
, _crPastDamage :: V.Vector [Damage]
, _crSpState :: CrSpState
, _crDropsOnDeath :: CreatureDropType
}
data CreatureDropType
= DropAll
| DropAmount Int
| DropSpecific [Int]
data CrSpState
= Barrel { _piercedPoints :: [Point2]}
| GenCr
deriving (Eq,Show,Ord)
data Faction
= GenericFaction Int
| ZombieFaction
| EncircleFlock
| ChaseCritters
| SpawnedBy Int
| NoFaction
| ColorFaction Color
| PlayerFaction
deriving (Eq,Show)
data CrGroup
= LoneWolf
| Swarm
{ _swarm :: IS.IntSet
, _crGroupID :: Int
}
| CrGroupID { _crGroupID :: Int }
| ShieldGroup
deriving (Eq, Show)
makeLenses ''CreatureState
makeLenses ''CrSpState