Commit before rethinking item positioning, broken item hammer

This commit is contained in:
2022-07-07 07:50:05 +01:00
parent 9159281f85
commit c2e7fcc897
21 changed files with 85 additions and 87 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ batteryGuns =
[ teslaGun [ teslaGun
, sparkGun , sparkGun
, lasGun , lasGun
, lasSway -- , lasSway
, lasSwing , lasSwing
] ++ ] ++
[ lasGunWide i | i <- [2..10] [ lasGunWide i | i <- [2..10]
+2 -2
View File
@@ -111,10 +111,10 @@ data ItemBaseType
| LASPULSE | LASPULSE
| DUALBEAM | DUALBEAM
| LASGUNSWING | LASGUNSWING
| LASGUNSWAY -- | LASGUNSWAY
| LASGUNWIDEPULSE | LASGUNWIDEPULSE
| LASGUNWIDE {_xNum :: Int} | LASGUNWIDE {_xNum :: Int}
| LASGUNFOCUS Int -- | LASGUNFOCUS Int
| SONICGUN | SONICGUN
| TRACTORGUN | TRACTORGUN
| LAUNCHER | LAUNCHER
+2 -1
View File
@@ -467,12 +467,13 @@ data FloorItem = FlIt { _flIt :: Item , _flItPos :: Point2 , _flItRot :: Float,
data ItemPos data ItemPos
= InInv { _ipCrId :: Int , _ipInvId :: Int } = InInv { _ipCrId :: Int , _ipInvId :: Int }
| OnFloor { _ipFlID :: Int } | OnFloor { _ipFlID :: Int }
| VoidItm
data ItemUse data ItemUse
= RightUse = RightUse
{ _rUse :: Item -> Creature -> World -> World { _rUse :: Item -> Creature -> World -> World
, _useDelay :: UseDelay , _useDelay :: UseDelay
, _useMods :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] , _useMods :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
, _useHammer :: HammerType , _useHammer' :: HammerPosition
, _useAim :: AimParams , _useAim :: AimParams
, _heldScroll :: Float -> Creature -> Item -> Item , _heldScroll :: Float -> Creature -> Item -> Item
} }
+5 -7
View File
@@ -34,31 +34,29 @@ defaultChargeable = ChargeableAmmo 100 100
ruseRate :: Int ruseRate :: Int
-> (Item -> Creature -> World -> World) -> (Item -> Creature -> World -> World)
-> HammerType
-> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] -> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
-> ItemUse -> ItemUse
ruseRate i f ht usemods = RightUse ruseRate i f usemods = RightUse
{ _rUse = f { _rUse = f
, _useDelay = FixedRate , _useDelay = FixedRate
{ _rateMax = i { _rateMax = i
, _rateTime = 0 , _rateTime = 0
} }
, _useMods = usemods , _useMods = usemods
, _useHammer = ht , _useHammer' = HammerUp
, _useAim = defaultAimParams , _useAim = defaultAimParams
, _heldScroll = \_ _ -> id , _heldScroll = \_ _ -> id
} }
ruseInstant ruseInstant
:: (Item -> Creature -> World -> World) :: (Item -> Creature -> World -> World)
-> HammerType
-> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] -> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
-> ItemUse -> ItemUse
ruseInstant f ht usemods = RightUse ruseInstant f usemods = RightUse
{ _rUse = f { _rUse = f
, _useDelay = NoDelay , _useDelay = NoDelay
, _useMods = usemods , _useMods = usemods
, _useHammer = ht , _useHammer' = HammerUp
, _useAim = defaultAimParams , _useAim = defaultAimParams
, _heldScroll = \_ _ -> id , _heldScroll = \_ _ -> id
} }
@@ -68,7 +66,7 @@ defaultrUse = RightUse
{ _rUse = \_ _ -> id { _rUse = \_ _ -> id
, _useDelay = FixedRate {_rateMax = 8, _rateTime = 0} , _useDelay = FixedRate {_rateMax = 8, _rateTime = 0}
, _useMods = [] , _useMods = []
, _useHammer = HasHammer HammerUp , _useHammer' = HammerUp
, _useAim = defaultAimParams , _useAim = defaultAimParams
, _heldScroll = \_ _ -> id , _heldScroll = \_ _ -> id
} }
+4 -4
View File
@@ -62,10 +62,10 @@ itemFromBase ibt = case ibt of
LASPULSE -> lasPulse LASPULSE -> lasPulse
DUALBEAM -> dualBeam DUALBEAM -> dualBeam
LASGUNSWING -> lasSwing LASGUNSWING -> lasSwing
LASGUNSWAY -> lasSway --LASGUNSWAY -> lasSway
LASGUNWIDEPULSE -> lasWidePulse LASGUNWIDEPULSE -> lasWidePulse
LASGUNWIDE i -> lasGunWide i LASGUNWIDE i -> lasGunWide i
LASGUNFOCUS i -> lasFocus i --LASGUNFOCUS i -> lasFocus i
SONICGUN -> sonicGun SONICGUN -> sonicGun
TRACTORGUN -> tractorGun TRACTORGUN -> tractorGun
LAUNCHER -> launcher LAUNCHER -> launcher
@@ -203,10 +203,10 @@ baseToFamily ibt = case ibt of
LASPULSE -> HeldFamily LASPULSE -> HeldFamily
DUALBEAM -> HeldFamily DUALBEAM -> HeldFamily
LASGUNSWING -> HeldFamily LASGUNSWING -> HeldFamily
LASGUNSWAY -> HeldFamily -- LASGUNSWAY -> HeldFamily
LASGUNWIDEPULSE -> HeldFamily LASGUNWIDEPULSE -> HeldFamily
LASGUNWIDE _ -> HeldFamily LASGUNWIDE _ -> HeldFamily
LASGUNFOCUS _ -> HeldFamily --LASGUNFOCUS _ -> HeldFamily
SONICGUN -> HeldFamily SONICGUN -> HeldFamily
TRACTORGUN -> HeldFamily TRACTORGUN -> HeldFamily
LAUNCHER -> HeldFamily LAUNCHER -> HeldFamily
+1 -1
View File
@@ -129,7 +129,7 @@ flatShield = defaultEquipment
{ _rUse = \_ _ -> id { _rUse = \_ _ -> id
, _useDelay = NoDelay , _useDelay = NoDelay
, _useMods = [] , _useMods = []
, _useHammer = NoHammer , _useHammer' = HammerUp
, _useAim = AimParams , _useAim = AimParams
{ _aimWeight = 5 { _aimWeight = 5
, _aimRange = 0 , _aimRange = 0
+1
View File
@@ -34,3 +34,4 @@ pointToItem :: Applicative f =>
pointToItem (InInv cid invid) = creatures . ix cid . crInv . ix invid pointToItem (InInv cid invid) = creatures . ix cid . crInv . ix invid
pointToItem (OnFloor flid) = floorItems . ix flid . flIt pointToItem (OnFloor flid) = floorItems . ix flid . flIt
--itToPointer :: Item ->
+2 -3
View File
@@ -16,14 +16,13 @@ import Data.Maybe
--import Control.Lens --import Control.Lens
ruseAmmoParamsRate :: Int ruseAmmoParamsRate :: Int
-> HammerType
-> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World] -> [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
-> ItemUse -> ItemUse
ruseAmmoParamsRate rate ht usemods = RightUse ruseAmmoParamsRate rate usemods = RightUse
{ _rUse = useAmmoParams Nothing { _rUse = useAmmoParams Nothing
, _useDelay = FixedRate {_rateMax = rate,_rateTime = 0} , _useDelay = FixedRate {_rateMax = rate,_rateTime = 0}
, _useMods = usemods , _useMods = usemods
, _useHammer = ht , _useHammer' = HammerUp
, _useAim = defaultAimParams , _useAim = defaultAimParams
, _heldScroll = \_ _ -> id , _heldScroll = \_ _ -> id
} }
+45 -45
View File
@@ -3,9 +3,9 @@ module Dodge.Item.Weapon.BatteryGuns
, dualBeam , dualBeam
, lasGunWide , lasGunWide
, lasWidePulse , lasWidePulse
, lasSway --, lasSway
, lasSwing , lasSwing
, lasFocus --, lasFocus
, lasPulse , lasPulse
, sparkGun , sparkGun
, teslaGun , teslaGun
@@ -76,7 +76,7 @@ teslaGun = defaultBatteryGun
{ _itConsumption = defaultLoadable { _itConsumption = defaultLoadable
& laMax .~ 200 & laMax .~ 200
& laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60]
, _itUse = ruseInstant shootTeslaArc NoHammer , _itUse = ruseInstant shootTeslaArc
[ ammoCheckI [ ammoCheckI
, withTempLight 1 100 (V3 0 0 1) , withTempLight 1 100 (V3 0 0 1)
, withSoundForI elecCrackleS 1 , withSoundForI elecCrackleS 1
@@ -127,7 +127,7 @@ lasGunWide n = lasGun
& itType . iyBase .~ LASGUNWIDE n & itType . iyBase .~ LASGUNWIDE n
& itParams . lasColor .~ orange & itParams . lasColor .~ orange
& itParams . lasDamage .~ 2 & itParams . lasDamage .~ 2
& itUse .~ ( ruseInstant shootLaser NoHammer & itUse .~ ( ruseInstant shootLaser
[ ammoCheckI [ ammoCheckI
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
, withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8
@@ -147,7 +147,7 @@ lasWidePulse = lasGun
& itType . iyBase .~ LASGUNWIDEPULSE & itType . iyBase .~ LASGUNWIDEPULSE
& itParams . lasColor .~ orange & itParams . lasColor .~ orange
& itParams . lasDamage .~ 2 & itParams . lasDamage .~ 2
& itUse .~ ( ruseInstant shootLaser NoHammer & itUse .~ ( ruseInstant shootLaser
[ ammoCheckI [ ammoCheckI
, withItem $ \it -> withTempLight 1 (100 * frac it) (xyzV4 (_lasColor $ _itParams it)) , withItem $ \it -> withTempLight 1 (100 * frac it) (xyzV4 (_lasColor $ _itParams it))
, withItem $ \it -> withSoundForVol (frac it) tone440sawtoothquietS 2 , 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] ] xs it = [ 0.25 * (fromIntegral x - fromIntegral (n'-1) /2) | x <- [0..n'-1] ]
where where
n' = (ceiling $ (150 :: Float) * frac it) :: Int n' = (ceiling $ (150 :: Float) * frac it) :: Int
lasSway :: Item --lasSway :: Item
lasSway = lasGun --lasSway = lasGun
& itType . iyBase .~ LASGUNSWAY -- & itType . iyBase .~ LASGUNSWAY
& itParams . lasColor .~ orange -- & itParams . lasColor .~ orange
& itParams . lasDamage .~ 11 -- & itParams . lasDamage .~ 11
& itUse .~ ( ruseInstant shootLaser NoHammer -- & itUse .~ ( ruseInstant shootLaser
[ ammoCheckI -- [ ammoCheckI
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) -- , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
, withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 -- , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8
, withSoundForI tone440sawtoothquietS 2 -- , withSoundForI tone440sawtoothquietS 2
, useAmmoAmount 1 -- , useAmmoAmount 1
, withItemUpdate itup $ \it -> duplicateOffsets (x it) -- , withItemUpdate itup $ \it -> duplicateOffsets (x it)
] -- ]
& useAim . aimWeight .~ 6 -- & useAim . aimWeight .~ 6
& useAim . aimRange .~ 1 -- & useAim . aimRange .~ 1
& useAim . aimStance .~ TwoHandTwist -- & useAim . aimStance .~ TwoHandTwist
) -- )
where -- where
itup = itParams . lasCycle %~ (\i -> (i+1) `mod` 40) -- itup = itParams . lasCycle %~ (\i -> (i+1) `mod` 40)
x it = [ 15 * sin (pi * fromIntegral x' * 0.05) ] -- x it = [ 15 * sin (pi * fromIntegral x' * 0.05) ]
where -- where
x' = _lasCycle $ _itParams it -- x' = _lasCycle $ _itParams it
lasFocus :: Int -> Item --lasFocus :: Int -> Item
lasFocus n = lasGunWide n --lasFocus n = lasGunWide n
& itType . iyBase .~ LASGUNFOCUS n -- & itType . iyBase .~ LASGUNFOCUS n
& itParams . lasColor .~ red -- & itParams . lasColor .~ red
& itUse . useMods .~ -- & itUse . useMods .~
[ ammoCheckI -- [ ammoCheckI
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) -- , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
, withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8 -- , withItem $ \it -> withMuzPos $ flareCircleAt (_lasColor $ _itParams it) 0.8
, withSoundForI tone440sawtoothquietS 2 -- , withSoundForI tone440sawtoothquietS 2
, useAmmoAmount 1 -- , useAmmoAmount 1
, duplicateOffsetsFocus xs -- , duplicateOffsetsFocus xs
] -- ]
where -- where
n' = 9 * n -- n' = 9 * n
xs = [ 0.25 * (fromIntegral x - fromIntegral (n'-1) /2) | x <- [0..n'-1] ] -- xs = [ 0.25 * (fromIntegral x - fromIntegral (n'-1) /2) | x <- [0..n'-1] ]
dualBeam :: Item dualBeam :: Item
dualBeam = lasGun dualBeam = lasGun
@@ -222,7 +222,7 @@ dualBeam = lasGun
, _subParams = Nothing , _subParams = Nothing
, _dbGap = 20 , _dbGap = 20
} }
& itUse .~ (ruseInstant shootDualLaser NoHammer & itUse .~ (ruseInstant shootDualLaser
[ ammoCheckI [ ammoCheckI
, withItem $ \it -> withMuzPosShift (V2 0 (thegap it)) $ flareCircleAt (_lasColor $ _itParams it) 0.8 , 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 , withItem $ \it -> withMuzPosShift (V2 0 (-thegap it)) $ flareCircleAt (_lasColor2 $ _itParams it) 0.8
@@ -259,7 +259,7 @@ lasGun = defaultAutoBatteryGun
{ _itConsumption = defaultLoadable { _itConsumption = defaultLoadable
& laMax .~ 200 & laMax .~ 200
& laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60]
, _itUse = ruseInstant shootLaser NoHammer , _itUse = ruseInstant shootLaser
[ ammoCheckI [ ammoCheckI
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it)) , withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
, withSoundForI tone440sawtoothquietS 2 , withSoundForI tone440sawtoothquietS 2
@@ -337,7 +337,7 @@ tractorGun = lasGun
{ _itConsumption = defaultLoadable { _itConsumption = defaultLoadable
& laMax .~ 10000 & laMax .~ 10000
& laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60]
, _itUse = ruseInstant aTractorBeam NoHammer , _itUse = ruseInstant aTractorBeam
[ ammoCheckI [ ammoCheckI
] ]
& useAim . aimWeight .~ 6 & useAim . aimWeight .~ 6
+3 -3
View File
@@ -43,7 +43,7 @@ defaultBangCane = defaultBulletWeapon
, _torqueAfter = 0.1 , _torqueAfter = 0.1
, _randomOffset = 0 , _randomOffset = 0
} }
, _itUse = ruseAmmoParamsRate 6 upHammer , _itUse = ruseAmmoParamsRate 6
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
, withSoundStart tap3S , withSoundStart tap3S
@@ -70,7 +70,7 @@ defaultBangCane = defaultBulletWeapon
& itConsumption . laCycle .~ [loadPartialInsert 10 1] & itConsumption . laCycle .~ [loadPartialInsert 10 1]
volleyGun :: Int -> Item volleyGun :: Int -> Item
volleyGun i = defaultBulletWeapon volleyGun i = defaultBulletWeapon
& itUse .~ ruseAmmoParamsRate 6 upHammer & itUse .~ ruseAmmoParamsRate 6
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
, withSoundItemChoiceStart caneStickSoundChoice , withSoundItemChoiceStart caneStickSoundChoice
@@ -224,7 +224,7 @@ burstRifle = repeater
-- , withRecoil -- , withRecoil
-- ] -- ]
miniGunUse :: Int -> ItemUse miniGunUse :: Int -> ItemUse
miniGunUse i = ruseInstant (useAmmoParams $ Just 1) NoHammer $ miniGunUse i = ruseInstant (useAmmoParams $ Just 1) $
[ ammoCheckI [ ammoCheckI
, withWarmUp crankSlowS , withWarmUp crankSlowS
, withSoundForI mini1S 2 , withSoundForI mini1S 2
+2 -2
View File
@@ -48,7 +48,7 @@ bangRod = defaultBulletWeapon
, _torqueAfter = 0.3 , _torqueAfter = 0.3
, _randomOffset = 0 , _randomOffset = 0
} }
, _itUse = ruseAmmoParamsRate 12 upHammer , _itUse = ruseAmmoParamsRate 12
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
, withSoundStart bangEchoS , withSoundStart bangEchoS
@@ -128,7 +128,7 @@ sniperRifle = elephantGun
machineGun :: Item machineGun :: Item
machineGun = bangRod machineGun = bangRod
& itType . iyBase .~ MACHINEGUN & itType . iyBase .~ MACHINEGUN
& itUse .~ (ruseAmmoParamsRate 25 NoHammer & itUse .~ (ruseAmmoParamsRate 25
[ ammoCheckI [ ammoCheckI
, rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter , rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter
, withSoundStart bangEchoS , withSoundStart bangEchoS
+4 -4
View File
@@ -13,7 +13,7 @@ import Dodge.Data
import Dodge.ChainEffect import Dodge.ChainEffect
import Dodge.Default.Weapon import Dodge.Default.Weapon
--import Dodge.Item.Weapon.InventoryDisplay --import Dodge.Item.Weapon.InventoryDisplay
import Dodge.Default --import Dodge.Default
--import Dodge.Item.Attachment --import Dodge.Item.Attachment
--import Dodge.Item.Weapon.ExtraEffect --import Dodge.Item.Weapon.ExtraEffect
--import Dodge.Item.Weapon.InventoryDisplay --import Dodge.Item.Weapon.InventoryDisplay
@@ -41,7 +41,7 @@ bangStickSoundChoice it
bangStick :: Int -> Item bangStick :: Int -> Item
bangStick i = defaultBulletWeapon bangStick i = defaultBulletWeapon
{ _itUse = ruseAmmoParamsRate 8 upHammer { _itUse = ruseAmmoParamsRate 8
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
, withSoundItemChoiceStart bangStickSoundChoice , withSoundItemChoiceStart bangStickSoundChoice
@@ -159,7 +159,7 @@ pistol = bangStick 1
& itConsumption .~ ( defaultBulletLoadable & itConsumption .~ ( defaultBulletLoadable
& laMax .~ 15 & laMax .~ 15
& laCycle .~ [loadEject 5, loadInsert 5 , loadPrime 5] ) & 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) & itDimension . dimSPic .~ (\it -> noPic $ baseStickShape <> makeTinClipAt pi (V3 5 2 0) it)
& itParams %~ & itParams %~
( ( muzVel .~ 0.8 ) ( ( muzVel .~ 0.8 )
@@ -193,7 +193,7 @@ smg = autoPistol -- & some parameter affecting stability
<> makeTinClipAt 0 (V3 7 (-2) 0) it) <> makeTinClipAt 0 (V3 7 (-2) 0) it)
revolverX :: Int -> Item revolverX :: Int -> Item
revolverX i = revolver revolverX i = revolver
{ _itUse = ruseAmmoParamsRate 8 upHammer { _itUse = ruseAmmoParamsRate 8
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
-- rather than locking the inventory, a better solution may be to check -- rather than locking the inventory, a better solution may be to check
+2 -2
View File
@@ -44,7 +44,7 @@ autoGun = defaultAutoGun
, _laLoaded = 30 , _laLoaded = 30
} }
& laCycle .~ [loadEject 30, loadInsert 30 , loadPrime 10] & laCycle .~ [loadEject 30, loadInsert 30 , loadPrime 10]
, _itUse = ruseAmmoParamsRate 4 NoHammer , _itUse = ruseAmmoParamsRate 4
[ ammoCheckI [ ammoCheckI
, charFiringStratI , charFiringStratI
[('S', hammerCheckI) [('S', hammerCheckI)
@@ -93,7 +93,7 @@ autoGunPic it = noPic $
bangCone :: Item bangCone :: Item
bangCone = defaultBulletWeapon bangCone = defaultBulletWeapon
{ _itUse = ruseAmmoParamsRate 20 upHammer { _itUse = ruseAmmoParamsRate 20
[ ammoCheckI [ ammoCheckI
, hammerCheckI , hammerCheckI
, useTimeCheck , useTimeCheck
+2 -2
View File
@@ -1,7 +1,7 @@
module Dodge.Item.Weapon.Drone where module Dodge.Item.Weapon.Drone where
import Dodge.Data import Dodge.Data
import Dodge.Default.Weapon import Dodge.Default.Weapon
import Dodge.Default --import Dodge.Default
import Dodge.SoundLogic.LoadSound import Dodge.SoundLogic.LoadSound
import Dodge.Item.Weapon.TriggerType import Dodge.Item.Weapon.TriggerType
import Geometry import Geometry
@@ -20,7 +20,7 @@ import Control.Lens
droneLauncher :: Item droneLauncher :: Item
droneLauncher = defaultWeapon droneLauncher = defaultWeapon
{ _itUse = ruseRate 20 aDroneWithItemParams upHammer { _itUse = ruseRate 20 aDroneWithItemParams
[ ammoCheckI [ ammoCheckI
, useTimeCheck , useTimeCheck
, withSoundStart tap4S , withSoundStart tap4S
+2 -2
View File
@@ -6,7 +6,7 @@ module Dodge.Item.Weapon.Launcher
) where ) where
import Dodge.Data import Dodge.Data
import Dodge.Reloading.Action import Dodge.Reloading.Action
import Dodge.Default --import Dodge.Default
import Dodge.Default.Weapon import Dodge.Default.Weapon
import Dodge.Item.Location import Dodge.Item.Location
import Dodge.SoundLogic.LoadSound import Dodge.SoundLogic.LoadSound
@@ -47,7 +47,7 @@ launcher = defaultWeapon
& laMax .~ 1 & laMax .~ 1
& laLoaded .~ 1 & laLoaded .~ 1
& laCycle .~ [loadEject 30, loadInsert 30, loadPrime 10] & laCycle .~ [loadEject 30, loadInsert 30, loadPrime 10]
, _itUse = ruseRate 20 usePjCreation upHammer , _itUse = ruseRate 20 usePjCreation
[ hammerCheckI [ hammerCheckI
, ammoCheckI , ammoCheckI
, useTimeCheck , useTimeCheck
+1 -1
View File
@@ -23,7 +23,7 @@ import Control.Lens
Sends out pulses that display walls. -} Sends out pulses that display walls. -}
clickDetector :: Detector -> Item clickDetector :: Detector -> Item
clickDetector dt = defaultWeapon clickDetector dt = defaultWeapon
{ _itUse = ruseRate 20 (detectorEffect dt) upHammer { _itUse = ruseRate 20 (detectorEffect dt)
[ ammoUseCheck [ ammoUseCheck
] ]
& useAim . aimRange .~ 1 & useAim . aimRange .~ 1
+2 -2
View File
@@ -10,7 +10,7 @@ import Dodge.Base.Collide
import Dodge.Creature.HandPos import Dodge.Creature.HandPos
--import Dodge.ChainEffect --import Dodge.ChainEffect
import Dodge.Default.Weapon import Dodge.Default.Weapon
import Dodge.Default --import Dodge.Default
--import Dodge.Item.Attachment --import Dodge.Item.Attachment
--import Dodge.Item.Weapon.ExtraEffect --import Dodge.Item.Weapon.ExtraEffect
--import Dodge.Item.Weapon.InventoryDisplay --import Dodge.Item.Weapon.InventoryDisplay
@@ -29,7 +29,7 @@ import LensHelp
shatterGun :: Item shatterGun :: Item
shatterGun = defaultWeapon shatterGun = defaultWeapon
& itType . iyBase .~ SHATTERGUN & itType . iyBase .~ SHATTERGUN
& itUse .~ ruseRate 10 shootShatter upHammer & itUse .~ ruseRate 10 shootShatter
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
-- , withSoundStart tap3S -- , withSoundStart tap3S
+1 -1
View File
@@ -34,7 +34,7 @@ sonicGun = defaultAutoGun
{ _itConsumption = defaultLoadable { _itConsumption = defaultLoadable
& laMax .~ 10 & laMax .~ 10
& laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60] & laCycle .~ [loadEject 10, loadInsert 10 , loadPrime 60]
, _itUse = ruseRate 8 aSonicWave (HasHammer HammerUp) , _itUse = ruseRate 8 aSonicWave
[ ammoHammerCheck [ ammoHammerCheck
, useTimeCheck , useTimeCheck
, useAmmoAmount 1 , useAmmoAmount 1
+1 -2
View File
@@ -3,7 +3,7 @@ import Dodge.Data
import Dodge.Item.Weapon.TriggerType import Dodge.Item.Weapon.TriggerType
--import Dodge.Item.Weapon.Remote --import Dodge.Item.Weapon.Remote
import Dodge.Default.Weapon import Dodge.Default.Weapon
import Dodge.Default --import Dodge.Default
--import Dodge.Item.Weapon.Grenade --import Dodge.Item.Weapon.Grenade
import Geometry import Geometry
import qualified IntMapHelp as IM import qualified IntMapHelp as IM
@@ -19,7 +19,6 @@ spawnGun cr = defaultWeapon
{ _itConsumption = defaultLoadable { _itConsumption = defaultLoadable
, _itUse = ruseRate 100 , _itUse = ruseRate 100
(\_ -> spawnCrNextTo cr) (\_ -> spawnCrNextTo cr)
upHammer
[ ammoCheckI [ ammoCheckI
, hammerCheckI , hammerCheckI
] ]
+1 -1
View File
@@ -124,7 +124,7 @@ flameThrower = defaultAutoGun
,_amCreateGas = aFlame ,_amCreateGas = aFlame
} }
& laCycle .~ [loadEject 5, loadInsert 10 , loadPrime 20] & laCycle .~ [loadEject 5, loadInsert 10 , loadPrime 20]
, _itUse = ruseInstant (overNozzles useGasParams) NoHammer , _itUse = ruseInstant (overNozzles useGasParams)
[ ammoCheckI [ ammoCheckI
, useAmmoAmount 1 , useAmmoAmount 1
, withSidePushI 5 , withSidePushI 5
+1 -1
View File
@@ -119,7 +119,7 @@ autoEffectGun name eff = defaultWeapon
forceFieldGun :: Item forceFieldGun :: Item
forceFieldGun = defaultWeapon forceFieldGun = defaultWeapon
{ _itConsumption = defaultLoadable & laAmmoType .~ ForceFieldAmmo forceField { _itConsumption = defaultLoadable & laAmmoType .~ ForceFieldAmmo forceField
, _itUse = ruseInstant useForceFieldGun (HasHammer HammerUp) , _itUse = ruseInstant useForceFieldGun
[ hammerCheckI , ammoCheckI , useAmmoAmount 1] [ hammerCheckI , ammoCheckI , useAmmoAmount 1]
-- , _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2 [(-4,-4),(-4,4),(4,4),(4,0),(0,0),(0,-4)] -- , _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2 [(-4,-4),(-4,4),(4,4),(4,0),(0,0),(0,-4)]
, _itTargeting = targetRBPress & tgDraw .~ targetDistanceDraw , _itTargeting = targetRBPress & tgDraw .~ targetDistanceDraw