Define shape datatype

This commit is contained in:
2021-09-14 01:17:07 +01:00
parent 29f048cfdd
commit 294e01479a
18 changed files with 226 additions and 111 deletions
+3 -8
View File
@@ -137,10 +137,10 @@ bulConCr' bt p cr w
ep = sp +.+ _btVel' bt
mkwave = over worldEvents $ (.) (makeShockwaveAt [] p 15 4 1 white)
{- | Hitting wall effects: create a spark, damage blocks. -}
bulHitWall' :: Particle -> Point2 -> Wall -> World -> World
bulHitWall' bt p wl w = damageBlocksBy 5 wl
bulHitWall :: Particle -> Point2 -> Wall -> World -> World
bulHitWall bt p wl w = damageBlocksBy 5 wl
. smokeCloudAt dustcol 20 200 1 (addZ 20 pOut)
$ createSparkCol 8 theCol pOut (reflectDir wl)
. createSparkCol 8 theCol pOut (reflectDir wl)
$ set randGen g
w
where
@@ -212,8 +212,3 @@ hvBulHitWall' bt p x w = damageBlocksBy 5 x $ set randGen g $ foldr ($) w (spar
bulHitFF' :: Particle -> Point2 -> ForceField -> World -> World
bulHitFF' _ _ _ = id
{- | Typical effect: destroy on impact, damage creatures and blocks, create spark on walls. -}
basicBulletEffect :: HitEffect
basicBulletEffect = destroyOnImpact bulHitCr bulHitWall' bulHitFF'