This commit is contained in:
2024-12-20 18:06:54 +00:00
parent 1e23c9bd1e
commit 92b190aba8
14 changed files with 177 additions and 524 deletions
+55 -7
View File
@@ -1,9 +1,20 @@
module Dodge.Item.Held.Utility where
module Dodge.Item.Held.Utility (
rewinder,
timeStopper,
timeScroller,
unsafeBlinker,
blinker,
keyCard,
torch,
detector,
flatShield,
) where
import Linear
import Dodge.Default.Item
import Control.Lens
import Dodge.Data.Item
import Dodge.Default.Item
import Linear
--import Geometry.Data
flatShield :: Item
@@ -19,9 +30,6 @@ flatShield =
keyCard :: Int -> Item
keyCard n = defaultHeldItem & itType .~ HELD (KEYCARD n)
latchkey :: Int -> Item
latchkey _ = defaultHeldItem
torch :: Item
torch =
defaultHeldItem
@@ -29,7 +37,7 @@ torch =
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10
& itAmmoSlots .~ singleAmmo ElectricalAmmo
{- | Sends out pulses that display walls. -}
-- | Sends out pulses that display walls.
detector :: Detector -> Item
detector dt =
defaultHeldItem
@@ -42,3 +50,43 @@ detector dt =
& itType .~ HELD (DETECTOR dt)
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleDetector
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100
blinker :: Item
blinker =
defaultHeldItem
& itUseCondition .~ UseableAnytime
& itUse . heldDelay . rateMax .~ 20
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
& itAmmoSlots .~ singleAmmo ElectricalAmmo
& itUse . heldParams .~ DefaultHeldParams
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleBlink
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 10000000
& itType .~ HELD BLINKER
unsafeBlinker :: Item
unsafeBlinker =
blinker
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleUnsafeBlink
& itType .~ HELD BLINKERUNSAFE
-- & itUse . uequipEffect . eeViewDist ?~ 400
rewinder :: Item
rewinder =
blinker
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleRewind
& itType .~ HELD REWINDER
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100000
timeStopper :: Item
timeStopper =
blinker
& itType .~ HELD TIMESTOPPER
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleStopper
timeScroller :: Item
timeScroller =
timeStopper
& itType .~ HELD TIMESCROLLER
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleScroller