{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TemplateHaskell #-} {- Datatypes describing the type of damage effects that are to be applied to creatures. -} module Dodge.Data.Damage ( module Dodge.Data.Damage, ) where import Control.Lens import Data.Aeson import Data.Aeson.TH import Geometry.Data data Damage = Piercing {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Blunt {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Sparking {_dmAmount :: Int} | Crushing {_dmAmount :: Int, _dmVector :: Point2} | Shattering {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Flaming {_dmAmount :: Int} | Lasering {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Flashing {_dmAmount :: Int, _dmPos :: Point2} | Electrical {_dmAmount :: Int} | Explosive {_dmAmount :: Int, _dmCenter :: Point2} | Poison {_dmAmount :: Int} | Enterrement {_dmAmount :: Int} deriving (Eq, Ord, Show, Read) --Generic, Flat) makeLenses ''Damage deriveJSON defaultOptions ''Damage