Refactor basic explosion

This commit is contained in:
2021-03-23 14:50:23 +01:00
parent 885fa4a67e
commit b13467053a
6 changed files with 32 additions and 61 deletions
-2
View File
@@ -34,7 +34,6 @@ bulHitCr' bt p cr w =
crKnockBack cid = (/) 1 $ (+) 2 $ _crMass $ _creatures w IM.! cid
hasArmour cr = any (\it -> it ^? itIdentity == Just FrontArmour) $ _crInv cr
cid = _crID cr
sID = newParticleKey w
(d1,g) = randomR (-0.7,0.7) $ _randGen w
(colID,_) = randomR (0,11) $ _randGen w
hitEffect = addDamage
@@ -208,7 +207,6 @@ hvBulHitWall' bt p x w = damageBlocks x
= case wall ^? blHP of
Just hp -> foldr (\j -> over (walls . ix j . blHP) (\y -> y - 20)) w (_blIDs wall)
_ -> w
sID = newParticleKey w
cs = take 10 $ randomRs (0,11) $ _randGen w
ds = randomRs (-0.7,0.7) $ _randGen w
ts = randomRs (4,8) $ _randGen w