Cleanup
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
module Dodge.Base.Arithmetic where
|
||||
import MaybeHelp
|
||||
|
||||
decreaseToZero :: Int -> Int
|
||||
decreaseToZero = max 0 . subtract 1
|
||||
|
||||
decreaseToNothing' :: (Num a, Ord a) => Maybe' a -> Maybe' a
|
||||
decreaseToNothing' ma = case ma of
|
||||
Just' x | x > 0 -> Just' (x - 1)
|
||||
_ -> Nothing'
|
||||
@@ -159,7 +159,7 @@ applyPastDamages cr w
|
||||
-- a map updating all inventory items
|
||||
updateInv :: Creature -> World -> World
|
||||
updateInv cr = cWorld . lWorld . creatures . ix (_crID cr) . crInv . each
|
||||
. itUse . heldDelay %~ useDelayUpdate
|
||||
. itUse . heldDelay . warmTime %~ (max 0 . subtract 1)
|
||||
|
||||
-- a loop going over all inventory items
|
||||
invSideEff :: Creature -> World -> World
|
||||
@@ -426,9 +426,6 @@ setRBCreatureTargeting cr w ituse
|
||||
cpos <- w ^? cWorld . lWorld . creatures . ix cid . crPos
|
||||
Just $ hasLOS cpos (_crPos cr) w
|
||||
|
||||
useDelayUpdate :: UseDelay -> UseDelay
|
||||
useDelayUpdate = ( warmTime %~ decreaseToZero)
|
||||
|
||||
--updateAutoRecharge :: Item -> Item
|
||||
--updateAutoRecharge it = case it ^? itUse . leftConsumption of
|
||||
-- Just (AutoRecharging l m t p)
|
||||
|
||||
Reference in New Issue
Block a user