Move towards adding reflective shield

This commit is contained in:
2021-11-05 12:14:11 +00:00
parent 5cbfa6f1ff
commit 2c768845b2
9 changed files with 8 additions and 25 deletions
+2 -2
View File
@@ -176,10 +176,10 @@ startInventory = IM.fromList (zip [0..20]
,blinkGun
,miniGun
,bezierGun
,multGun
-- ,multGun
,boosterGun
,remoteLauncher
,remoteBomb
,flatShield
,grenade
,spawnGun (lamp 5)
,lasGun
-1
View File
@@ -9,7 +9,6 @@ module Dodge.Creature.Inanimate
, explosiveBarrel
) where
import Dodge.Data
import Dodge.Data.DamageType
import Dodge.WorldEvent.Explosion
import Dodge.Creature.Picture
--import Dodge.Creature.Stance.Data
-1
View File
@@ -3,7 +3,6 @@ module Dodge.Creature.State
, doDamage
) where
import Dodge.Data
import Dodge.Data.DamageType
import Dodge.Data.SoundOrigin
import Dodge.Item.Data
import Dodge.Creature.State.Data
+1 -4
View File
@@ -288,8 +288,6 @@ data Item
, _wpRange :: Float
, _itHammer :: HammerPosition
, _itFloorPict :: Item -> SPic
, _itMaxStack :: Int
, _itAmount :: Int
, _itAimingSpeed :: Float
, _itAimingRange :: Float
, _itZoom :: ItZoom
@@ -337,8 +335,6 @@ data Item
}
| Equipment
{ _itName :: String
, _itMaxStack :: Int
, _itAmount :: Int
, _itFloorPict :: Item -> SPic
, _itEquipPict :: Creature -> Int -> SPic
, _itIdentity :: ItemIdentity
@@ -572,6 +568,7 @@ data MachineType
| Turret
{ _tuWeapon :: Item
, _tuTurnSpeed :: Float
, _tuFiring :: Bool
}
data Door = Door
{ _drID :: Int
-2
View File
@@ -129,8 +129,6 @@ defaultEquipment :: Item
defaultEquipment = Equipment
{ _itIdentity = Generic
, _itName = "genericEquipment"
, _itMaxStack = 1
, _itAmount = 1
, _itFloorPict = \_ -> (,) emptySH $ setLayer 0 $ onLayer FlItLayer $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
, _itEquipPict = \_ _ -> (,) emptySH blank
, _itEffect = NoItEffect
-2
View File
@@ -32,8 +32,6 @@ defaultGun = Weapon
, _wpRange = 20
, _itHammer = HammerUp
, _itFloorPict = const emptyBlank
, _itAmount = 1
, _itMaxStack = 1
, _itAimingSpeed = 1
, _itAimingRange = 0
, _itZoom = ItZoom 20 0.2 1
+3 -1
View File
@@ -46,7 +46,9 @@ addItem _ it' = it' & itAmount +~ 1
--numInventorySlots = 9
itNotFull :: Item -> Bool
itNotFull it = _itMaxStack it > _itAmount it
itNotFull it = case it ^? itMaxStack of
Just themax -> themax > _itAmount it
Nothing -> False
rmInvItem
:: Int -- ^ Creature id
+2 -8
View File
@@ -13,8 +13,6 @@ magShield :: Item
magShield = defaultEquipment
{ _itIdentity = MagShield
, _itName = "MAGSHIELD"
, _itMaxStack = 1
, _itAmount = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
, _itEquipPict = \_ _ -> (,) emptySH blank
, _itID = Nothing
@@ -23,8 +21,6 @@ flameShield :: Item
flameShield = defaultEquipment
{ _itIdentity = FlameShield
, _itName = "FLAMESHIELD"
, _itMaxStack = 1
, _itAmount = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
, _itEquipPict = \cr _ -> (,) emptySH $ onLayer CrLayer $ pictures [color cyan $ circle (_crRad cr+2)]
, _itID = Nothing
@@ -34,8 +30,6 @@ frontArmour :: Item
frontArmour = defaultEquipment
{ _itIdentity = FrontArmour
, _itName = "FARMOUR"
, _itMaxStack = 1
, _itAmount = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ translate 0 (-5) $ pictures
[color (greyN 0.1) $ thickArc 0 (pi/2) 10 5
,color (greyN 0.1) $ thickArc (3*pi/2) (2*pi) 10 5
@@ -47,13 +41,13 @@ frontArmour = defaultEquipment
, _itEffect = NoItEffect
, _itID = Nothing
}
flatShield :: Item
flatShield = defaultEquipment
{- | Increases speed, reduces friction, cannot only move forwards. -}
jetPack :: Item
jetPack = defaultEquipment
{ _itIdentity = JetPack
, _itName = "JETPACK"
, _itMaxStack = 1
, _itAmount = 1
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ color yellow $ polygon $ map toV2 [(-3,-3),(-3,3),(3,3),(3,-3)]
, _itEquipPict = \_ _ -> (,) emptySH $ onLayer CrLayer
$ pictures [color yellow $ polygon $ rectNSEW 5 (-5) (-3) (-11) ]
-4
View File
@@ -302,8 +302,6 @@ radar = defaultGun
, _wpRange = 20
, _itHammer = HammerUp
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ color blue $ polygon $ rectNESW 5 5 (-5) (-5)
, _itAmount = 1
, _itMaxStack = 1
, _itAimingRange = 1
, _itZoom = defaultItZoom { _itZoomMax = 1}
, _itAimZoom = defaultItZoom { _itZoomMax = 1}
@@ -328,8 +326,6 @@ sonar = defaultGun
, _wpRange = 20
, _itHammer = HammerUp
, _itFloorPict = \_ -> (,) emptySH $ onLayer FlItLayer $ color blue $ polygon $ rectNESW 5 5 (-5) (-5)
, _itAmount = 1
, _itMaxStack = 1
, _itAimingRange = 1
, _itZoom = defaultItZoom {_itZoomMax = 1}
, _itAimZoom = defaultItZoom {_itZoomMax = 1}