118 lines
3.6 KiB
Haskell
118 lines
3.6 KiB
Haskell
module Dodge.Item.Weapon.BulletGun.Rod
|
|
( bangRod
|
|
, elephantGun
|
|
, amr
|
|
, autoAmr
|
|
, sniperRifle
|
|
, machineGun
|
|
) where
|
|
import Dodge.Data
|
|
import Dodge.Reloading.Action
|
|
import Dodge.Default.Weapon
|
|
import Dodge.Item.Weapon.Bullet
|
|
import Dodge.Default
|
|
import Dodge.Item.Weapon.ZoomScope
|
|
import Dodge.Item.Weapon.ExtraEffect
|
|
import Dodge.Item.Weapon.TriggerType
|
|
import Dodge.SoundLogic.LoadSound
|
|
import Geometry
|
|
import LensHelp
|
|
|
|
--import qualified Data.Sequence as Seq
|
|
--import Control.Lens
|
|
--import Control.Monad.State
|
|
--import System.Random
|
|
|
|
bangRod :: Item
|
|
bangRod = defaultBulletWeapon
|
|
& itParams .~ BulletShooter
|
|
{ _muzVel = 0.8
|
|
, _rifling = 1
|
|
, _bore = 2
|
|
, _gunBarrels = SingleBarrel 0.1
|
|
, _recoil = 50
|
|
, _torqueAfter = 0.3
|
|
, _randomOffset = 0
|
|
}
|
|
& itUse . useDelay . rateMax .~ 12
|
|
& itUse . useMods .~
|
|
[ ammoHammerCheck
|
|
, useTimeCheck
|
|
, withSoundStart bangEchoS
|
|
, useAmmoAmount 1
|
|
, withTorqueAfter
|
|
, applyInaccuracy
|
|
, withThickSmokeI
|
|
, withMuzFlareI
|
|
, withRecoil
|
|
]
|
|
& itDimension . dimRad .~ 12
|
|
& itDimension . dimCenter .~ V3 5 0 0
|
|
& itConsumption . laMax .~ 1
|
|
& itConsumption . laCycle .~ [loadEject 5, loadInsert 10 , loadPrime 5]
|
|
& itType . iyBase .~ HELD BANGROD
|
|
& itUse . useAim . aimWeight .~ 8
|
|
& itUse . useAim . aimRange .~ 1
|
|
& itUse . useAim . aimStance .~ OneHand
|
|
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
|
& itUse . useAim . aimHandlePos .~ 5
|
|
& itUse . useAim . aimMuzPos .~ 30
|
|
& itConsumption . laAmmoType .~ hvBullet
|
|
elephantGun :: Item
|
|
elephantGun = bangRod
|
|
& itType . iyBase .~ HELD ELEPHANTGUN
|
|
& itUse . useAim . aimStance .~ TwoHandTwist
|
|
& itParams . gunBarrels .~ SingleBarrel 0.05
|
|
& itUse . useMods .~
|
|
[ ammoHammerCheck
|
|
, useTimeCheck
|
|
, withSoundStart bangEchoS
|
|
, useAmmoAmount 1
|
|
, withTorqueAfter
|
|
, applyInaccuracy
|
|
, withThickSmokeI
|
|
, withMuzFlareI
|
|
, withRecoil
|
|
]
|
|
& itParams . recoil .~ 50
|
|
& itParams . torqueAfter .~ 0.1
|
|
amr :: Item
|
|
amr = elephantGun
|
|
& itType . iyBase .~ HELD AMR
|
|
& itConsumption . laMax .~ 15
|
|
|
|
autoAmr :: Item
|
|
autoAmr = amr
|
|
& itType . iyBase .~ HELD AUTOAMR
|
|
& itUse . useMods %~ ((ammoCheckI :) . tail)
|
|
|
|
sniperRifle :: Item
|
|
sniperRifle = elephantGun
|
|
& itType . iyBase .~ HELD SNIPERRIFLE
|
|
& itParams . gunBarrels .~ SingleBarrel 0
|
|
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomMax = 0.5, _itZoomMin = 0.5}
|
|
& itUse . heldScroll .~ zoomLongGun
|
|
& itScope .~ ZoomScope (V2 0 0) 0 1 0.5 False
|
|
& itTargeting .~ targetLaser
|
|
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1}
|
|
machineGun :: Item
|
|
machineGun = bangRod
|
|
& itType . iyBase .~ HELD MACHINEGUN
|
|
& itUse . useDelay . rateMax .~ 25
|
|
& itUse . useMods .~
|
|
[ ammoCheckI
|
|
, rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter
|
|
, withSoundStart bangEchoS
|
|
, withThinSmokeI
|
|
, withMuzFlareI
|
|
]
|
|
& itUse . useAim . aimWeight .~ 8
|
|
& itUse . useAim . aimRange .~ 1
|
|
& itUse . useAim . aimStance .~ TwoHandTwist
|
|
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
|
& itUse . useDelay .~ VariableRate {_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
|
|
& itConsumption . laMax .~ 100
|
|
& itConsumption . laCycle .~ [loadEject 10, loadInsert 40 , loadPrime 10]
|
|
& itInvSize .~ 3
|
|
& itParams. torqueAfter .~ 0.2 -- not sure if this is necessary?
|