This commit is contained in:
2021-05-04 18:11:59 +02:00
parent 6d4c17fc07
commit f0e5095b5f
28 changed files with 477 additions and 584 deletions
+1 -1
View File
@@ -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