Partial (not working) refactor of damages, energyballs

This commit is contained in:
2025-06-07 12:22:06 +01:00
parent 2b39152060
commit e914555728
10 changed files with 265 additions and 290 deletions
+13 -9
View File
@@ -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