Continue reload refactor

This commit is contained in:
2022-06-21 14:07:17 +01:00
parent 14a7189b44
commit 53c8be0679
33 changed files with 106 additions and 115 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ module Dodge.Creature.Statistics
, getCrDexterity
) where
import Dodge.Data
import Dodge.Creature.Test
import qualified IntMapHelp as IM
import LensHelp
@@ -31,6 +32,6 @@ crCurrentEquipment cr = merge dropMissing dropMissing (zipWithMatched (\_ _ itm
strFromHeldItem :: Creature -> Int
strFromHeldItem cr
| _posture (_crStance cr) == Aiming || _posture (_crStance cr) == Reloading
= negate $ fromMaybe 0 $ cr ^? crInv . ix (_crInvSel cr) . itUse . useAim . aimWeight
| _posture (_crStance cr) == Aiming || crIsReloading cr
= negate $ fromMaybe 0 $ cr ^? crInv . ix (crSel cr) . itUse . useAim . aimWeight
| otherwise = 0