Add ItEffect data as parameter to the effect itself

This commit is contained in:
2021-05-24 21:37:42 +02:00
parent 38682049c4
commit a7d4d8911d
12 changed files with 109 additions and 59 deletions
+3 -2
View File
@@ -119,9 +119,10 @@ movementSideEff cr w
invSideEff :: Creature -> World -> World
invSideEff cr w = weaponReloadSounds cr $ IM.foldrWithKey f w (_crInv cr)
where
f i it w' = case it ^? itEffect . itInvEffect of
f i it w' = case it ^? itEffect of
Nothing -> w'
Just g -> g cr i w'
Just NoItEffect -> w'
Just g -> dbArg _itInvEffect g cr i w'
weaponReloadSounds :: Creature -> World -> World
weaponReloadSounds cr w = case _crInv cr IM.!? _crInvSel cr of