This commit is contained in:
2022-06-08 13:43:37 +01:00
parent 4a5a643d46
commit 51c32e06ad
8 changed files with 60 additions and 82 deletions
+18 -26
View File
@@ -9,7 +9,6 @@ import Dodge.Item.Weapon.Launcher
import Dodge.Item.Weapon.TriggerType
import LensHelp
import Geometry
--import Dodge.Item.Weapon.BatteryGuns
import Dodge.Beam
import Dodge.Base.Coordinate
@@ -18,33 +17,27 @@ import Data.Maybe
moduleModification :: ItemModuleType -> Item -> Item
moduleModification imt = case imt of
EMPTYMODULE -> id
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)
TARGCR -> (itTargeting .~ targetRBCreature)
TARGLAS -> (itTargeting .~ targetLaser)
TARGPOS -> (itTargeting .~ targetRBPress)
MAGNETTRAJ ->
( (itConsumption . laType . amBulTraj .~ MagnetTrajectory)
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
TARGCR -> itTargeting .~ targetRBCreature
TARGLAS -> itTargeting .~ targetLaser
TARGPOS -> itTargeting .~ targetRBPress
MAGNETTRAJ -> (itConsumption . laType . amBulTraj .~ MagnetTrajectory)
. (itConsumption . laType . amBulVel .~ V2 10 0)
)
FLECHETRAJ ->
(itConsumption . laType . amBulTraj .~ FlechetteTrajectory)
BEZIERTRAJ ->
(itConsumption . laType . amBulTraj .~ BezierTrajectory)
INCENDLAS -> (itParams . lasBeam .~ BeamCombine flameBeamCombine)
SPLITLAS -> (itParams . lasBeam .~ BeamCombine splitBeamCombine)
STATICLAS ->
( (itParams . lasBeam .~ BeamCombine teslaBeamCombine)
FLECHETRAJ -> itConsumption . laType . amBulTraj .~ FlechetteTrajectory
BEZIERTRAJ -> itConsumption . laType . amBulTraj .~ BezierTrajectory
INCENDLAS -> itParams . lasBeam .~ BeamCombine flameBeamCombine
SPLITLAS -> itParams . lasBeam .~ BeamCombine splitBeamCombine
STATICLAS -> (itParams . lasBeam .~ BeamCombine teslaBeamCombine)
. (itParams . subParams ?~ teslaParams)
)
WEPTELE -> makeDirectedTele
LAUNCHHOME -> (itConsumption . laType . amPjCreation .~ fireTrackingShell)
EXTRABATTERY -> (itConsumption . laMax +~ 1000)
LAUNCHHOME -> itConsumption . laType . amPjCreation .~ fireTrackingShell
EXTRABATTERY -> itConsumption . laMax +~ 1000
where
f ameff = itConsumption . laType . amBulEff .~ ameff
makeDirectedTele it = it
@@ -59,4 +52,3 @@ moduleModification imt = case imt of
where
p = fromMaybe (_crPos cr) $ it ^? itTargeting . tgPos . _Just
a = argV (mouseWorldPos w -.- p)
--amod cts str func = (cts,ItemModule [str] 1 func)