Continue refactor of bullet gun effect chain
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
module Dodge.Item.Held.Cane (
|
||||
volleyGun,
|
||||
multiGun,
|
||||
rifle,
|
||||
autoRifle,
|
||||
burstRifle,
|
||||
@@ -15,14 +14,15 @@ import qualified Data.IntMap.Strict as IM
|
||||
--import Dodge.Reloading.Action
|
||||
import Geometry.Data
|
||||
import LensHelp
|
||||
import Control.Applicative
|
||||
|
||||
defaultBangCane :: Item
|
||||
defaultBangCane =
|
||||
defaultBulletWeapon
|
||||
& itUse . heldParams
|
||||
.~ BulletShooterParams
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 0.9
|
||||
{ _muzVel = ConstFloat 0.8
|
||||
, _rifling = ConstFloat 0.9
|
||||
, _recoil = 50
|
||||
, _torqueAfter = 0.1
|
||||
, _randomOffset = 0
|
||||
@@ -45,25 +45,16 @@ volleyGun i =
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itUse . heldAim . aimMuzzles .~
|
||||
take i ([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..] <*> repeat PistolFlare)
|
||||
& itUse . heldAim . aimMuzzles .~ getZipList
|
||||
(ZipList [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 6]
|
||||
<*> ZipList [0..i-1]
|
||||
<*> pure PistolFlare
|
||||
)
|
||||
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||
& itUse . heldParams . recoil .~ 10 + 5 * fromIntegral i
|
||||
& itType . iyBase .~ HELD (VOLLEYGUN i)
|
||||
& itUse . heldAmmoTypes .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
||||
|
||||
multiGun :: Int -> Item
|
||||
multiGun i =
|
||||
defaultBangCane
|
||||
& itUse . heldMods .~ MultiGunMod
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itUse . heldAim . aimMuzzles .~
|
||||
([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..] <*> repeat DefaultFlareType)
|
||||
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||
& itType . iyBase .~ HELD (MULTIGUN i)
|
||||
|
||||
rifle :: Item
|
||||
rifle =
|
||||
defaultBangCane
|
||||
|
||||
@@ -14,12 +14,12 @@ bangCone =
|
||||
& itDimension . dimRad .~ 8
|
||||
& itDimension . dimCenter .~ V3 5 0 0
|
||||
& itUse . heldDelay . rateMax .~ 20
|
||||
& itUse . heldMods .~ BangConeMod
|
||||
& itUse . heldMods .~ PistolMod
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5 0 DefaultFlareType]
|
||||
& itUse . heldAim . aimMuzzles .~ replicate 15 (Muzzle (V2 15 0) 0 0.5 0 DefaultFlareType)
|
||||
& itUse . heldParams .~ BulletShooterParams
|
||||
{ _muzVel = 0.7
|
||||
, _rifling = 0.8
|
||||
{ _muzVel = UniRandFloat 0.5 0.8
|
||||
, _rifling = UniRandFloat 0.3 0.9
|
||||
, _recoil = 150
|
||||
, _torqueAfter = 0.1
|
||||
, _randomOffset = 12
|
||||
|
||||
@@ -20,8 +20,8 @@ bangRod =
|
||||
defaultBulletWeapon
|
||||
& itUse . heldParams
|
||||
.~ BulletShooterParams
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 1
|
||||
{ _muzVel = ConstFloat 0.8
|
||||
, _rifling = ConstFloat 1
|
||||
, _recoil = 50
|
||||
, _torqueAfter = 0.3
|
||||
, _randomOffset = 0
|
||||
|
||||
@@ -19,8 +19,8 @@ bangStick i =
|
||||
defaultBulletWeapon
|
||||
& itUse . heldParams
|
||||
.~ BulletShooterParams
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 0.8
|
||||
{ _muzVel = ConstFloat 0.8
|
||||
, _rifling = ConstFloat 0.8
|
||||
, _recoil = 25
|
||||
, _torqueAfter = 0.18 + 0.02 * fromIntegral i
|
||||
, _randomOffset = 0
|
||||
@@ -49,8 +49,8 @@ pistol =
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy %~ const 0.05
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType %~ const PistolFlare
|
||||
& itUse . heldParams
|
||||
%~ ( (muzVel .~ 0.8)
|
||||
. (rifling .~ 0.8)
|
||||
%~ ( (muzVel .~ ConstFloat 0.8)
|
||||
. (rifling .~ ConstFloat 0.8)
|
||||
. (recoil .~ 10)
|
||||
. (torqueAfter .~ 0.2)
|
||||
. (sidePush .~ 50)
|
||||
|
||||
Reference in New Issue
Block a user