Improve tesla weapon path

This commit is contained in:
2022-03-23 09:48:32 +00:00
parent 7f174b7d18
commit 5a579951c8
10 changed files with 146 additions and 103 deletions
-8
View File
@@ -1,6 +1,5 @@
module Dodge.WorldEvent.HitEffect
( destroyOnImpact
, doFlameDam
, noEff
, penWalls
) where
@@ -61,12 +60,5 @@ penWalls crEff wlEff pt hitThings w = case hitThings of
-> first (wlEff pt p wl) $ penWalls crEff wlEff pt hs w
((p,Right wl):_) -> (wlEff pt p wl w, destroyAt p pt)
doFlameDam :: Int -> Particle -> Point2 -> Creature -> World -> World
doFlameDam amount pt p cr = creatures . ix (_crID cr) . crState . crDamage .:~
Damage Flaming amount sp p ep NoDamageEffect
where
sp = _ptPos pt
ep = sp +.+ _ptVel pt
noEff :: a -> b -> c -> d -> d
noEff _ _ _ = id