Files
loop/src/Dodge/Item/Held/Cane.hs
T
2025-06-26 01:09:09 +01:00

62 lines
1.8 KiB
Haskell

module Dodge.Item.Held.Cane (
volleyGun,
alteRifle,
rifle,
autoRifle,
burstRifle,
miniGunX,
) where
import Dodge.Data.Item
import Dodge.Default
--import qualified Data.IntMap.Strict as IM
import LensHelp
volleyGun :: Int -> Item
volleyGun i =
defaultHeldItem
-- & itUse . heldMuzzles .~ getZipList
-- (ZipList [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 6]
-- <*> ZipList [0..i-1]
-- <*> pure MiniGunFlare
-- <*> pure MuzzleShootBullet
-- <*> pure (UseExactly 1)
-- <*> ZipList [0..i-1]
-- )
& itType .~ HELD (VOLLEYGUN i)
-- & itAmmoSlots .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
-- & itUse . heldUseEffect .~ RandomiseMuzzleFrames i
rifle :: Item
rifle = defaultHeldItem & itType .~ HELD RIFLE
-- & itUse . heldMuzzles . ix 0 . mzPos .~ V2 25 0
alteRifle :: Item
alteRifle = rifle
& itType .~ HELD ALTERIFLE
-- & itAmmoSlots .~ IM.fromList (zip [0..1] $ repeat BulletAmmo)
& itParams .~ AlteRifleSwitch 0
autoRifle :: Item
autoRifle =
rifle
& itType .~ HELD AUTORIFLE
burstRifle :: Item
burstRifle = rifle & itType .~ HELD BURSTRIFLE
miniGunX :: Int -> Item
miniGunX i =
autoRifle
-- & itUse . heldDelay .~ WarmUpNoDelay{
-- --_warmTime = 0,
-- _warmMax = 100, _warmSound = crankSlowS}
-- & itAmmoSlots .~ singleAmmo BeltBulletAmmo
-- & itUse . heldMuzzles
-- .~ replicate i
-- (Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1) 0)
& itType .~ HELD (MINIGUNX i)
-- & itEffect . ieInv .~ ItemReduceWarmTime
-- & itEffect . ieOnDrop .~ ItemSetWarmTime 0
& itParams .~ WarmTime 0 False