Allow for bullet drag
This commit is contained in:
+18
-29
@@ -131,10 +131,11 @@ defaultState = CrSt
|
||||
}
|
||||
defaultEquipment :: Item
|
||||
defaultEquipment = Equipment
|
||||
{ _itIdentity = Generic
|
||||
, _itCurseStatus = Uncursed
|
||||
{ _itCurseStatus = Uncursed
|
||||
, _itCombineType = NOTDEFINED
|
||||
, _itName = "genericEquipment"
|
||||
, _itFloorPict = \_ -> (,) emptySH $ setLayer 0 $ onLayer FlItLayer $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
|
||||
-- ,_itIdentity = Generic
|
||||
, _itFloorPict = \_ -> noShape $ setLayer 0 $ onLayer FlItLayer $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
|
||||
, _itEquipPict = \_ _ -> (,) emptySH blank
|
||||
, _itEffect = NoItEffect
|
||||
, _itID = Nothing
|
||||
@@ -147,21 +148,26 @@ defaultEquipment = Equipment
|
||||
defaultItZoom :: ItZoom
|
||||
defaultItZoom = ItZoom 20 0.2 1
|
||||
defaultConsumable :: Item
|
||||
defaultConsumable = Consumable
|
||||
{ _itIdentity = Generic
|
||||
defaultConsumable = Item
|
||||
{ _itUse = NoUse
|
||||
-- , _itIdentity = Generic
|
||||
, _itInvSize = 1
|
||||
, _itCurseStatus = Uncursed
|
||||
, _itName = "genericConsumable"
|
||||
, _itMaxStack = 9
|
||||
, _itAmount = 1
|
||||
, _cnEffect = \_ _ -> Nothing
|
||||
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ color blue $ circleSolid 3
|
||||
, _itEquipPict = \_ _ -> (,) emptySH blank
|
||||
, _itConsumption = ItemItselfConsumable {_itMaxStack' = 9, _itAmount' = 1}
|
||||
, _itFloorPict = \_ -> noShape $ onLayer FlItLayer $ color blue $ circleSolid 3
|
||||
, _itEquipPict = \_ _ -> mempty
|
||||
, _itID = Nothing
|
||||
, _itInvColor = blue
|
||||
, _itInvDisplay = \it -> [_itName it ++ " x" ++ show (_itAmount it)]
|
||||
, _itInvDisplay = \it -> [_itName it ++ " x" ++ show (_itAmount' $ _itConsumption it)]
|
||||
, _itEffect = NoItEffect
|
||||
, _itScroll = \_ _ -> id
|
||||
, _itAttachment = NoItAttachment
|
||||
, _itCombineType = NoCombineType
|
||||
, _itTargeting = Nothing
|
||||
, _itParams = NoParams
|
||||
, _itDimension = defaultItemDimension
|
||||
, _itTweaks = NoTweaks
|
||||
}
|
||||
defaultApplyDamage :: [DamageType] -> Creature -> (World -> World, Creature)
|
||||
defaultApplyDamage ds cr = (id, doPoisonDam $ foldl' (flip $ \d c -> snd $ applyIndividualDamage d c) cr ds')
|
||||
@@ -193,24 +199,7 @@ applyIndividualDamage (PushDam amount pback) cr
|
||||
applyIndividualDamage dt cr
|
||||
= ( id , over crHP (\hp -> hp - _dmAmount dt) cr )
|
||||
defaultFlIt :: FloorItem
|
||||
defaultFlIt = FlIt {_flItRot=0,_flIt = defaultIt, _flItPos = V2 0 0, _flItID = 0}
|
||||
defaultIt :: Item
|
||||
defaultIt = Consumable
|
||||
{ _itIdentity = Medkit25
|
||||
, _itInvSize = 1
|
||||
, _itDimension = defaultItemDimension
|
||||
, _itCurseStatus = Uncursed
|
||||
, _itName = "defaultIt"
|
||||
, _itMaxStack = 3
|
||||
, _itAmount = 2
|
||||
, _cnEffect = const return
|
||||
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ square 3
|
||||
, _itEquipPict = \_ _ -> (,) emptySH blank
|
||||
, _itID = Nothing
|
||||
, _itInvDisplay = (:[]) . _itName
|
||||
, _itInvColor = blue
|
||||
, _itEffect = NoItEffect
|
||||
}
|
||||
defaultFlIt = FlIt {_flItRot=0,_flIt = defaultConsumable, _flItPos = V2 0 0, _flItID = 0}
|
||||
defaultMachine :: Machine
|
||||
defaultMachine = Machine
|
||||
{ _mcID = 0
|
||||
|
||||
Reference in New Issue
Block a user