Make block damages slightly more logical
This commit is contained in:
@@ -3,3 +3,44 @@
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
module Dodge.Data.Wall where
|
||||
import Geometry
|
||||
import Color
|
||||
import ShapePicture
|
||||
import Control.Lens
|
||||
data Wall = Wall
|
||||
{ _wlLine :: (Point2,Point2)
|
||||
, _wlID :: Int
|
||||
, _wlColor :: Color
|
||||
, _wlSeen :: Bool
|
||||
, _wlOpacity :: Opacity
|
||||
, _wlPathable :: Bool
|
||||
, _wlWalkable :: Bool
|
||||
, _wlTouchThrough :: Bool
|
||||
, _wlFireThrough :: Bool
|
||||
, _wlReflect :: Bool
|
||||
, _wlDraw :: Bool
|
||||
, _wlRotateTo :: Bool
|
||||
, _wlStructure :: WallStructure
|
||||
, _wlHeight :: Float
|
||||
-- , _wlDamageEff :: Damage -> Wall -> World -> World
|
||||
, _wlMaterial :: Material
|
||||
}
|
||||
data Opacity
|
||||
= SeeThrough
|
||||
| SeeAbove
|
||||
| DrawnWall {_opDraw :: Wall -> SPic}
|
||||
| Opaque
|
||||
data WallStructure
|
||||
= StandaloneWall
|
||||
| DoorPart { _wsDoor :: Int }
|
||||
| MachinePart { _wsMachine :: Int }
|
||||
| BlockPart { _wsBlock :: Int }
|
||||
| CreaturePart
|
||||
{ _wlStCreature :: Int
|
||||
-- , _wlStDamCreature :: Damage -> Wall -> Int -> World -> World
|
||||
}
|
||||
data Material = Wood | Dirt | Stone | Glass | Metal | Crystal
|
||||
deriving (Eq,Ord,Show,Bounded,Enum)
|
||||
makeLenses ''Wall
|
||||
makeLenses ''WallStructure
|
||||
makeLenses ''Opacity
|
||||
|
||||
Reference in New Issue
Block a user