Cleanup, remove records, stop unecessary Aeson compile
This commit is contained in:
+4
-3
@@ -22,21 +22,22 @@ updateSpark w sk
|
||||
| otherwise = case thingHit sp ep w of
|
||||
Nothing -> (w, Just $ sk & skPos .~ ep & skVel .*.*~ 0.9 & skOldPos .~ sp)
|
||||
Just (hp, hthing) ->
|
||||
( sparkDam sk sp ep (hp, hthing) w
|
||||
--( sparkDam sk sp ep (hp, hthing) w
|
||||
( sparkDam' sk sp ep (hp, hthing) w
|
||||
, Just $ sk & skPos .~ hp & skOldPos .~ sp & skVel .~ 0
|
||||
)
|
||||
where
|
||||
sp = _skPos sk
|
||||
ep = sp +.+ _skVel sk
|
||||
|
||||
sparkDam ::
|
||||
sparkDam' ::
|
||||
Spark ->
|
||||
Point2 ->
|
||||
Point2 ->
|
||||
(Point2, Either Creature Wall) ->
|
||||
World ->
|
||||
World
|
||||
sparkDam sk sp ep mayEiCrWl = case mayEiCrWl of
|
||||
sparkDam' sk sp ep mayEiCrWl = case mayEiCrWl of
|
||||
(hitp, eicrwl) -> damageCrWl (thedam hitp) eicrwl
|
||||
where
|
||||
thedam hitp = Damage (_skDamageType sk) 1 sp hitp ep NoDamageEffect
|
||||
|
||||
Reference in New Issue
Block a user