Use NewIntMap InvInt for crInv

This commit is contained in:
2025-08-25 10:21:59 +01:00
parent 25e64d5378
commit 3f6f1b4019
38 changed files with 437 additions and 406 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ module Dodge.WorldEffect (
doTmWdWd,
) where
import NewInt
import Control.Monad
import Data.Foldable
import qualified Data.Map.Strict as M
@@ -46,7 +47,7 @@ doWdWd we = case we of
WdWdBurstFireRepetition cid invid -> \w -> fromMaybe w $ do
cr <- w ^? cWorld . lWorld . creatures . ix cid
--itree <- allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
loc <- invIndents (fmap (\k -> w ^?! cWorld . lWorld . items . ix k) $ cr ^. crInv) ^? ix invid . _2
loc <- invIndents (fmap (\k -> w ^?! cWorld . lWorld . items . ix k) $ cr ^. crInv) ^? ix (_unNInt invid) . _2
return $ heldEffectMuzzles loc cr w
accessTerminal :: Int -> World -> World