Reloading slows movement
This commit is contained in:
@@ -8,6 +8,10 @@ module Dodge.Item.Weapon.BulletGuns
|
||||
, bangStick
|
||||
, bangRod
|
||||
, bangCane
|
||||
, bangCaneX
|
||||
, rifle
|
||||
, autoRifle
|
||||
, assaultRifle
|
||||
, autoGun
|
||||
, multGun
|
||||
, miniGun
|
||||
@@ -42,10 +46,11 @@ import Geometry
|
||||
import ShapePicture
|
||||
import Shape
|
||||
import Sound.Data
|
||||
import LensHelp
|
||||
|
||||
import Data.Maybe
|
||||
import qualified Data.Sequence as Seq
|
||||
import Control.Lens
|
||||
--import Control.Lens
|
||||
import Control.Monad.State
|
||||
import System.Random
|
||||
|
||||
@@ -143,26 +148,109 @@ bangStick i = defaultGun
|
||||
, _gunBarrels = MultiBarrel
|
||||
{_brlNum = i
|
||||
,_brlSpread = SpreadBarrels 0.2
|
||||
,_brlInaccuracy = 0
|
||||
}
|
||||
}
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
, _itInvSize = fromIntegral i / 3
|
||||
}
|
||||
bangCane,bangRod :: Item
|
||||
bangCane :: Item
|
||||
bangCane = defaultGun
|
||||
{ _itParams = BulletShooter
|
||||
{ _itName = "BANGCANE"
|
||||
, _itCombineType = BANGCANE
|
||||
,_itParams = BulletShooter
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 0.9
|
||||
, _bore = 2
|
||||
, _gunBarrels = SingleBarrel 0.05
|
||||
, _gunBarrels = SingleBarrel 0.1
|
||||
}
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoMax = 1
|
||||
, _reloadTime = 20
|
||||
, _reloadType = ActivePartial 1
|
||||
}
|
||||
, _itUse = useAmmoParamsRate 6 upHammer
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, torqueAfterI 0.1
|
||||
, applyInaccuracy
|
||||
, withMuzFlareI
|
||||
, withRecoilI 50
|
||||
]
|
||||
, _itFloorPict = autoGunPic
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
} & itUse . useAim . aimSpeed .~ 0.4
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
bangCaneX :: Int -> Item
|
||||
bangCaneX i = bangCane
|
||||
{ _itName = "BANGCANEx"++show i
|
||||
, _itCombineType = BANGCANEX i
|
||||
, _itUse = useAmmoParamsRate 6 upHammer
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
, withSoundItemChoiceStart bangStickSoundChoice
|
||||
, useAmmoAmount 1
|
||||
, torqueAfterI 0.2
|
||||
, duplicateLoadedBarrels
|
||||
, applyInaccuracy
|
||||
, withMuzFlareI
|
||||
, withRecoilI 50
|
||||
]
|
||||
} & itUse . useAim . aimSpeed .~ 0.4
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
& itConsumption . ammoMax .~ i
|
||||
& itParams . gunBarrels .~ MultiBarrel
|
||||
{_brlSpread = AlignedBarrels
|
||||
,_brlNum = i
|
||||
,_brlInaccuracy = 0.1
|
||||
}
|
||||
|
||||
rifle :: Item
|
||||
rifle = bangCane
|
||||
& itName .~ "RIFLE"
|
||||
& itCombineType .~ RIFLE
|
||||
& itConsumption . ammoMax .~ 15
|
||||
& itConsumption . reloadType .~ ActiveClear
|
||||
& itConsumption . reloadTime .~ 80
|
||||
|
||||
autoRifle :: Item
|
||||
autoRifle = rifle
|
||||
& itName .~ "AUTORIFLE"
|
||||
& itCombineType .~ AUTORIFLE
|
||||
& itUse . useMods %~ ((ammoCheckI :) . tail)
|
||||
-- & itUse . useDelay . rateMax .~ 6
|
||||
assaultRifle :: Item
|
||||
assaultRifle = rifle
|
||||
& itName .~ "ASSAULTRIFLE"
|
||||
& itCombineType .~ ASSAULTRIFLE
|
||||
& itUse . useDelay . rateMax .~ 18
|
||||
& itUse . useMods .~
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
, torqueAfterI 0.2
|
||||
, lockInvFor 10
|
||||
, \f it -> repeatOnFrames (take (_ammoLoaded (_itConsumption it) - 1) [3,6]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, applyInaccuracy
|
||||
, withMuzFlareI
|
||||
, withRecoilI 50
|
||||
]
|
||||
|
||||
|
||||
|
||||
bangRod :: Item
|
||||
bangRod = bangCane
|
||||
{ _itParams = BulletShooter
|
||||
{ _itName = "BANGROD"
|
||||
, _itCombineType = BANGROD
|
||||
, _itParams = BulletShooter
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 1
|
||||
, _bore = 2
|
||||
@@ -187,10 +275,11 @@ revolverX i = revolver
|
||||
, \f it -> repeatOnFrames (take (_ammoLoaded (_itConsumption it) - 1) [2,4,6,8,10]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoUpTo 1
|
||||
-- , applyInaccuracy
|
||||
, applyInaccuracy
|
||||
, withMuzFlareI
|
||||
-- , spreadLoaded
|
||||
, withRecoilI 25
|
||||
, torqueAfterI 0.2
|
||||
, withRecoilI 10
|
||||
]
|
||||
} & itConsumption . ammoMax .~ i * 6
|
||||
bangCone :: Item
|
||||
@@ -257,6 +346,7 @@ blunderbuss = bangCone
|
||||
, withRandomItemParams coneRandItemParams
|
||||
]
|
||||
& useAim . aimStance .~ TwoHandTwist
|
||||
& useAim . aimSpeed .~ 0.4
|
||||
}
|
||||
|
||||
grapeShotCannon :: Item
|
||||
@@ -282,7 +372,6 @@ grapeShotCannon = blunderbuss
|
||||
& itConsumption . ammoMax .~ 15
|
||||
& itConsumption . reloadTime .~ 30
|
||||
|
||||
|
||||
grenadeLauncher :: Int -> Item
|
||||
grenadeLauncher _ = bangCone
|
||||
|
||||
@@ -415,11 +504,13 @@ hvAutoGunPic it =
|
||||
where
|
||||
am = _ammoLoaded $ _itConsumption it
|
||||
autoPistol :: Item
|
||||
autoPistol = pistol & itUse . useMods .~ (ammoCheckI : pistolAfterHamMods)
|
||||
autoPistol = pistol
|
||||
& itUse . useMods .~ (ammoCheckI : pistolAfterHamMods)
|
||||
& itName .~ "AUTOPISTOL"
|
||||
& itCombineType .~ AUTOPISTOL
|
||||
machinePistol :: Item
|
||||
machinePistol = autoPistol & itUse . useDelay . rateMax .~ 2
|
||||
machinePistol = autoPistol
|
||||
& itUse . useDelay . rateMax .~ 2
|
||||
& itUse . useMods .~ (ammoCheckI : machinePistolAfterHamMods)
|
||||
& itName .~ "MACHINEPISTOL"
|
||||
& itCombineType .~ MACHINEPISTOL
|
||||
@@ -428,6 +519,7 @@ smg = autoPistol -- & some parameter affecting stability
|
||||
& itUse . useMods .~ (ammoCheckI : smgAfterHamMods)
|
||||
& itName .~ "SMG"
|
||||
& itCombineType .~ SMG
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
ltAutoGun :: Item
|
||||
ltAutoGun = defaultAutoGun
|
||||
{ _itName = "AUTO-LT"
|
||||
@@ -522,7 +614,9 @@ miniGun = defaultAutoGun
|
||||
, _bore = 2
|
||||
, _gunBarrels = MultiBarrel
|
||||
{_brlSpread = RotatingBarrels 0.01
|
||||
,_brlNum = 4}
|
||||
,_brlNum = 4
|
||||
,_brlInaccuracy = 0
|
||||
}
|
||||
}
|
||||
, _itEquipPict = pictureWeaponAim miniGunPictItem
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
@@ -602,6 +696,7 @@ spreadGun = defaultGun
|
||||
, _gunBarrels = MultiBarrel
|
||||
{_brlNum = 5
|
||||
,_brlSpread = SpreadBarrels 0.5
|
||||
,_brlInaccuracy = 0
|
||||
}
|
||||
}
|
||||
, _itFloorPict = spreadGunPic
|
||||
@@ -648,6 +743,7 @@ multGun = defaultGun
|
||||
, _gunBarrels = MultiBarrel
|
||||
{_brlNum = 5
|
||||
,_brlSpread = AlignedBarrels
|
||||
,_brlInaccuracy = 0
|
||||
}
|
||||
}
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
|
||||
Reference in New Issue
Block a user