Correctly update root status of item in _ilIsRoot

This commit is contained in:
2024-11-05 18:25:30 +00:00
parent 38ab6a35da
commit 9b3518e4eb
16 changed files with 40 additions and 25 deletions
+2 -4
View File
@@ -86,12 +86,10 @@ crAwayFromPost cr = case find sentinelGoal . _apGoal $ _crActionPlan cr of
--crCanShoot cr = crIsAiming cr && crWeaponReady cr
crInAimStance :: AimStance -> Creature -> Bool
crInAimStance as cr =
crIsAiming cr
&& mitstance == Just as
crInAimStance as cr = crIsAiming cr && mitstance == Just as
where
mitstance = do
i <- cr ^? crManipulation . manObject . imRootItem
i <- cr ^? crManipulation . manObject . imRootSelectedItem
cr ^? crInv . ix i . itUse . heldAim . aimStance
oneH :: Creature -> Bool