Tweak weapons
This commit is contained in:
@@ -32,10 +32,13 @@ autoGun = defaultAutoGun
|
||||
, _itUse = useAmmoParams
|
||||
, _itUseModifiers =
|
||||
[ ammoCheckI
|
||||
, charFiringStratI
|
||||
[('S', hammerCheckI)
|
||||
]
|
||||
, useTimeCheckI
|
||||
, charFiringStratI
|
||||
[('M', torqueBefore 0.05)
|
||||
,('S', hammerCheckI)
|
||||
[('M', torqueBefore 0.08)
|
||||
,('S', torqueBefore 0.05)
|
||||
]
|
||||
, withSoundI autoGunSound
|
||||
, useAmmo 1
|
||||
|
||||
@@ -31,6 +31,7 @@ module Dodge.Item.Weapon.TriggerType
|
||||
, shootL
|
||||
, useTimeCheckI
|
||||
, ammoCheckI
|
||||
, randSpreadDir
|
||||
)
|
||||
where
|
||||
import Dodge.Data
|
||||
@@ -282,6 +283,14 @@ withMuzFlareI f it cr w = tempLightForAt 3 pos2 -- . muzzleFlashAt pos2
|
||||
where
|
||||
--pos = _crPos cr +.+ _crRad cr *.* unitVectorAtAngle (_crDir cr)
|
||||
pos2 = _crPos cr +.+ (2 * _crRad cr) *.* unitVectorAtAngle (_crDir cr)
|
||||
{- | Applies the effect to a randomly rotated creature,
|
||||
- rotation amount given by wpSpread -}
|
||||
randSpreadDir :: ChainEffect
|
||||
randSpreadDir f it cr w = f it (cr & crDir +~ a) $ set randGen g w
|
||||
where
|
||||
acc = _wpSpread it
|
||||
(a, g) = randomR (-acc,acc) $ _randGen w
|
||||
|
||||
{- | Applies the effect to a randomly rotated creature. -}
|
||||
withRandomDirI
|
||||
:: Float -- ^ Max possible rotation
|
||||
|
||||
Reference in New Issue
Block a user