Rethink weapon repetitions

This commit is contained in:
2025-06-04 21:03:25 +01:00
parent 9797f610aa
commit 62cac29a59
7 changed files with 166 additions and 187 deletions
+6
View File
@@ -5,6 +5,7 @@ module Dodge.WorldEffect (
lineOutputTerminal,
) where
import Dodge.Item.Grammar
import Dodge.Creature.Impulse.UseItem
import Dodge.BlBl
import Dodge.Data.Input
@@ -44,6 +45,11 @@ doWdWd we = case we of
MakeTempLight x t -> (cWorld . lWorld . lights .:~ x)
. (cWorld . lWorld . worldEvents .:~ MakeTempLight x (t-1))
UseInvItem invid pt -> \w -> fromMaybe w (useItem invid pt w)
WdWdBurstFireRepeats cid invid -> \w -> fromMaybe w $ do
cr <- w ^? cWorld . lWorld . creatures . ix cid
itree <- bimap _iatType (^. _1) <$>
allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
return $ heldEffectNoHammerCheck itree cr w
doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
doItCrWdWd icww = case icww of