From c2e7fcc8978d8982646deca60cfde0dee8c204e7 Mon Sep 17 00:00:00 2001 From: justin Date: Thu, 7 Jul 2022 07:50:05 +0100 Subject: [PATCH] Commit before rethinking item positioning, broken item hammer --- src/Dodge/Combine/Combinations.hs | 2 +- src/Dodge/Combine/Data.hs | 4 +- src/Dodge/Data.hs | 3 +- src/Dodge/Default/Weapon.hs | 12 ++-- src/Dodge/Item.hs | 8 +-- src/Dodge/Item/Equipment.hs | 2 +- src/Dodge/Item/Location.hs | 1 + src/Dodge/Item/Weapon/AmmoParams.hs | 5 +- src/Dodge/Item/Weapon/BatteryGuns.hs | 90 ++++++++++++------------ src/Dodge/Item/Weapon/BulletGun/Cane.hs | 6 +- src/Dodge/Item/Weapon/BulletGun/Rod.hs | 4 +- src/Dodge/Item/Weapon/BulletGun/Stick.hs | 8 +-- src/Dodge/Item/Weapon/BulletGuns.hs | 4 +- src/Dodge/Item/Weapon/Drone.hs | 4 +- src/Dodge/Item/Weapon/Launcher.hs | 4 +- src/Dodge/Item/Weapon/Radar.hs | 2 +- src/Dodge/Item/Weapon/Shatter.hs | 4 +- src/Dodge/Item/Weapon/SonicGuns.hs | 2 +- src/Dodge/Item/Weapon/Spawn.hs | 3 +- src/Dodge/Item/Weapon/SprayGuns.hs | 2 +- src/Dodge/Item/Weapon/Utility.hs | 2 +- 21 files changed, 85 insertions(+), 87 deletions(-) diff --git a/src/Dodge/Combine/Combinations.hs b/src/Dodge/Combine/Combinations.hs index 6040f6518..c343ee137 100644 --- a/src/Dodge/Combine/Combinations.hs +++ b/src/Dodge/Combine/Combinations.hs @@ -179,7 +179,7 @@ batteryGuns = [ teslaGun , sparkGun , lasGun - , lasSway +-- , lasSway , lasSwing ] ++ [ lasGunWide i | i <- [2..10] diff --git a/src/Dodge/Combine/Data.hs b/src/Dodge/Combine/Data.hs index e702d79dc..ad8f80206 100644 --- a/src/Dodge/Combine/Data.hs +++ b/src/Dodge/Combine/Data.hs @@ -111,10 +111,10 @@ data ItemBaseType | LASPULSE | DUALBEAM | LASGUNSWING - | LASGUNSWAY + -- | LASGUNSWAY | LASGUNWIDEPULSE | LASGUNWIDE {_xNum :: Int} - | LASGUNFOCUS Int + -- | LASGUNFOCUS Int | SONICGUN | TRACTORGUN | LAUNCHER diff --git a/src/Dodge/Data.hs b/src/Dodge/Data.hs index 89cd259fd..f5e3eb558 100644 --- a/src/Dodge/Data.hs +++ b/src/Dodge/Data.hs @@ -467,12 +467,13 @@ data FloorItem = FlIt { _flIt :: Item , _flItPos :: Point2 , _flItRot :: Float, data ItemPos = InInv { _ipCrId :: Int , _ipInvId :: Int } | OnFloor { _ipFlID :: Int } + | VoidItm data ItemUse = RightUse { _rUse :: Item -> Creature -> World -> World , _useDelay :: UseDelay , _useMods :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] - , _useHammer :: HammerType + , _useHammer' :: HammerPosition , _useAim :: AimParams , _heldScroll :: Float -> Creature -> Item -> Item } diff --git a/src/Dodge/Default/Weapon.hs b/src/Dodge/Default/Weapon.hs index 650703f98..6257305b0 100644 --- a/src/Dodge/Default/Weapon.hs +++ b/src/Dodge/Default/Weapon.hs @@ -34,31 +34,29 @@ defaultChargeable = ChargeableAmmo 100 100 ruseRate :: Int -> (Item -> Creature -> World -> World) - -> HammerType -> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] -> ItemUse -ruseRate i f ht usemods = RightUse +ruseRate i f usemods = RightUse { _rUse = f , _useDelay = FixedRate { _rateMax = i , _rateTime = 0 } , _useMods = usemods - , _useHammer = ht + , _useHammer' = HammerUp , _useAim = defaultAimParams , _heldScroll = \_ _ -> id } ruseInstant :: (Item -> Creature -> World -> World) - -> HammerType -> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] -> ItemUse -ruseInstant f ht usemods = RightUse +ruseInstant f usemods = RightUse { _rUse = f , _useDelay = NoDelay , _useMods = usemods - , _useHammer = ht + , _useHammer' = HammerUp , _useAim = defaultAimParams , _heldScroll = \_ _ -> id } @@ -68,7 +66,7 @@ defaultrUse = RightUse { _rUse = \_ _ -> id , _useDelay = FixedRate {_rateMax = 8, _rateTime = 0} , _useMods = [] - , _useHammer = HasHammer HammerUp + , _useHammer' = HammerUp , _useAim = defaultAimParams , _heldScroll = \_ _ -> id } diff --git a/src/Dodge/Item.hs b/src/Dodge/Item.hs index 768fb12fd..77f1d86d5 100644 --- a/src/Dodge/Item.hs +++ b/src/Dodge/Item.hs @@ -62,10 +62,10 @@ itemFromBase ibt = case ibt of LASPULSE -> lasPulse DUALBEAM -> dualBeam LASGUNSWING -> lasSwing - LASGUNSWAY -> lasSway + --LASGUNSWAY -> lasSway LASGUNWIDEPULSE -> lasWidePulse LASGUNWIDE i -> lasGunWide i - LASGUNFOCUS i -> lasFocus i + --LASGUNFOCUS i -> lasFocus i SONICGUN -> sonicGun TRACTORGUN -> tractorGun LAUNCHER -> launcher @@ -203,10 +203,10 @@ baseToFamily ibt = case ibt of LASPULSE -> HeldFamily DUALBEAM -> HeldFamily LASGUNSWING -> HeldFamily - LASGUNSWAY -> HeldFamily +-- LASGUNSWAY -> HeldFamily LASGUNWIDEPULSE -> HeldFamily LASGUNWIDE _ -> HeldFamily - LASGUNFOCUS _ -> HeldFamily + --LASGUNFOCUS _ -> HeldFamily SONICGUN -> HeldFamily TRACTORGUN -> HeldFamily LAUNCHER -> HeldFamily diff --git a/src/Dodge/Item/Equipment.hs b/src/Dodge/Item/Equipment.hs index 17788ef54..9fecc3a19 100644 --- a/src/Dodge/Item/Equipment.hs +++ b/src/Dodge/Item/Equipment.hs @@ -129,7 +129,7 @@ flatShield = defaultEquipment { _rUse = \_ _ -> id , _useDelay = NoDelay , _useMods = [] - , _useHammer = NoHammer + , _useHammer' = HammerUp , _useAim = AimParams { _aimWeight = 5 , _aimRange = 0 diff --git a/src/Dodge/Item/Location.hs b/src/Dodge/Item/Location.hs index 9d30906cc..badfc16f5 100644 --- a/src/Dodge/Item/Location.hs +++ b/src/Dodge/Item/Location.hs @@ -34,3 +34,4 @@ pointToItem :: Applicative f => pointToItem (InInv cid invid) = creatures . ix cid . crInv . ix invid pointToItem (OnFloor flid) = floorItems . ix flid . flIt +--itToPointer :: Item -> diff --git a/src/Dodge/Item/Weapon/AmmoParams.hs b/src/Dodge/Item/Weapon/AmmoParams.hs index f9cd557fc..7ef3be49b 100644 --- a/src/Dodge/Item/Weapon/AmmoParams.hs +++ b/src/Dodge/Item/Weapon/AmmoParams.hs @@ -16,14 +16,13 @@ import Data.Maybe --import Control.Lens ruseAmmoParamsRate :: Int - -> HammerType -> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] -> ItemUse -ruseAmmoParamsRate rate ht usemods = RightUse +ruseAmmoParamsRate rate usemods = RightUse { _rUse = useAmmoParams Nothing , _useDelay = FixedRate {_rateMax = rate,_rateTime = 0} , _useMods = usemods - , _useHammer = ht + , _useHammer' = HammerUp , _useAim = defaultAimParams , _heldScroll = \_ _ -> id } diff --git a/src/Dodge/Item/Weapon/BatteryGuns.hs b/src/Dodge/Item/Weapon/BatteryGuns.hs index 1a8312a78..9610190fe 100644 --- a/src/Dodge/Item/Weapon/BatteryGuns.hs +++ b/src/Dodge/Item/Weapon/BatteryGuns.hs @@ -3,9 +3,9 @@ module Dodge.Item.Weapon.BatteryGuns , dualBeam , lasGunWide , lasWidePulse - , lasSway + --, lasSway , lasSwing - , lasFocus + --, lasFocus , lasPulse , sparkGun , teslaGun @@ -76,7 +76,7 @@ teslaGun = defaultBatteryGun { _itConsumption = defaultLoadable & laMax .~ 200 & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] - , _itUse = ruseInstant shootTeslaArc NoHammer + , _itUse = ruseInstant shootTeslaArc [ ammoCheckI , withTempLight 1 100 (V3 0 0 1) , withSoundForI elecCrackleS 1 @@ -127,7 +127,7 @@ lasGunWide n = lasGun & itType . iyBase .~ LASGUNWIDE n & itParams . lasColor .~ orange & itParams . lasDamage .~ 2 - & itUse .~ ( ruseInstant shootLaser NoHammer + & itUse .~ ( ruseInstant shootLaser [ ammoCheckI , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 @@ -147,7 +147,7 @@ lasWidePulse = lasGun & itType . iyBase .~ LASGUNWIDEPULSE & itParams . lasColor .~ orange & itParams . lasDamage .~ 2 - & itUse .~ ( ruseInstant shootLaser NoHammer + & itUse .~ ( ruseInstant shootLaser [ ammoCheckI , withItem $ \it -> withTempLight 1 (100 * frac it) (xyzV4 (_lasColor $ _itParams it)) , withItem $ \it -> withSoundForVol (frac it) tone440sawtoothquietS 2 @@ -169,43 +169,43 @@ lasWidePulse = lasGun xs it = [ 0.25 * (fromIntegral x - fromIntegral (n'-1) /2) | x <- [0..n'-1] ] where n' = (ceiling $ (150 :: Float) * frac it) :: Int -lasSway :: Item -lasSway = lasGun - & itType . iyBase .~ LASGUNSWAY - & itParams . lasColor .~ orange - & itParams . lasDamage .~ 11 - & itUse .~ ( ruseInstant shootLaser NoHammer - [ ammoCheckI - , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) - , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 - , withSoundForI tone440sawtoothquietS 2 - , useAmmoAmount 1 - , withItemUpdate itup $ \it -> duplicateOffsets (x it) - ] - & useAim . aimWeight .~ 6 - & useAim . aimRange .~ 1 - & useAim . aimStance .~ TwoHandTwist - ) - where - itup = itParams . lasCycle %~ (\i -> (i+1) `mod` 40) - x it = [ 15 * sin (pi * fromIntegral x' * 0.05) ] - where - x' = _lasCycle $ _itParams it -lasFocus :: Int -> Item -lasFocus n = lasGunWide n - & itType . iyBase .~ LASGUNFOCUS n - & itParams . lasColor .~ red - & itUse . useMods .~ - [ ammoCheckI - , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) - , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 - , withSoundForI tone440sawtoothquietS 2 - , useAmmoAmount 1 - , duplicateOffsetsFocus xs - ] - where - n' = 9 * n - xs = [ 0.25 * (fromIntegral x - fromIntegral (n'-1) /2) | x <- [0..n'-1] ] +--lasSway :: Item +--lasSway = lasGun +-- & itType . iyBase .~ LASGUNSWAY +-- & itParams . lasColor .~ orange +-- & itParams . lasDamage .~ 11 +-- & itUse .~ ( ruseInstant shootLaser +-- [ ammoCheckI +-- , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) +-- , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 +-- , withSoundForI tone440sawtoothquietS 2 +-- , useAmmoAmount 1 +-- , withItemUpdate itup $ \it -> duplicateOffsets (x it) +-- ] +-- & useAim . aimWeight .~ 6 +-- & useAim . aimRange .~ 1 +-- & useAim . aimStance .~ TwoHandTwist +-- ) +-- where +-- itup = itParams . lasCycle %~ (\i -> (i+1) `mod` 40) +-- x it = [ 15 * sin (pi * fromIntegral x' * 0.05) ] +-- where +-- x' = _lasCycle $ _itParams it +--lasFocus :: Int -> Item +--lasFocus n = lasGunWide n +-- & itType . iyBase .~ LASGUNFOCUS n +-- & itParams . lasColor .~ red +-- & itUse . useMods .~ +-- [ ammoCheckI +-- , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) +-- , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 +-- , withSoundForI tone440sawtoothquietS 2 +-- , useAmmoAmount 1 +-- , duplicateOffsetsFocus xs +-- ] +-- where +-- n' = 9 * n +-- xs = [ 0.25 * (fromIntegral x - fromIntegral (n'-1) /2) | x <- [0..n'-1] ] dualBeam :: Item dualBeam = lasGun @@ -222,7 +222,7 @@ dualBeam = lasGun , _subParams = Nothing , _dbGap = 20 } - & itUse .~ (ruseInstant shootDualLaser NoHammer + & itUse .~ (ruseInstant shootDualLaser [ ammoCheckI , withItem $ \it -> withMuzPosShift (V2 0 (thegap it)) $ flareCircleAt (_lasColor $ _itParams it) 0.8 , withItem $ \it -> withMuzPosShift (V2 0 (-thegap it)) $ flareCircleAt (_lasColor2 $ _itParams it) 0.8 @@ -259,7 +259,7 @@ lasGun = defaultAutoBatteryGun { _itConsumption = defaultLoadable & laMax .~ 200 & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] - , _itUse = ruseInstant shootLaser NoHammer + , _itUse = ruseInstant shootLaser [ ammoCheckI , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) , withSoundForI tone440sawtoothquietS 2 @@ -337,7 +337,7 @@ tractorGun = lasGun { _itConsumption = defaultLoadable & laMax .~ 10000 & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] - , _itUse = ruseInstant aTractorBeam NoHammer + , _itUse = ruseInstant aTractorBeam [ ammoCheckI ] & useAim . aimWeight .~ 6 diff --git a/src/Dodge/Item/Weapon/BulletGun/Cane.hs b/src/Dodge/Item/Weapon/BulletGun/Cane.hs index de65ea1e9..24c9444f5 100644 --- a/src/Dodge/Item/Weapon/BulletGun/Cane.hs +++ b/src/Dodge/Item/Weapon/BulletGun/Cane.hs @@ -43,7 +43,7 @@ defaultBangCane = defaultBulletWeapon , _torqueAfter = 0.1 , _randomOffset = 0 } - , _itUse = ruseAmmoParamsRate 6 upHammer + , _itUse = ruseAmmoParamsRate 6 [ ammoHammerCheck , useTimeCheck , withSoundStart tap3S @@ -70,7 +70,7 @@ defaultBangCane = defaultBulletWeapon & itConsumption . laCycle .~ [loadPartialInsert 10 1] volleyGun :: Int -> Item volleyGun i = defaultBulletWeapon - & itUse .~ ruseAmmoParamsRate 6 upHammer + & itUse .~ ruseAmmoParamsRate 6 [ ammoHammerCheck , useTimeCheck , withSoundItemChoiceStart caneStickSoundChoice @@ -224,7 +224,7 @@ burstRifle = repeater -- , withRecoil -- ] miniGunUse :: Int -> ItemUse -miniGunUse i = ruseInstant (useAmmoParams $ Just 1) NoHammer $ +miniGunUse i = ruseInstant (useAmmoParams $ Just 1) $ [ ammoCheckI , withWarmUp crankSlowS , withSoundForI mini1S 2 diff --git a/src/Dodge/Item/Weapon/BulletGun/Rod.hs b/src/Dodge/Item/Weapon/BulletGun/Rod.hs index b9544126d..23a77cf9d 100644 --- a/src/Dodge/Item/Weapon/BulletGun/Rod.hs +++ b/src/Dodge/Item/Weapon/BulletGun/Rod.hs @@ -48,7 +48,7 @@ bangRod = defaultBulletWeapon , _torqueAfter = 0.3 , _randomOffset = 0 } - , _itUse = ruseAmmoParamsRate 12 upHammer + , _itUse = ruseAmmoParamsRate 12 [ ammoHammerCheck , useTimeCheck , withSoundStart bangEchoS @@ -128,7 +128,7 @@ sniperRifle = elephantGun machineGun :: Item machineGun = bangRod & itType . iyBase .~ MACHINEGUN - & itUse .~ (ruseAmmoParamsRate 25 NoHammer + & itUse .~ (ruseAmmoParamsRate 25 [ ammoCheckI , rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter , withSoundStart bangEchoS diff --git a/src/Dodge/Item/Weapon/BulletGun/Stick.hs b/src/Dodge/Item/Weapon/BulletGun/Stick.hs index 0afd3dd16..d0478bab6 100644 --- a/src/Dodge/Item/Weapon/BulletGun/Stick.hs +++ b/src/Dodge/Item/Weapon/BulletGun/Stick.hs @@ -13,7 +13,7 @@ import Dodge.Data import Dodge.ChainEffect import Dodge.Default.Weapon --import Dodge.Item.Weapon.InventoryDisplay -import Dodge.Default +--import Dodge.Default --import Dodge.Item.Attachment --import Dodge.Item.Weapon.ExtraEffect --import Dodge.Item.Weapon.InventoryDisplay @@ -41,7 +41,7 @@ bangStickSoundChoice it bangStick :: Int -> Item bangStick i = defaultBulletWeapon - { _itUse = ruseAmmoParamsRate 8 upHammer + { _itUse = ruseAmmoParamsRate 8 [ ammoHammerCheck , useTimeCheck , withSoundItemChoiceStart bangStickSoundChoice @@ -159,7 +159,7 @@ pistol = bangStick 1 & itConsumption .~ ( defaultBulletLoadable & laMax .~ 15 & laCycle .~ [loadEject 5, loadInsert 5 , loadPrime 5] ) - & itUse .~ ruseAmmoParamsRate 6 upHammer (ammoHammerCheck : pistolAfterHamMods) + & itUse .~ ruseAmmoParamsRate 6 (ammoHammerCheck : pistolAfterHamMods) & itDimension . dimSPic .~ (\it -> noPic $ baseStickShape <> makeTinClipAt pi (V3 5 2 0) it) & itParams %~ ( ( muzVel .~ 0.8 ) @@ -193,7 +193,7 @@ smg = autoPistol -- & some parameter affecting stability <> makeTinClipAt 0 (V3 7 (-2) 0) it) revolverX :: Int -> Item revolverX i = revolver - { _itUse = ruseAmmoParamsRate 8 upHammer + { _itUse = ruseAmmoParamsRate 8 [ ammoHammerCheck , useTimeCheck -- rather than locking the inventory, a better solution may be to check diff --git a/src/Dodge/Item/Weapon/BulletGuns.hs b/src/Dodge/Item/Weapon/BulletGuns.hs index 3781caaa4..ddb413205 100644 --- a/src/Dodge/Item/Weapon/BulletGuns.hs +++ b/src/Dodge/Item/Weapon/BulletGuns.hs @@ -44,7 +44,7 @@ autoGun = defaultAutoGun , _laLoaded = 30 } & laCycle .~ [loadEject 30, loadInsert 30 , loadPrime 10] - , _itUse = ruseAmmoParamsRate 4 NoHammer + , _itUse = ruseAmmoParamsRate 4 [ ammoCheckI , charFiringStratI [('S', hammerCheckI) @@ -93,7 +93,7 @@ autoGunPic it = noPic $ bangCone :: Item bangCone = defaultBulletWeapon - { _itUse = ruseAmmoParamsRate 20 upHammer + { _itUse = ruseAmmoParamsRate 20 [ ammoCheckI , hammerCheckI , useTimeCheck diff --git a/src/Dodge/Item/Weapon/Drone.hs b/src/Dodge/Item/Weapon/Drone.hs index 5e1e7257d..544e34782 100644 --- a/src/Dodge/Item/Weapon/Drone.hs +++ b/src/Dodge/Item/Weapon/Drone.hs @@ -1,7 +1,7 @@ module Dodge.Item.Weapon.Drone where import Dodge.Data import Dodge.Default.Weapon -import Dodge.Default +--import Dodge.Default import Dodge.SoundLogic.LoadSound import Dodge.Item.Weapon.TriggerType import Geometry @@ -20,7 +20,7 @@ import Control.Lens droneLauncher :: Item droneLauncher = defaultWeapon - { _itUse = ruseRate 20 aDroneWithItemParams upHammer + { _itUse = ruseRate 20 aDroneWithItemParams [ ammoCheckI , useTimeCheck , withSoundStart tap4S diff --git a/src/Dodge/Item/Weapon/Launcher.hs b/src/Dodge/Item/Weapon/Launcher.hs index fd1a17562..3da4c73b9 100644 --- a/src/Dodge/Item/Weapon/Launcher.hs +++ b/src/Dodge/Item/Weapon/Launcher.hs @@ -6,7 +6,7 @@ module Dodge.Item.Weapon.Launcher ) where import Dodge.Data import Dodge.Reloading.Action -import Dodge.Default +--import Dodge.Default import Dodge.Default.Weapon import Dodge.Item.Location import Dodge.SoundLogic.LoadSound @@ -47,7 +47,7 @@ launcher = defaultWeapon & laMax .~ 1 & laLoaded .~ 1 & laCycle .~ [loadEject 30, loadInsert 30, loadPrime 10] - , _itUse = ruseRate 20 usePjCreation upHammer + , _itUse = ruseRate 20 usePjCreation [ hammerCheckI , ammoCheckI , useTimeCheck diff --git a/src/Dodge/Item/Weapon/Radar.hs b/src/Dodge/Item/Weapon/Radar.hs index 6e6d3ce6e..7f5498378 100644 --- a/src/Dodge/Item/Weapon/Radar.hs +++ b/src/Dodge/Item/Weapon/Radar.hs @@ -23,7 +23,7 @@ import Control.Lens Sends out pulses that display walls. -} clickDetector :: Detector -> Item clickDetector dt = defaultWeapon - { _itUse = ruseRate 20 (detectorEffect dt) upHammer + { _itUse = ruseRate 20 (detectorEffect dt) [ ammoUseCheck ] & useAim . aimRange .~ 1 diff --git a/src/Dodge/Item/Weapon/Shatter.hs b/src/Dodge/Item/Weapon/Shatter.hs index 6d424b74d..de698f145 100644 --- a/src/Dodge/Item/Weapon/Shatter.hs +++ b/src/Dodge/Item/Weapon/Shatter.hs @@ -10,7 +10,7 @@ import Dodge.Base.Collide import Dodge.Creature.HandPos --import Dodge.ChainEffect import Dodge.Default.Weapon -import Dodge.Default +--import Dodge.Default --import Dodge.Item.Attachment --import Dodge.Item.Weapon.ExtraEffect --import Dodge.Item.Weapon.InventoryDisplay @@ -29,7 +29,7 @@ import LensHelp shatterGun :: Item shatterGun = defaultWeapon & itType . iyBase .~ SHATTERGUN - & itUse .~ ruseRate 10 shootShatter upHammer + & itUse .~ ruseRate 10 shootShatter [ ammoHammerCheck , useTimeCheck -- , withSoundStart tap3S diff --git a/src/Dodge/Item/Weapon/SonicGuns.hs b/src/Dodge/Item/Weapon/SonicGuns.hs index 16991f525..8072724ef 100644 --- a/src/Dodge/Item/Weapon/SonicGuns.hs +++ b/src/Dodge/Item/Weapon/SonicGuns.hs @@ -34,7 +34,7 @@ sonicGun = defaultAutoGun { _itConsumption = defaultLoadable & laMax .~ 10 & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] - , _itUse = ruseRate 8 aSonicWave (HasHammer HammerUp) + , _itUse = ruseRate 8 aSonicWave [ ammoHammerCheck , useTimeCheck , useAmmoAmount 1 diff --git a/src/Dodge/Item/Weapon/Spawn.hs b/src/Dodge/Item/Weapon/Spawn.hs index ad58d0fab..62f85aea3 100644 --- a/src/Dodge/Item/Weapon/Spawn.hs +++ b/src/Dodge/Item/Weapon/Spawn.hs @@ -3,7 +3,7 @@ import Dodge.Data import Dodge.Item.Weapon.TriggerType --import Dodge.Item.Weapon.Remote import Dodge.Default.Weapon -import Dodge.Default +--import Dodge.Default --import Dodge.Item.Weapon.Grenade import Geometry import qualified IntMapHelp as IM @@ -19,7 +19,6 @@ spawnGun cr = defaultWeapon { _itConsumption = defaultLoadable , _itUse = ruseRate 100 (\_ -> spawnCrNextTo cr) - upHammer [ ammoCheckI , hammerCheckI ] diff --git a/src/Dodge/Item/Weapon/SprayGuns.hs b/src/Dodge/Item/Weapon/SprayGuns.hs index 16f7cfa65..9e6a92313 100644 --- a/src/Dodge/Item/Weapon/SprayGuns.hs +++ b/src/Dodge/Item/Weapon/SprayGuns.hs @@ -124,7 +124,7 @@ flameThrower = defaultAutoGun ,_amCreateGas = aFlame } & laCycle .~ [loadEject 5, loadInsert 10 , loadPrime 20] - , _itUse = ruseInstant (overNozzles useGasParams) NoHammer + , _itUse = ruseInstant (overNozzles useGasParams) [ ammoCheckI , useAmmoAmount 1 , withSidePushI 5 diff --git a/src/Dodge/Item/Weapon/Utility.hs b/src/Dodge/Item/Weapon/Utility.hs index f83ceda40..942c33bb4 100644 --- a/src/Dodge/Item/Weapon/Utility.hs +++ b/src/Dodge/Item/Weapon/Utility.hs @@ -119,7 +119,7 @@ autoEffectGun name eff = defaultWeapon forceFieldGun :: Item forceFieldGun = defaultWeapon { _itConsumption = defaultLoadable & laAmmoType .~ ForceFieldAmmo forceField - , _itUse = ruseInstant useForceFieldGun (HasHammer HammerUp) + , _itUse = ruseInstant useForceFieldGun [ hammerCheckI , ammoCheckI , useAmmoAmount 1] -- , _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2 [(-4,-4),(-4,4),(4,4),(4,0),(0,0),(0,-4)] , _itTargeting = targetRBPress & tgDraw .~ targetDistanceDraw