Move towards unifying weapon barrels
This commit is contained in:
@@ -63,6 +63,7 @@ module Dodge.Item.Weapon.TriggerType (
|
||||
blCheck,
|
||||
) where
|
||||
|
||||
import Control.Applicative
|
||||
import qualified SDL
|
||||
import Data.Foldable
|
||||
import Data.Maybe
|
||||
@@ -497,7 +498,10 @@ crAtMuzPos f it cr = f it (cr & crPos +.+.~ (aimingMuzzlePos cr it *.* unitVecto
|
||||
applyInaccuracy :: ChainEffect
|
||||
applyInaccuracy f it = withRandomDirI acc f it
|
||||
where
|
||||
acc = _brlInaccuracy . _gunBarrels $ _itParams it
|
||||
acc = fromMaybe 0 $
|
||||
(it ^? itParams . gunBarrels . brlList . ix 0 . barlInaccuracy)
|
||||
<|>
|
||||
(it ^? itParams . gunBarrels . brlInaccuracy)
|
||||
|
||||
-- | Applies the effect to a randomly rotated creature.
|
||||
withRandomDirI ::
|
||||
|
||||
Reference in New Issue
Block a user