Fold aiming parameters into item use datatype

This commit is contained in:
2021-11-27 18:10:05 +00:00
parent 8639b2d428
commit 652af6b0a9
24 changed files with 135 additions and 155 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ crMvBy p' cr = advanceStepCounter (magV p) cr
= product $ map equipAimSpeed $ IM.elems $ _crInv cr
| otherwise = product $ map equipSpeed $ IM.elems $ _crInv cr
aimingFactor
| _posture (_crStance cr) == Aiming = fromMaybe 1 $ it ^? itAimingSpeed
| _posture (_crStance cr) == Aiming = fromMaybe 1 $ it ^? itUse . useAim . aimSpeed
| otherwise = 1
it = _crInv cr IM.! _crInvSel cr
@@ -40,7 +40,7 @@ crMvAbsolute p' cr = advanceStepCounter (magV p) cr
= product $ map equipAimSpeed $ IM.elems $ _crInv cr
| otherwise = product $ map equipSpeed $ IM.elems $ _crInv cr
aimingFactor
| _posture (_crStance cr) == Aiming = fromMaybe 1 $ it ^? itAimingSpeed
| _posture (_crStance cr) == Aiming = fromMaybe 1 $ it ^? itUse . useAim . aimSpeed
| otherwise = 1
it = _crInv cr IM.! _crInvSel cr