This commit is contained in:
2022-07-19 14:26:10 +01:00
parent 0a7922ec5e
commit 8ee4d2e0f2
6 changed files with 68 additions and 78 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ import Geometry
import LensHelp
import Color
import qualified Data.IntMap.Strict as IM
import Control.Monad.State
import System.Random
@@ -35,7 +36,7 @@ sparkDam
-> World
sparkDam sk sp ep mayEiCrWl = case mayEiCrWl of
(hitp,Left cr) -> creatures . ix (_crID cr) . crState . csDamage .:~ thedam hitp
(hitp,Right wl) -> wallDamages . ix (_wlID wl) .:~ thedam hitp
(hitp,Right wl) -> wallDamages %~ IM.insertWith (++) (_wlID wl) [thedam hitp]
where
thedam hitp = Damage (_skDamageType sk) 1 sp hitp ep NoDamageEffect