Allow for bullet drag
This commit is contained in:
@@ -3,21 +3,24 @@ import Dodge.Data
|
||||
import Dodge.Picture.Layer
|
||||
import Dodge.Default
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Inventory
|
||||
import Shape
|
||||
--import ShapePicture
|
||||
import Dodge.Item.Draw
|
||||
import Picture
|
||||
|
||||
import Data.Maybe
|
||||
import Control.Lens
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
|
||||
medkit :: Int -> Item
|
||||
medkit i = defaultConsumable
|
||||
{ _itIdentity = Medkit25
|
||||
, _itName = "MEDKIT" ++ show i
|
||||
, _itMaxStack = 9
|
||||
, _itAmount = 1
|
||||
, _cnEffect = heal i
|
||||
{ _itName = "MEDKIT" ++ show i
|
||||
, _itUse = LeftUse
|
||||
{_lUse = \cr invid w -> fromMaybe w (heal 25 (_crID cr) $ rmInvItem (_crID cr) invid w)
|
||||
,_useDelay = NoDelay
|
||||
,_useHammer = HasHammer HammerUp
|
||||
}
|
||||
, _itFloorPict = \_ -> (,) emptySH $ setLayer 0 . onLayer FlItLayer . color blue $ circleSolid 3
|
||||
, _itEquipPict = pictureItem $ (,) emptySH $ color blue $ circleSolid 3
|
||||
, _itID = Nothing
|
||||
@@ -31,4 +34,3 @@ heal hp n w | _crHP (_creatures w IM.! n) >= 10000 = Nothing
|
||||
& creatures . ix n . crHP %~ min 10000 . (+ hp)
|
||||
where
|
||||
cr = _creatures w IM.! n
|
||||
|
||||
|
||||
Reference in New Issue
Block a user