Add various capabilities for generating graphs, fixes to lasgun
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
module Dodge.Item.Weapon.BulletGun.Cane
|
||||
( bangCane
|
||||
, bangCaneX
|
||||
( volleyGun
|
||||
, repeater
|
||||
, rifle
|
||||
, autoRifle
|
||||
, burstRifle
|
||||
, completeBurstRifle
|
||||
, fastBurstRifle
|
||||
-- , completeBurstRifle
|
||||
-- , fastBurstRifle
|
||||
, miniGunX
|
||||
) where
|
||||
--import Dodge.Particle.Bullet.HitEffect
|
||||
@@ -31,14 +30,8 @@ import Shape
|
||||
import Sound.Data
|
||||
import LensHelp
|
||||
|
||||
--import qualified Data.Map.Strict as M
|
||||
--import qualified Data.Sequence as Seq
|
||||
--import Control.Lens
|
||||
--import Control.Monad.State
|
||||
--import System.Random
|
||||
|
||||
bangCane :: Item
|
||||
bangCane = defaultBulletWeapon
|
||||
defaultBangCane :: Item
|
||||
defaultBangCane = defaultBulletWeapon
|
||||
{ _itParams = BulletShooter
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 0.9
|
||||
@@ -72,11 +65,11 @@ bangCane = defaultBulletWeapon
|
||||
<> makeSingleClipAt (V3 5 0 3) it
|
||||
}
|
||||
} & itUse . useAim . aimStance .~ OneHand
|
||||
& itType . iyBase .~ BANGCANE
|
||||
& itType . iyBase .~ error "undefined bangCane baseitemtype"
|
||||
& itConsumption . laMax .~ 1
|
||||
& itConsumption . laCycle .~ [loadPartialInsert 10 1]
|
||||
bangCaneX :: Int -> Item
|
||||
bangCaneX i = defaultBulletWeapon
|
||||
volleyGun :: Int -> Item
|
||||
volleyGun i = defaultBulletWeapon
|
||||
& itUse .~ ruseAmmoParamsRate 6 upHammer
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
@@ -123,7 +116,7 @@ bangCaneX i = defaultBulletWeapon
|
||||
,_brlInaccuracy = 0.1
|
||||
}
|
||||
& itParams . torqueAfter .~ 0.48 + 0.2 * fromIntegral i
|
||||
& itType . iyBase .~ BANGCANEX i
|
||||
& itType . iyBase .~ VOLLEYGUN i
|
||||
caneStickSoundChoice :: Item -> SoundID
|
||||
caneStickSoundChoice it
|
||||
| _laLoaded (_itConsumption it) < 2 = tap3S
|
||||
@@ -136,7 +129,7 @@ caneClipX i it = case it ^? itConsumption . laLoaded of
|
||||
[0..la-1]
|
||||
_ -> mempty
|
||||
rifle :: Item
|
||||
rifle = bangCane
|
||||
rifle = defaultBangCane
|
||||
{ _itDimension = ItemDimension
|
||||
{ _dimRad = 8
|
||||
, _dimCenter = V3 5 0 0
|
||||
@@ -195,41 +188,41 @@ burstRifle = repeater
|
||||
, withMuzFlareI
|
||||
, withRecoil
|
||||
]
|
||||
fastBurstRifle :: Item
|
||||
fastBurstRifle = repeater
|
||||
& itType . iyBase .~ FASTBURSTRIFLE
|
||||
& itParams . gunBarrels . brlInaccuracy .~ 0.06
|
||||
& itUse . useDelay . rateMax .~ 18
|
||||
& itUse . useMods .~
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
, sideEffectOnFrame 9 (torqueSideEffect 0.4)
|
||||
, lockInvFor 9
|
||||
, \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [2,4,6,8]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, applyInaccuracy
|
||||
, withMuzFlareI
|
||||
, withRecoil
|
||||
]
|
||||
completeBurstRifle :: Item
|
||||
completeBurstRifle = repeater
|
||||
& itType . iyBase .~ COMPLETEBURSTRIFLE
|
||||
& itType . iyModules . at ModRifleMag .~ Nothing
|
||||
& itParams . gunBarrels . brlInaccuracy .~ 0.1
|
||||
& itUse . useDelay . rateMax .~ 28
|
||||
& itUse . useMods .~
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
, sideEffectOnFrame 15 (torqueSideEffect 0.8)
|
||||
, lockInvFor 15
|
||||
, \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [1..14]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, applyInaccuracy
|
||||
, withMuzFlareI
|
||||
, withRecoil
|
||||
]
|
||||
--fastBurstRifle :: Item
|
||||
--fastBurstRifle = repeater
|
||||
-- & itType . iyBase .~ FASTBURSTRIFLE
|
||||
-- & itParams . gunBarrels . brlInaccuracy .~ 0.06
|
||||
-- & itUse . useDelay . rateMax .~ 18
|
||||
-- & itUse . useMods .~
|
||||
-- [ ammoHammerCheck
|
||||
-- , useTimeCheck
|
||||
-- , sideEffectOnFrame 9 (torqueSideEffect 0.4)
|
||||
-- , lockInvFor 9
|
||||
-- , \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [2,4,6,8]) f it
|
||||
-- , withSoundStart tap3S
|
||||
-- , useAmmoAmount 1
|
||||
-- , applyInaccuracy
|
||||
-- , withMuzFlareI
|
||||
-- , withRecoil
|
||||
-- ]
|
||||
--completeBurstRifle :: Item
|
||||
--completeBurstRifle = repeater
|
||||
-- & itType . iyBase .~ COMPLETEBURSTRIFLE
|
||||
-- & itType . iyModules . at ModRifleMag .~ Nothing
|
||||
-- & itParams . gunBarrels . brlInaccuracy .~ 0.1
|
||||
-- & itUse . useDelay . rateMax .~ 28
|
||||
-- & itUse . useMods .~
|
||||
-- [ ammoHammerCheck
|
||||
-- , useTimeCheck
|
||||
-- , sideEffectOnFrame 15 (torqueSideEffect 0.8)
|
||||
-- , lockInvFor 15
|
||||
-- , \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [1..14]) f it
|
||||
-- , withSoundStart tap3S
|
||||
-- , useAmmoAmount 1
|
||||
-- , applyInaccuracy
|
||||
-- , withMuzFlareI
|
||||
-- , withRecoil
|
||||
-- ]
|
||||
miniGunUse :: Int -> ItemUse
|
||||
miniGunUse i = ruseInstant (useAmmoParams $ Just 1) NoHammer $
|
||||
[ ammoCheckI
|
||||
|
||||
Reference in New Issue
Block a user