This commit is contained in:
2022-12-28 01:12:10 +00:00
parent c71af99ff7
commit 2d4a55dee0
8 changed files with 35 additions and 21 deletions
+1 -2
View File
@@ -502,10 +502,9 @@ crAtMuzPos f it cr = f it (cr & crPos +.+.~ (aimingMuzzlePos cr it *.* unitVecto
- rotation amount given by inaccuracy in itParams
-}
applyInaccuracy :: ChainEffect
applyInaccuracy f it cr w = f it (cr & crDir +~ a) $ set randGen g w
applyInaccuracy f it = withRandomDirI acc f it
where
acc = _brlInaccuracy . _gunBarrels $ _itParams it
(a, g) = randomR (- acc, acc) $ _randGen w
-- | Applies the effect to a randomly rotated creature.
withRandomDirI ::