Partial (not working) refactor of damages, energyballs
This commit is contained in:
@@ -9,22 +9,26 @@ creatures.
|
||||
-}
|
||||
module Dodge.Data.Damage (
|
||||
module Dodge.Data.Damage,
|
||||
module Dodge.Data.Damage.Type,
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Damage.Type
|
||||
import Geometry.Data
|
||||
|
||||
data Damage = Damage
|
||||
{ _dmType :: DamageType
|
||||
, _dmAmount :: Int
|
||||
, _dmFrom :: Point2
|
||||
, _dmAt :: Point2
|
||||
, _dmTo :: Point2
|
||||
}
|
||||
data Damage
|
||||
= Piercing {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2}
|
||||
| Blunt {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2}
|
||||
| Sparking {_dmAmount :: Int}
|
||||
| Crushing {_dmAmount :: Int}
|
||||
| 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
|
||||
|
||||
Reference in New Issue
Block a user