Start moving bullet ammo parameters to more sensible places
This commit is contained in:
@@ -339,7 +339,7 @@ useMod hm = case hm of
|
||||
, ammoCheckI
|
||||
]
|
||||
BangConeMod ->
|
||||
[ withRandomItemParams coneRandItemParams
|
||||
[ withRandomItem coneRandItemParams
|
||||
, withRandomItemUpdate coneRandItemUpdate
|
||||
, withRandomOffset
|
||||
, duplicateLoadedBarrels
|
||||
@@ -497,15 +497,13 @@ coneRandItemUpdate = do
|
||||
wth <- state $ randomR (1, 5)
|
||||
return (itUse . heldConsumption . laAmmoType . amBullet . buWidth .~ wth)
|
||||
|
||||
coneRandItemParams :: State StdGen (ItemParams -> ItemParams)
|
||||
coneRandItemParams :: State StdGen (Item -> Item)
|
||||
coneRandItemParams = do
|
||||
muzv <- state $ randomR (0.5, 1)
|
||||
rifl <- state $ randomR (0.3, 0.9)
|
||||
return $ \itparams ->
|
||||
itparams
|
||||
{ _muzVel = muzv
|
||||
, _rifling = rifl
|
||||
}
|
||||
return $ \it ->
|
||||
it & itUse . heldParams . muzVel .~ muzv
|
||||
& itUse . heldParams . rifling .~ rifl
|
||||
|
||||
mcShootLaser :: Item -> Machine -> World -> World
|
||||
mcShootLaser it mc = cWorld . lWorld . lasers .:~ lasRayAt (_lasColor $ _itParams it) dam phasev pos dir
|
||||
|
||||
Reference in New Issue
Block a user