127 lines
3.3 KiB
Haskell
127 lines
3.3 KiB
Haskell
module Dodge.Item.Ammo (
|
|
drumMag,
|
|
tinMag,
|
|
beltMag,
|
|
shellMag,
|
|
battery,
|
|
smallBattery,
|
|
chemFuelPouch,
|
|
bulletSynthesizer,
|
|
megaShellMag,
|
|
megaTinMag,
|
|
megaBattery,
|
|
) where
|
|
|
|
import Control.Lens
|
|
import Dodge.Data.World
|
|
import Dodge.Default.Item
|
|
import Dodge.Item.Attach
|
|
import Dodge.Item.Weapon.Bullet
|
|
|
|
megaTinMag :: Int -> Item
|
|
megaTinMag x =
|
|
tinMag
|
|
& itUse . amagLoadStatus . iaMax .~ x
|
|
& itUse . amagLoadStatus . iaLoaded .~ x
|
|
|
|
tinMag :: Item
|
|
tinMag =
|
|
defaultHeldItem & itType .~ AMMOMAG TINMAG
|
|
& itUse
|
|
.~ UseAmmoMag
|
|
{ _amagParams = BulletParams defaultBullet
|
|
, _amagType = BulletAmmo
|
|
, _amagLoadStatus =
|
|
ReloadStatus
|
|
{ _iaMax = 15
|
|
, _iaLoaded = 15
|
|
}
|
|
}
|
|
|
|
--revolveMag :: Item
|
|
--revolveMag =
|
|
-- tinMag
|
|
-- & itType .~ AMMOMAG REVOLVEMAG
|
|
-- & itUse . amagLoadStatus . iaMax .~ 6
|
|
-- & itUse . amagLoadStatus . iaLoaded .~ 6
|
|
|
|
drumMag :: Item
|
|
drumMag =
|
|
tinMag & itType . ibtAmmoMag .~ DRUMMAG
|
|
& itUse . amagLoadStatus . iaLoaded .~ 30
|
|
& itUse . amagLoadStatus . iaMax .~ 30
|
|
|
|
beltMag :: Item
|
|
beltMag =
|
|
tinMag & itType . 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 .~ AMMOMAG SHELLMAG
|
|
& itUse
|
|
.~ UseAmmoMag
|
|
{ _amagParams =
|
|
ProjectileParams
|
|
{ _ampPayload = ExplosionPayload
|
|
}
|
|
, _amagLoadStatus =
|
|
ReloadStatus
|
|
{ _iaMax = 1
|
|
, _iaLoaded = 1
|
|
}
|
|
, _amagType = ProjectileAmmo
|
|
}
|
|
|
|
megaBattery :: Item
|
|
megaBattery =
|
|
battery
|
|
& itUse . amagLoadStatus . iaMax .~ 1000000
|
|
& itUse . amagLoadStatus . iaLoaded .~ 1000000
|
|
|
|
smallBattery :: Item
|
|
smallBattery =
|
|
battery
|
|
& itUse . amagLoadStatus . iaMax .~ 999
|
|
& itUse . amagLoadStatus . iaLoaded .~ 999
|
|
|
|
battery :: Item
|
|
battery =
|
|
defaultHeldItem & itType .~ AMMOMAG BATTERY
|
|
& itUse
|
|
.~ UseAmmoMag
|
|
{ _amagParams = BulletParams defaultBullet
|
|
, _amagType = ElectricalAmmo
|
|
, _amagLoadStatus =
|
|
ReloadStatus
|
|
{ _iaMax = 10 ^ (9 :: Int)
|
|
, _iaLoaded = 10 ^ (9 :: Int)
|
|
}
|
|
}
|
|
|
|
chemFuelPouch :: Item
|
|
chemFuelPouch =
|
|
defaultHeldItem & itType .~ AMMOMAG CHEMFUELPOUCH
|
|
& itUse
|
|
.~ UseAmmoMag
|
|
{ _amagParams = GasParams ChemFuel
|
|
, _amagType = GasAmmo
|
|
, _amagLoadStatus =
|
|
ReloadStatus
|
|
{ _iaMax = 1000
|
|
, _iaLoaded = 1000
|
|
}
|
|
}
|
|
|
|
bulletSynthesizer :: Item
|
|
bulletSynthesizer = makeAttach BULLETSYNTH
|
|
& itUse .~ UseAttach (APInt 0)
|