Files
loop/src/Dodge/Item/Ammo.hs
T

112 lines
3.3 KiB
Haskell

module Dodge.Item.Ammo where
import Control.Lens
import Dodge.Data.World
import Dodge.Default.Item
import Dodge.Item.Weapon.Bullet
megaTinMag :: Item
megaTinMag = tinMag
& itUse . amagLoadStatus . iaMax .~ 150000
& itUse . amagLoadStatus . iaLoaded .~ 150000
tinMag :: Item
tinMag =
defaultHeldItem & itType . iyBase .~ AMMOMAG TINMAG
& itType . iyModules . at ModBulletPayload ?~ EMPTYMODULE
& itType . iyModules . at ModBulletTrajectory ?~ EMPTYMODULE
& itUse
.~ AmmoMagUse
{ _amagParams = BulletParams defaultBullet
, _amagType = BulletAmmo
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 15
, _iaLoaded = 15
}
}
revolveMag :: Item
revolveMag =
tinMag
& itType . iyBase .~ AMMOMAG REVOLVEMAG
& itUse . amagLoadStatus . iaMax .~ 6
& itUse . amagLoadStatus . iaLoaded .~ 6
drumMag :: Item
drumMag =
tinMag & itType . iyBase . ibtAmmoMag .~ DRUMMAG
& itUse . amagLoadStatus . iaLoaded .~ 30
& itUse . amagLoadStatus . iaMax .~ 30
beltMag :: Item
beltMag =
tinMag & itType . iyBase . ibtAmmoMag .~ BELTMAG
& itUse . amagLoadStatus . iaLoaded .~ 10000
& itUse . amagLoadStatus . iaMax .~ 20000
& itUse . amagType .~ BeltBulletAmmo
megaShellMag :: Item
megaShellMag = shellMag
& itUse . amagLoadStatus . iaMax .~ 1000000
& itUse . amagLoadStatus . iaLoaded .~ 1000000
shellMag :: Item
shellMag =
defaultHeldItem & itType . iyBase .~ AMMOMAG SHELLMAG
& itUse
.~ AmmoMagUse
{ _amagParams = ProjectileParams
{ _ampPayload = ExplosionPayload
, _ampPjDraw = DrawShell
}
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 1
, _iaLoaded = 1
}
, _amagType = ProjectileAmmo
}
megaBattery :: Item
megaBattery = battery
& itUse . amagLoadStatus . iaMax .~ 1000000
& itUse . amagLoadStatus . iaLoaded .~ 1000000
battery :: Item
battery =
defaultHeldItem & itType . iyBase .~ AMMOMAG BATTERY
& itUse
.~ AmmoMagUse
{ _amagParams = BulletParams defaultBullet
, _amagType = ElectricalAmmo
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 100
, _iaLoaded = 100
}
}
chemFuelPouch :: Item
chemFuelPouch =
defaultHeldItem & itType . iyBase .~ AMMOMAG CHEMFUELPOUCH
& itUse
.~ AmmoMagUse
{ _amagParams = GasParams ChemFuel
, _amagType = GasAmmo
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 1000
, _iaLoaded = 1000
}
}
bulletSynthesizer :: Item
bulletSynthesizer = defaultHeldItem
& itType . iyBase .~ ATTACH BULLETSYNTHESIZER
& itUse .~ AttachUse Nothing
rocketHomer :: Item
rocketHomer = defaultHeldItem
& itType . iyBase .~ ATTACH ROCKETHOMER
& itUse .~ AttachUse Nothing