Develop laser upgrade path slightly
This commit is contained in:
@@ -67,6 +67,7 @@ itemCombinations =
|
|||||||
, po [FLAMETHROWER,PUMP] flameTorrent
|
, po [FLAMETHROWER,PUMP] flameTorrent
|
||||||
|
|
||||||
, p [o PRISM,o TRANSFORMER,o PIPE] lasGun
|
, p [o PRISM,o TRANSFORMER,o PIPE] lasGun
|
||||||
|
, p [o LASGUN,o TRANSFORMER,o PRISM] (lasGunWide 2)
|
||||||
|
|
||||||
, p [o TRANSFORMER,p 2 CAN] sparkGun
|
, p [o TRANSFORMER,p 2 CAN] sparkGun
|
||||||
, p [o SPARKGUN,p 2 PIPE] teslaGun
|
, p [o SPARKGUN,p 2 PIPE] teslaGun
|
||||||
@@ -79,6 +80,8 @@ itemCombinations =
|
|||||||
|
|
||||||
, p [p 2 PLATE] flatShield
|
, p [p 2 PLATE] flatShield
|
||||||
]
|
]
|
||||||
|
++ map (\i -> po [LASGUNWIDE i,TRANSFORMER,PRISM] $ lasGunWide (i+1)) [1..9]
|
||||||
|
++ map (\i -> po [LASGUNWIDE i,HARDWARE] $ lasGunFocus (i)) [1..10]
|
||||||
++ map (\i -> po [PIPE,BANGSTICK i] $ bangStick (i+1)) [1..8]
|
++ map (\i -> po [PIPE,BANGSTICK i] $ bangStick (i+1)) [1..8]
|
||||||
++ map (\i -> po [REVOLVERX i,CAN] $ revolverX (i+1)) [1..5]
|
++ map (\i -> po [REVOLVERX i,CAN] $ revolverX (i+1)) [1..5]
|
||||||
++ map (\i -> p [o (BANGCANEX i),p 2 PIPE] $ bangCaneX (i+1)) [1..5]
|
++ map (\i -> p [o (BANGCANEX i),p 2 PIPE] $ bangCaneX (i+1)) [1..5]
|
||||||
@@ -147,6 +150,11 @@ moduleCombinations =
|
|||||||
(itConsumption . aoType . amPjCreation .~ fireTrackingShell)
|
(itConsumption . aoType . amPjCreation .~ fireTrackingShell)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
, ( ModBattery
|
||||||
|
, batteryGuns
|
||||||
|
, [amod [BATTERY] "+BATTERY" (itConsumption . ammoBaseMax +~ 1000)
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
makeDirectedTele it = it
|
makeDirectedTele it = it
|
||||||
@@ -167,6 +175,16 @@ moduleCombinations =
|
|||||||
homingLaunchers :: [Item]
|
homingLaunchers :: [Item]
|
||||||
homingLaunchers = launcher : [launcherX i | i <- [2..10]]
|
homingLaunchers = launcher : [launcherX i | i <- [2..10]]
|
||||||
|
|
||||||
|
batteryGuns :: [Item]
|
||||||
|
batteryGuns =
|
||||||
|
[ teslaGun
|
||||||
|
, sparkGun
|
||||||
|
, lasGun
|
||||||
|
] ++
|
||||||
|
[ lasGunWide i | i <- [1..10]
|
||||||
|
] ++
|
||||||
|
[ lasGunFocus i | i <- [1..10]]
|
||||||
|
|
||||||
bulletWeapons :: [Item]
|
bulletWeapons :: [Item]
|
||||||
bulletWeapons = [bangStick i | i <- [1..9] ]
|
bulletWeapons = [bangStick i | i <- [1..9] ]
|
||||||
++ [bangCaneX i | i <- [1..6] ]
|
++ [bangCaneX i | i <- [1..6] ]
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ data CombineType
|
|||||||
| SPARKGUN
|
| SPARKGUN
|
||||||
| TESLAGUN
|
| TESLAGUN
|
||||||
| LASGUN
|
| LASGUN
|
||||||
|
| LASGUNWIDE Int
|
||||||
|
| LASGUNFOCUS Int
|
||||||
| SONICGUN
|
| SONICGUN
|
||||||
| TRACTORGUN
|
| TRACTORGUN
|
||||||
| LAUNCHER
|
| LAUNCHER
|
||||||
|
|||||||
+10
-8
@@ -179,20 +179,22 @@ testInventory = IM.fromList $ zip [0..]
|
|||||||
, medkit 50 & itConsumption . itAmount .~ 3
|
, medkit 50 & itConsumption . itAmount .~ 3
|
||||||
-- , teleportModule
|
-- , teleportModule
|
||||||
, makeTypeCraftNum 1 LIGHTER
|
, makeTypeCraftNum 1 LIGHTER
|
||||||
, makeTypeCraftNum 15 TUBE
|
-- , makeTypeCraftNum 15 TUBE
|
||||||
|
, makeTypeCraftNum 9 TRANSFORMER
|
||||||
-- , makeTypeCraftNum 5 CREATURESENSOR
|
-- , makeTypeCraftNum 5 CREATURESENSOR
|
||||||
, makeTypeCraftNum 3 PRISM
|
, makeTypeCraftNum 9 PRISM
|
||||||
-- , makeTypeCraftNum 3 DRUM
|
-- , makeTypeCraftNum 3 DRUM
|
||||||
, makeTypeCraftNum 3 PUMP
|
-- , makeTypeCraftNum 3 PUMP
|
||||||
|
, makeTypeCraftNum 3 BATTERY
|
||||||
-- , makeTypeCraftNum 1 MAGNET
|
-- , makeTypeCraftNum 1 MAGNET
|
||||||
, makeTypeCraftNum 1 TRANSMITTER
|
-- , makeTypeCraftNum 1 TRANSMITTER
|
||||||
, makeTypeCraftNum 10 HARDWARE
|
, makeTypeCraftNum 10 HARDWARE
|
||||||
, makeTypeCraftNum 3 SPRING
|
, makeTypeCraftNum 3 SPRING
|
||||||
, makeTypeCraftNum 10 CAN
|
-- , makeTypeCraftNum 10 CAN
|
||||||
, makeTypeCraftNum 3 TIN
|
-- , makeTypeCraftNum 3 TIN
|
||||||
, makeTypeCraftNum 3 PLANK
|
, makeTypeCraftNum 3 PLANK
|
||||||
, makeTypeCraftNum 1 MOTOR
|
-- , makeTypeCraftNum 1 MOTOR
|
||||||
, makeTypeCraftNum 5 MICROCHIP
|
-- , makeTypeCraftNum 5 MICROCHIP
|
||||||
-- , makeTypeCraftNum 5 AIUNIT
|
-- , makeTypeCraftNum 5 AIUNIT
|
||||||
]
|
]
|
||||||
stackedInventory :: IM.IntMap Item
|
stackedInventory :: IM.IntMap Item
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ chaseCrit = defaultCreature
|
|||||||
, targetYouWhenCognizant
|
, targetYouWhenCognizant
|
||||||
, const (crMeleeCooldown %~ max 0 . subtract 1)
|
, const (crMeleeCooldown %~ max 0 . subtract 1)
|
||||||
]
|
]
|
||||||
, _crHP = 150
|
, _crHP = 1500
|
||||||
, _crPict = basicCrPict green
|
, _crPict = basicCrPict green
|
||||||
, _crInv = IM.fromList [(0,medkit 200)]
|
, _crInv = IM.fromList [(0,medkit 200)]
|
||||||
, _crMeleeCooldown = 0
|
, _crMeleeCooldown = 0
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ data AttentionDir
|
|||||||
data AwarenessLevel
|
data AwarenessLevel
|
||||||
= Suspicious Float
|
= Suspicious Float
|
||||||
| Cognizant Float
|
| Cognizant Float
|
||||||
|
deriving (Eq,Ord)
|
||||||
|
|
||||||
makeLenses ''AttentionDir
|
makeLenses ''AttentionDir
|
||||||
makeLenses ''PerceptionState
|
makeLenses ''PerceptionState
|
||||||
|
|||||||
@@ -79,16 +79,20 @@ creatureDisplayText cfig w cr
|
|||||||
. setDepth 50
|
. setDepth 50
|
||||||
. translate x y
|
. translate x y
|
||||||
. color white
|
. color white
|
||||||
. rotate a
|
. rotate (0.5 * pi)
|
||||||
|
-- . rotate (argV v - 0.5 * pi)
|
||||||
. scale theScale theScale
|
. scale theScale theScale
|
||||||
. text
|
. centerText
|
||||||
$ clockCycle 50 (V.fromList [crDisplayAwake, crDisplayAlert]) w cr
|
$ clockCycle 25 (V.fromList
|
||||||
|
[ crDisplayAwake
|
||||||
|
, crDisplayAlert
|
||||||
|
]
|
||||||
|
) w cr
|
||||||
where
|
where
|
||||||
campos = _cameraViewFrom w
|
campos = _cameraViewFrom w
|
||||||
theScale = 0.15 / _cameraZoom w
|
theScale = 0.15 / _cameraZoom w
|
||||||
cpos = _crPos cr
|
cpos = _crPos cr
|
||||||
v = cpos -.- campos
|
v = cpos -.- campos
|
||||||
a = argV v - 0.5 * pi
|
|
||||||
(V2 x y) = campos +.+ v +.+ _crRad cr *.* normalizeV v
|
(V2 x y) = campos +.+ v +.+ _crRad cr *.* normalizeV v
|
||||||
|
|
||||||
crDisplayAlert :: Creature -> String
|
crDisplayAlert :: Creature -> String
|
||||||
@@ -106,12 +110,13 @@ crDisplayAlert cr
|
|||||||
g _ = False
|
g _ = False
|
||||||
|
|
||||||
crDisplayAwake :: Creature -> String
|
crDisplayAwake :: Creature -> String
|
||||||
crDisplayAwake cr = case _crAwakeLevel (_crPerception cr) of
|
crDisplayAwake = show . _crAwakeLevel . _crPerception
|
||||||
Comatose -> "-"
|
--crDisplayAwake cr = case _crAwakeLevel (_crPerception cr) of
|
||||||
Asleep -> "Z"
|
-- Comatose -> "-"
|
||||||
Lethargic -> "L"
|
-- Asleep -> "Z"
|
||||||
Vigilant -> "V"
|
-- Lethargic -> "L"
|
||||||
Overstrung -> "O"
|
-- Vigilant -> "V"
|
||||||
|
-- Overstrung -> "O"
|
||||||
|
|
||||||
--damageMod :: Creature -> Picture -> Picture
|
--damageMod :: Creature -> Picture -> Picture
|
||||||
--damageMod cr pic = piercingMod $ bluntScale pic
|
--damageMod cr pic = piercingMod $ bluntScale pic
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ data ModuleSlot
|
|||||||
| ModTarget
|
| ModTarget
|
||||||
| ModBulletTrajectory
|
| ModBulletTrajectory
|
||||||
| ModLauncherHoming
|
| ModLauncherHoming
|
||||||
|
| ModBattery
|
||||||
deriving (Eq,Ord)
|
deriving (Eq,Ord)
|
||||||
|
|
||||||
data ItemModule
|
data ItemModule
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
module Dodge.Item.Weapon.BatteryGuns
|
module Dodge.Item.Weapon.BatteryGuns
|
||||||
( lasGun
|
( lasGun
|
||||||
|
, lasGunWide
|
||||||
|
, lasGunFocus
|
||||||
, sparkGun
|
, sparkGun
|
||||||
, teslaGun
|
, teslaGun
|
||||||
, tractorGun
|
, tractorGun
|
||||||
@@ -34,14 +36,24 @@ import Data.List (sortOn)
|
|||||||
import System.Random
|
import System.Random
|
||||||
--import Data.Tuple
|
--import Data.Tuple
|
||||||
import qualified Data.IntMap.Strict as IM
|
import qualified Data.IntMap.Strict as IM
|
||||||
|
import qualified Data.Map.Strict as M
|
||||||
import Control.Monad.State
|
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 :: Item
|
||||||
sparkGun = teslaGun
|
sparkGun = teslaGun
|
||||||
& itName .~ "SPARKGUN"
|
& itName .~ "SPARKGUN"
|
||||||
& itType .~ SPARKGUN
|
& itType .~ SPARKGUN
|
||||||
& itParams . arcSize .~ 10
|
& itParams . arcSize .~ 10
|
||||||
teslaGun :: Item
|
teslaGun :: Item
|
||||||
teslaGun = defaultGun
|
teslaGun = defaultBatteryGun
|
||||||
{ _itName = "TESLA"
|
{ _itName = "TESLA"
|
||||||
, _itType = TESLAGUN
|
, _itType = TESLAGUN
|
||||||
, _itConsumption = defaultAmmo
|
, _itConsumption = defaultAmmo
|
||||||
@@ -81,8 +93,34 @@ teslaGunPic _ = noPic $ colorSH blue $
|
|||||||
where
|
where
|
||||||
xa = 1
|
xa = 1
|
||||||
xb = 9
|
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 :: Item
|
||||||
lasGun = defaultAutoGun
|
lasGun = defaultAutoBatteryGun
|
||||||
{ _itName = "LASGUN"
|
{ _itName = "LASGUN"
|
||||||
, _itType = LASGUN
|
, _itType = LASGUN
|
||||||
, _itConsumption = defaultAmmo
|
, _itConsumption = defaultAmmo
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ module Dodge.Item.Weapon.TriggerType
|
|||||||
, sideEffectOnFrame
|
, sideEffectOnFrame
|
||||||
, duplicateLoadedBarrels
|
, duplicateLoadedBarrels
|
||||||
, duplicateLoaded
|
, duplicateLoaded
|
||||||
|
, duplicateOffsets
|
||||||
|
, duplicateOffsetsFocus
|
||||||
, hammerCheckI
|
, hammerCheckI
|
||||||
, hammerCheckL
|
, hammerCheckL
|
||||||
, shootL
|
, shootL
|
||||||
@@ -60,6 +62,7 @@ import Dodge.RandomHelp
|
|||||||
import Dodge.Inventory.Lock
|
import Dodge.Inventory.Lock
|
||||||
--import Dodge.Creature.HandPos
|
--import Dodge.Creature.HandPos
|
||||||
--import Dodge.Default
|
--import Dodge.Default
|
||||||
|
import Dodge.Base
|
||||||
import Sound.Data
|
import Sound.Data
|
||||||
import Geometry
|
import Geometry
|
||||||
--import Geometry.Vector3D
|
--import Geometry.Vector3D
|
||||||
@@ -530,3 +533,19 @@ duplicateLoadedBarrels eff item cr w = foldr f w poss
|
|||||||
f pos = eff item (cr & crPos %~ (+.+ pos))
|
f pos = eff item (cr & crPos %~ (+.+ pos))
|
||||||
numBar = _brlNum . _gunBarrels $ _itParams item
|
numBar = _brlNum . _gunBarrels $ _itParams item
|
||||||
numBul = _ammoLoaded $ _itConsumption item
|
numBul = _ammoLoaded $ _itConsumption item
|
||||||
|
|
||||||
|
duplicateOffsetsFocus :: [Float] -> ChainEffect
|
||||||
|
duplicateOffsetsFocus xs eff item cr w = foldr f w poss
|
||||||
|
where
|
||||||
|
poss :: [V2 Float]
|
||||||
|
poss = map (rotateV (_crDir cr) . V2 0 ) xs
|
||||||
|
f pos = eff item $ cr
|
||||||
|
& crPos %~ (+.+ pos)
|
||||||
|
& crDir .~ argV (mouseWorldPos w -.- (_crPos cr +.+ pos))
|
||||||
|
|
||||||
|
duplicateOffsets :: [Float] -> ChainEffect
|
||||||
|
duplicateOffsets xs eff item cr w = foldr f w poss
|
||||||
|
where
|
||||||
|
poss :: [V2 Float]
|
||||||
|
poss = map (rotateV (_crDir cr) . V2 0 ) xs
|
||||||
|
f pos = eff item (cr & crPos %~ (+.+ pos))
|
||||||
|
|||||||
+1
-1
@@ -222,7 +222,7 @@ circle rad = thickArc 0 (2*pi) rad 1
|
|||||||
|
|
||||||
centerText :: String -> Picture
|
centerText :: String -> Picture
|
||||||
{-# INLINE centerText #-}
|
{-# INLINE centerText #-}
|
||||||
centerText s = translate (25 * (negate . fromIntegral $ length s)) 0 $ text s
|
centerText s = translate (50 * (negate . fromIntegral $ length s - 1)) 0 $ text s
|
||||||
|
|
||||||
text :: String -> Picture
|
text :: String -> Picture
|
||||||
{-# INLINE text #-}
|
{-# INLINE text #-}
|
||||||
|
|||||||
Reference in New Issue
Block a user