Refactor
This commit is contained in:
@@ -30,5 +30,5 @@ heal25 = heal 25
|
||||
heal :: Int -> Int -> World -> Maybe World
|
||||
heal hp n w | _crHP (_creatures w IM.! n) >= 10000 = Nothing
|
||||
| otherwise = Just $ soundOnce healSound
|
||||
$ over (creatures . ix n . crHP) ((\x-> min x 10000). (+ hp) ) w
|
||||
$ over (creatures . ix n . crHP) ((min 10000) . (+ hp) ) w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user