Continue work on burst fire
This commit is contained in:
@@ -7,6 +7,7 @@ module Dodge.HeldUse (
|
||||
gadgetEffect,
|
||||
heldEffectNoHammerCheck,
|
||||
mcUseHeld,
|
||||
heldEffectMuzzles,
|
||||
) where
|
||||
|
||||
import Color
|
||||
@@ -101,12 +102,12 @@ hammerCheck f pt it cr
|
||||
id
|
||||
| otherwise = f it cr
|
||||
where
|
||||
g x = (x, WdWdFromItCrixWdWd (upitm x) (_crID cr) ItCrWdItemHeldEffectNoHammer)
|
||||
upitm x =
|
||||
it -- & ldtValue . itUse . heldParams . weaponRepeat .~ []
|
||||
& ldtValue . itUse . heldFrame .~ x
|
||||
-- g x = (x, WdWdFromItCrixWdWd (upitm x) (_crID cr) ItCrWdItemHeldEffectNoHammer)
|
||||
-- upitm x =
|
||||
-- it -- & ldtValue . itUse . heldParams . weaponRepeat .~ []
|
||||
-- & ldtValue . itUse . heldFrame .~ x
|
||||
|
||||
--g x = (x, WdWdBurstFireRepeats (_crID cr) (it ^?! ldtValue . itLocation . ilInvID))
|
||||
g x = (x, WdWdBurstFireRepeats (_crID cr) (it ^?! ldtValue . itLocation . ilInvID))
|
||||
|
||||
-- | Applies a world effect after an item use cooldown check.
|
||||
useTimeCheck :: ChainEffect
|
||||
|
||||
@@ -46,10 +46,11 @@ doWdWd we = case we of
|
||||
. (cWorld . lWorld . worldEvents .:~ MakeTempLight x (t-1))
|
||||
UseInvItem invid pt -> \w -> fromMaybe w (useItem invid pt w)
|
||||
WdWdBurstFireRepeats cid invid -> \w -> fromMaybe w $ do
|
||||
-- undefined
|
||||
cr <- w ^? cWorld . lWorld . creatures . ix cid
|
||||
itree <- bimap _iatType (^. _1) <$>
|
||||
allInvLocs (cr ^. crInv) ^? ix invid . _2 . locLDT
|
||||
return $ heldEffectNoHammerCheck itree cr w
|
||||
return $ heldEffectMuzzles itree cr w
|
||||
|
||||
doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
||||
doItCrWdWd icww = case icww of
|
||||
|
||||
Reference in New Issue
Block a user