Move TriggerType out of item record
This commit is contained in:
@@ -8,6 +8,7 @@ module Dodge.HeldUse (
|
||||
mcUseHeld,
|
||||
) where
|
||||
|
||||
import Dodge.BaseTriggerType
|
||||
import Sound.Data
|
||||
import Color
|
||||
import Control.Applicative
|
||||
@@ -85,7 +86,8 @@ hammerCheck ::
|
||||
t2 ->
|
||||
t2
|
||||
hammerCheck f pt it cr
|
||||
| Just HammerTrigger <- it ^? ldtValue . itUse . heldTriggerType
|
||||
| t <- baseTriggerType (it ^. ldtValue)
|
||||
, t == HammerTrigger || t == AlwaysSingleTrigger
|
||||
, isNothing $ lookup MakeAutoLink (it ^. ldtRight)
|
||||
, pt /= InitialPress =
|
||||
id
|
||||
@@ -158,7 +160,7 @@ doWeaponRepetitions itm cr = case itm ^? ldtValue . itUse . heldParams . weaponR
|
||||
f x = (x, WdWdFromItCrixWdWd (upitm x) (_crID cr) ItCrWdItemHeldEffect)
|
||||
upitm x =
|
||||
itm & ldtValue . itUse . heldParams . weaponRepeat .~ []
|
||||
& ldtValue . itUse . heldTriggerType .~ AutoTrigger
|
||||
-- & ldtValue . itUse . heldTriggerType .~ AutoTrigger
|
||||
& ldtValue . itUse . heldFrame .~ x
|
||||
|
||||
applyCME :: Item -> Creature -> CumulativeMuzzleEffect -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user