10 lines
263 B
Haskell
10 lines
263 B
Haskell
module Dodge.Cuse where
|
|
|
|
import Control.Lens
|
|
import Dodge.Data.World
|
|
|
|
useC :: Cuse -> Item -> Creature -> World -> World
|
|
useC cu = case cu of
|
|
CDoNothing -> const $ const id
|
|
CHeal x -> const $ \cr -> cWorld . lWorld . creatures . ix (_crID cr) . crHP +~ x
|