Cleanup
This commit is contained in:
+22
-24
@@ -4,7 +4,6 @@ import Dodge.Tesla
|
||||
import Dodge.Particle.HitEffect.ExpireAndDamage
|
||||
import Dodge.WorldEvent.SpawnParticle
|
||||
import Dodge.Particle.Damage
|
||||
import Dodge.IncBall
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Item.Weapon.Launcher
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
@@ -16,38 +15,37 @@ import Dodge.Base.Coordinate
|
||||
|
||||
import Data.Maybe
|
||||
|
||||
fromModuleType :: ItemModuleType -> ItemModule
|
||||
fromModuleType imt = case imt of
|
||||
EMPTYMODULE -> ItemModule ["EMPTYMODULE"] 1 id
|
||||
DRUMMAG -> mod "+DRUM MAG" (itConsumption . laMax .~ 45)
|
||||
BELTMAG -> mod "+BELT FEED" (itConsumption . laMax .~ 150)
|
||||
MAGNETMAG -> mod "+MAGNET FEED" (itUse . useDelay . rateMax .~ 4)
|
||||
INCENDBUL -> mod "+INCENDIARY" (f $ expireAndDamage $ spawnAtBulDams incBall)
|
||||
BOUNCEBUL -> mod "+BOUNCE" (f $ expireAndDamage bounceBulDams)
|
||||
STATICBUL -> mod "+STATIC" (f $ expireAndDamage $ spawnAtBulDams aStaticBall)
|
||||
CONCUSBUL -> mod "+CONCUSS" (f $ expireAndDamage $ spawnAtBulDams concBall)
|
||||
TARGCR -> mod "+CREATURETARGETING" (itTargeting .~ targetRBCreature)
|
||||
TARGLAS -> mod "+LASERTARGETING" (itTargeting .~ targetLaser)
|
||||
TARGPOS -> mod "+POSTIONALTARGETING" (itTargeting .~ targetRBPress)
|
||||
MAGNETTRAJ -> mod "+MAGNETTRAJECTORY"
|
||||
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)
|
||||
. (itConsumption . laType . amBulVel .~ V2 10 0)
|
||||
)
|
||||
FLECHETRAJ -> mod "+FLECHETTETRAJECTORY"
|
||||
FLECHETRAJ ->
|
||||
(itConsumption . laType . amBulTraj .~ FlechetteTrajectory)
|
||||
BEZIERTRAJ -> mod "+BEZIERTRAJECTORY"
|
||||
BEZIERTRAJ ->
|
||||
(itConsumption . laType . amBulTraj .~ BezierTrajectory)
|
||||
INCENDLAS -> mod "+INCENDIARY" (itParams . lasBeam .~ BeamCombine flameBeamCombine)
|
||||
SPLITLAS -> mod "+SPLIT" (itParams . lasBeam .~ BeamCombine splitBeamCombine)
|
||||
STATICLAS -> mod "+STATIC"
|
||||
INCENDLAS -> (itParams . lasBeam .~ BeamCombine flameBeamCombine)
|
||||
SPLITLAS -> (itParams . lasBeam .~ BeamCombine splitBeamCombine)
|
||||
STATICLAS ->
|
||||
( (itParams . lasBeam .~ BeamCombine teslaBeamCombine)
|
||||
. (itParams . subParams ?~ teslaParams)
|
||||
)
|
||||
WEPTELE -> mod "+DIRECTEDTELE" makeDirectedTele
|
||||
LAUNCHHOME -> mod "+TARGET HOMING" (itConsumption . laType . amPjCreation .~ fireTrackingShell)
|
||||
EXTRABATTERY -> mod "+BATTERY" (itConsumption . laMax +~ 1000)
|
||||
WEPTELE -> makeDirectedTele
|
||||
LAUNCHHOME -> (itConsumption . laType . amPjCreation .~ fireTrackingShell)
|
||||
EXTRABATTERY -> (itConsumption . laMax +~ 1000)
|
||||
where
|
||||
mod str func = ItemModule [str] 1 func
|
||||
f ameff = itConsumption . laType . amBulEff .~ ameff
|
||||
makeDirectedTele it = it
|
||||
& itTargeting .~ targetRBPress
|
||||
|
||||
Reference in New Issue
Block a user