Move bullet bouncing into separate datatype field

This commit is contained in:
2022-07-17 20:23:50 +01:00
parent b860de70a7
commit 6c6fe43bc0
9 changed files with 98 additions and 67 deletions
+5 -6
View File
@@ -1,7 +1,6 @@
module Dodge.Combine.Module where
import Dodge.Data
import Dodge.Tesla
import Dodge.Particle.HitEffect.ExpireAndDamage
import Dodge.WorldEvent.SpawnParticle
import Dodge.Particle.Damage
import Dodge.Item.Weapon.ExtraEffect
@@ -20,10 +19,10 @@ moduleModification imt = case imt of
DRUMMAG -> itConsumption . laMax .~ 45
BELTMAG -> itConsumption . laMax .~ 150
MAGNETMAG -> itUse . useDelay . rateMax .~ 4
INCENDBUL -> f $ expireAndDamage' $ spawnAtBulDams incBall
BOUNCEBUL -> f $ expireAndDamage' bounceBulDams
STATICBUL -> f $ expireAndDamage' $ spawnAtBulDams aStaticBall
CONCUSBUL -> f $ expireAndDamage' $ spawnAtBulDams concBall
INCENDBUL -> f $ spawnAtBulDams incBall
BOUNCEBUL -> itConsumption . laAmmoType . amBulEffect .~ BounceBullet
STATICBUL -> f $ spawnAtBulDams aStaticBall
CONCUSBUL -> f $ spawnAtBulDams concBall
TARGCR -> itTargeting .~ targetRBCreature
TARGLAS -> itTargeting .~ targetLaser
TARGPOS -> itTargeting .~ targetRBPress
@@ -40,7 +39,7 @@ moduleModification imt = case imt of
EXTRABATTERY -> itConsumption . laMax +~ 1000
ATTACHTORCH -> id
where
f ameff = itConsumption . laAmmoType . amBulEff .~ ameff
f ameff = itConsumption . laAmmoType . amBulDams .~ ameff
makeDirectedTele it = it
& itTargeting .~ targetRBPress
& itUse . useMods .:~ withPosDirWallCheck directedTelPos