This commit is contained in:
2021-12-05 12:29:01 +00:00
parent 1bb1a06101
commit d9c5cfc26d
22 changed files with 148 additions and 144 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ import qualified Data.IntMap.Strict as IM
teslaGun :: Item
teslaGun = defaultGun
{ _itName = "TESLA"
, _itCombineType = TESLAGUN
, _itType = TESLAGUN
-- , _itIdentity = TeslaGun
, _itConsumption = defaultAmmo
{ _ammoMax = 200
@@ -64,7 +64,7 @@ teslaGunPic _ = noPic $ colorSH blue $
lasGun :: Item
lasGun = defaultAutoGun
{ _itName = "LASGUN ////"
, _itCombineType = LASGUN
, _itType = LASGUN
, _itConsumption = defaultAmmo
{ _ammoMax = 200
, _ammoLoaded = 200
@@ -120,7 +120,7 @@ lasGunPic it =
tractorGun :: Item
tractorGun = defaultAutoGun
{ _itName = "TRACTORGUN"
, _itCombineType = TRACTORGUN
, _itType = TRACTORGUN
, _itConsumption = defaultAmmo
{ _ammoMax = 10000
, _ammoLoaded = 10000
+1 -1
View File
@@ -112,7 +112,7 @@ maxT = 20
boosterGun :: Item
boosterGun = defaultGun
{ _itName = "BOOSTER"
, _itCombineType = BOOSTER
, _itType = BOOSTER
, _itConsumption = defaultAmmo
{ _ammoMax = 100
, _ammoLoaded = 100
+77 -32
View File
@@ -7,6 +7,10 @@ module Dodge.Item.Weapon.BulletGuns
, revolverX
, bangStick
, bangRod
, elephantGun
, amr
, sniperRifle
, machineGun
, bangCane
, bangCaneX
, rifle
@@ -57,7 +61,7 @@ import System.Random
autoGun :: Item
autoGun = defaultAutoGun
{ _itName = "AUTOGUN"
, _itCombineType = AUTOGUN
, _itType = AUTOGUN
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 30
@@ -118,7 +122,7 @@ bangStick i = defaultGun
{ _itName = case i of
1 -> "BANGSTICK"
_ -> "BANGSTICKx"++ show i
, _itCombineType = BANGSTICK i
, _itType = BANGSTICK i
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = i
@@ -157,7 +161,7 @@ bangStick i = defaultGun
bangCane :: Item
bangCane = defaultGun
{ _itName = "BANGCANE"
, _itCombineType = BANGCANE
, _itType = BANGCANE
,_itParams = BulletShooter
{ _muzVel = 0.8
, _rifling = 0.9
@@ -184,12 +188,12 @@ bangCane = defaultGun
, _itTweaks = defaultBulletSelTweak
} & itUse . useAim . aimSpeed .~ 0.4
& itUse . useAim . aimRange .~ 1
& itUse . useAim . aimStance .~ TwoHandTwist
& itUse . useAim . aimStance .~ OneHand
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
bangCaneX :: Int -> Item
bangCaneX i = bangCane
{ _itName = "BANGCANEx"++show i
, _itCombineType = BANGCANEX i
, _itType = BANGCANEX i
, _itUse = useAmmoParamsRate 6 upHammer
[ ammoHammerCheck
, useTimeCheck
@@ -214,8 +218,9 @@ bangCaneX i = bangCane
rifle :: Item
rifle = bangCane
& itUse . useAim . aimStance .~ TwoHandTwist
& itName .~ "RIFLE"
& itCombineType .~ RIFLE
& itType .~ RIFLE
& itConsumption . ammoMax .~ 15
& itConsumption . reloadType .~ ActiveClear
& itConsumption . reloadTime .~ 80
@@ -223,13 +228,13 @@ rifle = bangCane
autoRifle :: Item
autoRifle = rifle
& itName .~ "AUTORIFLE"
& itCombineType .~ AUTORIFLE
& itType .~ AUTORIFLE
& itUse . useMods %~ ((ammoCheckI :) . tail)
-- & itUse . useDelay . rateMax .~ 6
assaultRifle :: Item
assaultRifle = rifle
& itName .~ "ASSAULTRIFLE"
& itCombineType .~ ASSAULTRIFLE
& itType .~ ASSAULTRIFLE
& itUse . useDelay . rateMax .~ 18
& itUse . useMods .~
[ ammoHammerCheck
@@ -244,28 +249,68 @@ assaultRifle = rifle
, withRecoilI 50
]
bangRod :: Item
bangRod = bangCane
{ _itName = "BANGROD"
, _itCombineType = BANGROD
, _itType = BANGROD
, _itParams = BulletShooter
{ _muzVel = 0.8
, _rifling = 1
, _bore = 2
, _gunBarrels = SingleBarrel 0.05
, _gunBarrels = SingleBarrel 0.1
}
, _itUse = useAmmoParamsRate 6 upHammer
[ ammoHammerCheck
, useTimeCheck
, withSoundStart autoGunS
, useAmmoAmount 1
, torqueAfterI 0.3
, applyInaccuracy
, withMuzFlareI
, withRecoilI 50
]
, _itFloorPict = longGunSPic
} & itUse . useAim . aimSpeed .~ 0.2
& itUse . useAim . aimRange .~ 1
& itUse . useAim . aimStance .~ TwoHandTwist
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
}
& itConsumption . reloadType .~ ActiveClear
& itUse . useAim . aimSpeed .~ 0.2
& itUse . useAim . aimRange .~ 1
& itUse . useAim . aimStance .~ OneHand
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
elephantGun :: Item
elephantGun = bangRod
& itName .~ "ELEPHANTGUN"
& itType .~ ELEPHANTGUN
& itUse . useAim . aimStance .~ TwoHandTwist
& itParams . gunBarrels .~ SingleBarrel 0.05
& itUse . useMods .~
[ ammoHammerCheck
, useTimeCheck
, withSoundStart autoGunS
, useAmmoAmount 1
, torqueAfterI 0.1
, applyInaccuracy
, withMuzFlareI
, withRecoilI 50
]
amr :: Item
amr = elephantGun
& itName .~ "AMR"
& itType .~ AMR
& itConsumption . ammoMax .~ 15
sniperRifle :: Item
sniperRifle = elephantGun
& itName .~ "SNIPERRIFLE"
& itType .~ SNIPERRIFLE
& itParams . gunBarrels .~ SingleBarrel 0
machineGun :: Item
machineGun = bangRod
& itName .~ "MACHINEGUN"
& itType .~ MACHINEGUN
revolverX :: Int -> Item
revolverX i = revolver
{ _itName = "REVx"++show i
, _itCombineType = REVOLVERX i
, _itType = REVOLVERX i
, _itUse = useAmmoParamsRate 8 upHammer
[ ammoHammerCheck
, useTimeCheck
@@ -285,7 +330,7 @@ revolverX i = revolver
bangCone :: Item
bangCone = defaultGun
{ _itName = "BANGCONE"
, _itCombineType = BANGCONE
, _itType = BANGCONE
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 5
@@ -330,7 +375,7 @@ coneRandItemParams = do
blunderbuss :: Item
blunderbuss = bangCone
{_itName = "BLUNDERBUSS"
,_itCombineType = BLUNDERBUSS
,_itType = BLUNDERBUSS
,_itUse = useAmmoParamsRate 20 upHammer
[ ammoCheckI
, hammerCheckI
@@ -352,7 +397,7 @@ blunderbuss = bangCone
grapeShotCannon :: Item
grapeShotCannon = blunderbuss
{_itName = "GRAPESHOTCANNON"
,_itCombineType = GRAPESHOTCANNON
,_itType = GRAPESHOTCANNON
,_itUse = useAmmoParamsRate 20 upHammer
[ ammoCheckI
, hammerCheckI
@@ -378,7 +423,7 @@ grenadeLauncher _ = bangCone
revolver :: Item
revolver = pistol
{ _itName = "REVOLVER"
, _itCombineType = REVOLVER
, _itType = REVOLVER
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 6
@@ -425,7 +470,7 @@ smgAfterHamMods =
pistol :: Item
pistol = defaultGun
{ _itName = "PISTOL"
, _itCombineType = PISTOL
, _itType = PISTOL
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 15
@@ -466,7 +511,7 @@ bulletClip x = rotateSHx (negate $ pi/4) . upperPrismPoly 2 $ rectNESW 3 0 (3 -
hvAutoGun :: Item
hvAutoGun = defaultAutoGun
{ _itName = "AUTO-HV"
, _itCombineType = HVAUTOGUN
, _itType = HVAUTOGUN
, _itConsumption = defaultAmmo
{ _aoType = hvBullet
, _ammoMax = 100
@@ -507,23 +552,23 @@ autoPistol :: Item
autoPistol = pistol
& itUse . useMods .~ (ammoCheckI : pistolAfterHamMods)
& itName .~ "AUTOPISTOL"
& itCombineType .~ AUTOPISTOL
& itType .~ AUTOPISTOL
machinePistol :: Item
machinePistol = autoPistol
& itUse . useDelay . rateMax .~ 2
& itUse . useMods .~ (ammoCheckI : machinePistolAfterHamMods)
& itName .~ "MACHINEPISTOL"
& itCombineType .~ MACHINEPISTOL
& itType .~ MACHINEPISTOL
smg :: Item
smg = autoPistol -- & some parameter affecting stability
& itUse . useMods .~ (ammoCheckI : smgAfterHamMods)
& itName .~ "SMG"
& itCombineType .~ SMG
& itType .~ SMG
& itUse . useAim . aimStance .~ TwoHandTwist
ltAutoGun :: Item
ltAutoGun = defaultAutoGun
{ _itName = "AUTO-LT"
, _itCombineType = LTAUTOGUN
, _itType = LTAUTOGUN
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 15
@@ -563,7 +608,7 @@ ltAutoGunPic it =
miniGun :: Item
miniGun = defaultAutoGun
{ _itName = "MINI-G"
, _itCombineType = MINIGUN
, _itType = MINIGUN
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 1500
@@ -672,7 +717,7 @@ miniGunPict spin am =
spreadGun :: Item
spreadGun = defaultGun
{ _itName = "SPREAD"
, _itCombineType = SPREADGUN
, _itType = SPREADGUN
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 5
@@ -713,7 +758,7 @@ spreadGunPic it =
multGun :: Item
multGun = defaultGun
{ _itName = "MULTGUN"
, _itCombineType = MULTGUN
, _itType = MULTGUN
, _itConsumption = defaultAmmo
{ _aoType = basicBullet
, _ammoMax = 5
@@ -766,7 +811,7 @@ multGunSPic it =
longGun :: Item
longGun = defaultGun
{ _itName = "LONGGUN"
, _itCombineType = LONGGUN
, _itType = LONGGUN
, _itConsumption = defaultAmmo
{ _aoType = hvBullet
, _ammoMax = 1
@@ -796,7 +841,7 @@ longGun = defaultGun
}
longGunSPic :: Item -> SPic
longGunSPic _ =
( colorSH orange $ upperPrismPoly 5 $ rectWH 12 2
( colorSH orange $ upperPrismPoly 5 $ rectXH 25 2
, mempty
)
+1 -1
View File
@@ -21,7 +21,7 @@ import Control.Lens
lasDrones :: Item
lasDrones = defaultGun
{ _itName = "DRONES"
, _itCombineType = DRONELAUNCHER
, _itType = DRONELAUNCHER
, _itConsumption = defaultAmmo
{ _aoType = DroneAmmo { _amString = "LASDRONE" }
, _ammoMax = 2
+2 -2
View File
@@ -25,7 +25,7 @@ import Control.Lens
grenade :: Item
grenade = Throwable
{ _itName = "GRENADE " ++ show fuseTime
, _itCombineType = GRENADE
, _itType = GRENADE
, _itInvSize = 1
, _itDimension = defaultItemDimension
, _itCurseStatus = Uncursed
@@ -212,7 +212,7 @@ defaultThrowable = grenade
remoteBomb :: Item
remoteBomb = defaultThrowable
{ _itName = "REMOTEBOMB"
, _itCombineType = REMOTEBOMB
, _itType = REMOTEBOMB
, _itMaxStack = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2
[(-3,-3),(-3,3),(3,3),(3,-3)]
+2 -2
View File
@@ -37,7 +37,7 @@ import System.Random
launcher :: Item
launcher = defaultGun
{ _itName = "ROCKO"
, _itCombineType = LAUNCHER
, _itType = LAUNCHER
, _itConsumption = defaultAmmo
{ _aoType = defaultShellAmmo
{ _amPayload = makeExplosionAt
@@ -256,7 +256,7 @@ trySpinByCID cid i pj w = w & props . ix pjid . pjSpin .~ newSpin
remoteLauncher :: Item
remoteLauncher = defaultGun
{ _itName = "ROCKO-REM"
, _itCombineType = LAUNCHER
, _itType = LAUNCHER
, _itConsumption = defaultAmmo
{ _aoType = defaultShellAmmo
{ _amPayload = makeExplosionAt
+4 -4
View File
@@ -20,7 +20,7 @@ Sends out pulses that display walls. -}
radar :: Item
radar = defaultGun
{ _itName = "RADAR"
, _itCombineType = RADAR
, _itType = RADAR
, _itConsumption = defaultAmmo
{ _ammoMax = 100
, _ammoLoaded = 100
@@ -40,7 +40,7 @@ Sends out pulses that display creatures. -}
sonar :: Item
sonar = defaultGun
{ _itName = "SONAR"
, _itCombineType = RADAR
, _itType = RADAR
, _itConsumption = defaultAmmo
{ _ammoMax = 100
, _ammoLoaded = 100
@@ -59,7 +59,7 @@ sonar = defaultGun
Automatically sends out pulses that display creatures. -}
autoSonar :: Item
autoSonar = defaultEquipment
{ _itCombineType = RADAR
{ _itType = RADAR
, _itName = "AUTOSONAR"
, _itMaxStack = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ color yellow $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
@@ -72,7 +72,7 @@ autoSonar = defaultEquipment
Automatically sends out pulses that display walls. -}
autoRadar :: Item
autoRadar = defaultEquipment
{ _itCombineType = RADAR
{ _itType = RADAR
, _itName = "AUTORADAR"
, _itMaxStack = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ color yellow $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
+2 -2
View File
@@ -33,7 +33,7 @@ import System.Random
poisonSprayer :: Item
poisonSprayer = defaultAutoGun
{ _itName = "POISON"
, _itCombineType = SPRAYER
, _itType = SPRAYER
, _itConsumption = defaultAmmo
{ _ammoMax = 500
, _ammoLoaded = 500
@@ -57,7 +57,7 @@ poisonSprayer = defaultAutoGun
flamer :: Item
flamer = defaultAutoGun
{ _itName = "FLAMER"
, _itCombineType = SQUIRTER
, _itType = SQUIRTER
, _itConsumption = defaultAmmo
{ _ammoMax = 250
, _ammoLoaded = 250
+4 -4
View File
@@ -19,7 +19,7 @@ import Control.Lens
rewindGun :: Item
rewindGun = defaultGun
{ _itName = "REWINDER"
, _itCombineType = REWINDER
, _itType = REWINDER
, _itConsumption = ChargeableAmmo
{ _wpMaxCharge = 250
, _wpCharge = 0
@@ -55,7 +55,7 @@ useRewindGun _ _ w = case _rewindWorlds w of
shrinkGun :: Item
shrinkGun = defaultGun
{ _itName = "SHRINKER"
, _itCombineType = SHRINKER
, _itType = SHRINKER
, _itConsumption = defaultAmmo
{ _ammoMax = 100
, _ammoLoaded = 100
@@ -85,7 +85,7 @@ useShrinkGun cr invid w = if _itBool $ _itAttachment it
blinkGun :: Item
blinkGun = defaultGun
{ _itName = "BLINKER"
, _itCombineType = BLINKER
, _itType = BLINKER
, _itConsumption = defaultAmmo
{ _ammoMax = 100
, _ammoLoaded = 100
@@ -117,7 +117,7 @@ autoEffectGun name eff = defaultAutoGun
forceFieldGun :: Item
forceFieldGun = defaultGun
{ _itName = "FORCEFIELD"
, _itCombineType = FORCEFIELD
, _itType = FORCEFIELD
, _itConsumption = defaultAmmo
{ _ammoMax = 100
, _ammoLoaded = 100