Develop laser upgrade path slightly

This commit is contained in:
2022-04-04 17:00:35 +01:00
parent 3698a738f3
commit 31d5bcd0bb
10 changed files with 108 additions and 22 deletions
+40 -2
View File
@@ -1,5 +1,7 @@
module Dodge.Item.Weapon.BatteryGuns
( lasGun
, lasGunWide
, lasGunFocus
, sparkGun
, teslaGun
, tractorGun
@@ -34,14 +36,24 @@ import Data.List (sortOn)
import System.Random
--import Data.Tuple
import qualified Data.IntMap.Strict as IM
import qualified Data.Map.Strict as M
import Control.Monad.State
defaultBatteryGun :: Item
defaultBatteryGun = defaultGun
& itModules .~ M.fromList [(ModBattery, DefaultModule)]
defaultAutoBatteryGun :: Item
defaultAutoBatteryGun = defaultAutoGun
& itModules .~ M.fromList [(ModBattery, DefaultModule)]
sparkGun :: Item
sparkGun = teslaGun
& itName .~ "SPARKGUN"
& itType .~ SPARKGUN
& itParams . arcSize .~ 10
teslaGun :: Item
teslaGun = defaultGun
teslaGun = defaultBatteryGun
{ _itName = "TESLA"
, _itType = TESLAGUN
, _itConsumption = defaultAmmo
@@ -81,8 +93,34 @@ teslaGunPic _ = noPic $ colorSH blue $
where
xa = 1
xb = 9
lasGunWide :: Int -> Item
lasGunWide n = lasGun
& itName .~ "PARALELLAS"++show n
& itType .~ LASGUNWIDE n
& itUse . useMods .~
[ ammoCheckI
, withTempLight 1 100 (V3 1 1 0)
, withSoundForI tone440sawtoothquietS 2
, duplicateOffsets xs
, useAmmoAmount 1
]
where
xs = [ 3 * (fromIntegral x - fromIntegral (n-1) /2) | x <- [0..n-1] ]
lasGunFocus :: Int -> Item
lasGunFocus n = lasGun
& itName .~ "FOCALAS"++show n
& itType .~ LASGUNFOCUS n
& itUse . useMods .~
[ ammoCheckI
, withTempLight 1 100 (V3 1 1 0)
, withSoundForI tone440sawtoothquietS 2
, duplicateOffsetsFocus xs
, useAmmoAmount 1
]
where
xs = [ 3 * (fromIntegral x - fromIntegral (n-1) /2) | x <- [0..n-1] ]
lasGun :: Item
lasGun = defaultAutoGun
lasGun = defaultAutoBatteryGun
{ _itName = "LASGUN"
, _itType = LASGUN
, _itConsumption = defaultAmmo