Extend trigger type to apply to full item location

This commit is contained in:
2025-07-03 23:08:28 +01:00
parent 978823c87c
commit d8e811c050
7 changed files with 131 additions and 124 deletions
+3 -3
View File
@@ -9,7 +9,6 @@ import Dodge.Item.Grammar
import Dodge.Creature.Impulse.UseItem
import Dodge.BlBl
import Dodge.HeldUse
import Dodge.Data.DoubleTree
import Data.Foldable
import qualified Data.Map.Strict as M
import Data.Maybe
@@ -45,8 +44,9 @@ doWdWd we = case we of
UseInvItem invid pt -> \w -> fromMaybe w (useItem invid pt w)
WdWdBurstFireRepetition cid invid -> \w -> fromMaybe w $ do
cr <- w ^? cWorld . lWorld . creatures . ix cid
itree <- allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
return $ heldEffectMuzzles itree cr w
--itree <- allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
loc <- allInvLocs (cr ^. crInv) ^? ix invid . _2
return $ heldEffectMuzzles loc cr w
accessTerminal :: Maybe Int -> World -> World
accessTerminal mtmid w = fromMaybe w $ do