Move targeting strings, broke targeting usage

This commit is contained in:
2023-05-20 00:02:50 +01:00
parent 2d3b76dfd4
commit 6053bb059b
4 changed files with 48 additions and 9 deletions
+4 -1
View File
@@ -3,6 +3,7 @@ module Dodge.Creature.State (
doDamage,
) where
import Dodge.Item.Display -- this should not really be imported... TODO move canAttachTargetingBelow
import Control.Applicative
import Data.Foldable
import Data.Maybe
@@ -275,7 +276,9 @@ crGetTargeting cr = do
i <- cr ^? crManipulation . manObject . inInventory . ispItem
itm <- cr ^? crInv . ix i
itm ^? itType . iyModules . ix ModTarget . imtTargetType
<|> cr ^? crInv . ix (i+1) . itUse . equipTargeting . _Just
<|> (guard (canAttachTargetingBelow itm)
>> cr ^? crInv . ix (i+1) . itUse . equipTargeting . _Just)
-- itm <- find hastargeting $ helditem ++ IM.elems (getCrEquipment cr)