Move function fields outside equipment

This commit is contained in:
2022-07-20 20:40:13 +01:00
parent e9f0130013
commit 845c1f282e
14 changed files with 87 additions and 29 deletions
+9
View File
@@ -0,0 +1,9 @@
module Dodge.Cuse where
import Dodge.Data
import Control.Lens
useC :: Cuse -> Item -> Creature -> World -> World
useC cu = case cu of
CDoNothing -> const $ const id
CHeal x -> const $ \cr -> creatures . ix (_crID cr) . crHP +~ x