Files
loop/src/Dodge/Item/Weapon/Radar.hs
T

75 lines
2.1 KiB
Haskell

module Dodge.Item.Weapon.Radar where
import Dodge.Data
--import Dodge.Picture.Layer
import Dodge.Default
import Dodge.Item.Draw
import Dodge.Item.Weapon.TriggerType
import Dodge.Item.Weapon.ExtraEffect
import Dodge.Item.Weapon.UseEffect
--import Dodge.Item.Weapon.Remote
import Dodge.Default.Weapon
--import Dodge.Item.Weapon.Grenade
import Geometry
import Picture
import Shape
import Control.Lens
{- |
Sends out pulses that display walls. -}
radar :: Item
radar = defaultGun
{ _itName = "RADAR"
, _itType = RADAR
, _itConsumption = defaultAmmo
{ _ammoBaseMax = 100
, _ammoLoaded = 100
, _reloadTime = 200
}
, _itUse = ruseRate 120 (const aRadarPulse) upHammer
[ ammoUseCheck
]
& useAim . aimRange .~ 1
& useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1}
-- , _itZoom = defaultItZoom { _itZoomMax = 1}
, _itEquipPict = pictureWeaponAim $ \_ -> (,) emptySH $ color blue $ polygon $ rectNESW 5 5 (-5) (-5)
}
{- |
Sends out pulses that display creatures. -}
sonar :: Item
sonar = defaultGun
{ _itName = "SONAR"
, _itType = RADAR
, _itConsumption = defaultAmmo
{ _ammoBaseMax = 100
, _ammoLoaded = 100
, _reloadTime = 200
}
, _itUse = ruseRate 120 (const aSonarPulse) upHammer
[ ammoUseCheck
]
& useAim . aimRange .~ 1
& useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1}
, _itEquipPict = pictureWeaponAim $ \_ -> (,) emptySH $ color blue $ polygon $ rectNESW 5 5 (-5) (-5)
}
{- |
Automatically sends out pulses that display creatures. -}
autoSonar :: Item
autoSonar = defaultEquipment
{ _itType = RADAR
, _itName = "AUTOSONAR"
, _itEquipPict = \_ _ -> (,) emptySH blank
, _itEffect = autoSonarEffect
, _itID = Nothing
}
{- |
Automatically sends out pulses that display walls. -}
autoRadar :: Item
autoRadar = defaultEquipment
{ _itType = RADAR
, _itName = "AUTORADAR"
, _itEquipPict = \_ _ -> (,) emptySH blank
, _itEffect = autoRadarEffect
, _itID = Nothing
}