62 lines
2.0 KiB
Haskell
62 lines
2.0 KiB
Haskell
module Dodge.Item.Ammo where
|
|
|
|
import Control.Lens
|
|
import Dodge.Data.World
|
|
import Dodge.Default.Item
|
|
import Dodge.Item.Weapon.Bullet
|
|
import Dodge.Reloading.Action
|
|
|
|
tinMag :: Item
|
|
tinMag =
|
|
defaultHeldItem & itType . iyBase .~ AMMOMAG TINMAG
|
|
& itType . iyModules . at ModBulletPayload ?~ EMPTYMODULE
|
|
& itType . iyModules . at ModBulletTrajectory ?~ EMPTYMODULE
|
|
& itUse
|
|
.~ AmmoMagUse
|
|
{ _amagParams = BulletParams defaultBullet
|
|
, _amagLoadStatus =
|
|
InternalAmmo
|
|
{ _iaMax = 15
|
|
, _iaLoaded = 15
|
|
, _iaPrimed = True
|
|
, _iaCycle = [loadEject 10, loadInsert 10, loadPrime 10]
|
|
, _iaProgress = Nothing
|
|
}
|
|
}
|
|
|
|
revolveMag :: Item
|
|
revolveMag =
|
|
tinMag
|
|
& itType . iyBase .~ AMMOMAG REVOLVEMAG
|
|
& itUse . amagLoadStatus . iaMax .~ 6
|
|
& itUse . amagLoadStatus . iaLoaded .~ 6
|
|
& itUse . amagLoadStatus . iaCycle .~ [loadPartialInsert 10 1]
|
|
|
|
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
|
|
|
|
shellMag :: Item
|
|
shellMag =
|
|
defaultHeldItem & itType . iyBase .~ AMMOMAG SHELLMAG
|
|
& itUse
|
|
.~ AmmoMagUse
|
|
{ _amagParams = BulletParams defaultBullet
|
|
, _amagLoadStatus =
|
|
InternalAmmo
|
|
{ _iaMax = 15
|
|
, _iaLoaded = 15
|
|
, _iaPrimed = True
|
|
, _iaCycle = [loadEject 10, loadInsert 10, loadPrime 10]
|
|
, _iaProgress = Nothing
|
|
}
|
|
}
|