Files
loop/src/Dodge/Creature.hs
T

363 lines
9.0 KiB
Haskell

module Dodge.Creature (
module Dodge.Creature,
module Dodge.Creature.ChaseCrit,
module Dodge.Creature.Inanimate,
launcherCrit,
-- pistolCrit,
ltAutoCrit,
spreadGunCrit,
autoCrit,
armourChaseCrit,
module Dodge.Creature.Action,
module Dodge.Creature.Boid,
module Dodge.Creature.ChainUpdates,
module Dodge.Creature.Impulse,
module Dodge.Creature.Perception,
module Dodge.Creature.ReaderUpdate,
module Dodge.Creature.SentinelAI,
module Dodge.Creature.State,
module Dodge.Creature.Strategy,
module Dodge.Creature.Test,
module Dodge.Creature.Volition,
module Dodge.Creature.YourControl,
) where
import Dodge.Data.EnergyBall.Type
import Dodge.Data.Magnet
import Dodge.Item.Ammo
import Dodge.Item.Scope
import Control.Lens
import Dodge.Creature.Action
import Dodge.Creature.ArmourChase
import Dodge.Creature.AutoCrit
import Dodge.Creature.Boid
import Dodge.Creature.ChainUpdates
import Dodge.Creature.ChaseCrit
import Dodge.Creature.Impulse
import Dodge.Creature.Inanimate
import Dodge.Creature.LauncherCrit
import Dodge.Creature.LtAutoCrit
import Dodge.Creature.Perception
import Dodge.Creature.ReaderUpdate
import Dodge.Creature.SentinelAI
import Dodge.Creature.SpreadGunCrit
import Dodge.Creature.State
import Dodge.Creature.Strategy
import Dodge.Creature.Test
import Dodge.Creature.Volition
import Dodge.Creature.YourControl
import Dodge.Data.Creature
import Dodge.Default
import Dodge.Item
import Geometry.Data
import qualified IntMapHelp as IM
import Picture
spawnerCrit :: Creature
spawnerCrit =
defaultCreature
& crHP .~ HP 300
-- & crInv .~ IM.empty
-- & crType . skinUpper .~ lightx4 blue
miniGunCrit :: Creature
miniGunCrit =
defaultCreature
-- & crInv .~ IM.fromList [(0, miniGunX 3)]
-- & crType . skinUpper .~ lightx4 red
-- & crType . humanoidAI .~ MiniGunAI
longCrit :: Creature
longCrit =
defaultCreature
-- & crInv .~ IM.fromList [(0, sniperRifle)]
-- & crType . humanoidAI .~ LongAI
-- & crType . skinUpper .~ lightx4 red
multGunCrit :: Creature
multGunCrit =
defaultCreature
-- & crInv .~ IM.fromList [(0, volleyGun 4)]
-- & crType . skinUpper .~ lightx4 red
-- & crType . humanoidAI .~ MultGunAI
addArmour :: Creature -> Creature
addArmour = over crInv insarmour
where
insarmour xs = xs -- IM.insert (IM.newKey xs) frontArmour xs
{- | The creature you control.
ID 0.
-}
startCr :: Creature
startCr =
defaultCreature
& crPos .~ V3 20 0 0
& crOldPos .~ V3 20 0 0
& crDir .~ pi / 2
& crMvDir .~ pi / 2
& crID .~ 0
& crHP .~ HP 10000
& crInv .~ mempty
& crFaction .~ PlayerFaction
-- & crMvType .~ MvWalking yourDefaultSpeed
& crType .~ Avatar (PulseStatus 55 0) Flesh 50 50 50 3
-- | Items you start with.
startInvList :: [Item]
startInvList = []
startInventory :: IM.IntMap Item
startInventory = IM.fromList $ zip [0 ..] startInvList
inventoryX :: String -> [Item]
inventoryX c = case c of
"A" ->
[introScan t | t <- [minBound..maxBound]] <>
[ flameThrower
, chemFuelPouch
, fuelPack
, copier ABSOLUTE
, nulgate
, unigate
, bingate
]
"B" ->
[ wristArmour
, wristArmour
, volleyGun 5
, tinMag
, tinMag
, tinMag
, tinMag
, tinMag
, burstRifle
, bangCone
, tinMag
, smg
, tinMag
, machinePistol
, megaTinMag 10000
] <> fold
[ makeTypeCraftNum 4 MICROCHIP
, makeTypeCraftNum 2 TIN
, makeTypeCraftNum 2 HARDWARE
, makeTypeCraftNum 2 CAN
, makeTypeCraftNum 2 PIPE
, makeTypeCraftNum 1 CREATURESENSOR
]
"BB" -> [ wristArmour , wristArmour]
"C" -> map makeTypeCraft [minBound..maxBound]
"D" ->
[ blinker
, unsafeBlinker
, pulseChecker
, detector WALLDETECTOR
, battery
]
"E" -> [alteRifle
, tinMag
, tinMag
] <>
fold
[ makeTypeCraftNum 1 SPRING
, makeTypeCraftNum 1 HARDWARE
, makeTypeCraftNum 1 PLATE
, makeTypeCraftNum 1 STEELDRUM
, makeTypeCraftNum 1 MOTOR
]
"F" -> fold
[ makeTypeCraftNum 3 PIPE
, makeTypeCraftNum 3 TUBE
, makeTypeCraftNum 3 HARDWARE
, makeTypeCraftNum 3 TIN
, makeTypeCraftNum 3 CAN
, makeTypeCraftNum 3 SPRING
, makeTypeCraftNum 3 PUMP
, makeTypeCraftNum 3 MAGNET
, makeTypeCraftNum 3 PLATE
, makeTypeCraftNum 3 STEELDRUM
, makeTypeCraftNum 3 MOTOR
, makeTypeCraftNum 3 TRANSFORMER
, makeTypeCraftNum 3 PRISM
, makeTypeCraftNum 3 LIGHTER
-- , makeTypeCraftNum 5 (ENERGYBALLCRAFT IncBall)
]
"G" ->
[ autoPistol
, tinMag
, pistol
, tinMag
] <> fold
[ makeTypeCraftNum 2 HARDWARE
, makeTypeCraftNum 2 MAGNET
-- , makeTypeCraftNum 5 (ENERGYBALLCRAFT IncBall)
-- , makeTypeCraftNum 5 (ENERGYBALLCRAFT TeslaBall)
-- , makeTypeCraftNum 5 (ENERGYBALLCRAFT ConcBall)
-- , makeTypeCraftNum 5 (BULBODYCRAFT BounceBullet)
-- , makeTypeCraftNum 5 (BULBODYCRAFT PenetrateBullet)
]
"H" -> [shatterGun]
"I" ->
[ makeTypeCraft HARDDRIVE
, makeTypeCraft RAM
] <> fold
[ makeTypeCraftNum 2 MICROCHIP
]
"J" ->
[ laser
, battery
--, dualBeam
] <> makeTypeCraftNum 10 TRANSFORMER
"K" ->
[ autoRifle
, tinMag
] <> fold
[ makeTypeCraftNum 7 MICROCHIP
, makeTypeCraftNum 4 HARDWARE
, makeTypeCraftNum 2 MAGNET
, makeTypeCraftNum 1 MOTOR
, makeTypeCraftNum 2 ANTIMATTER
, makeTypeCraftNum 1 LIGHTSENSOR
, makeTypeCraftNum 1 SOUNDSENSOR
, makeTypeCraftNum 1 HEATSENSOR
]
"L" -> [burstRifle
,tinMag
, bulletSynthesizer
, battery
]
"M" -> stackedInventory
"N" -> [zoomScope,laser,battery, sniperRifle, tinMag]
"O" -> [ rLauncherX 2
, shellMag
, shellMag
, rLauncherX 3
, shellMag
, shellMag
, shellMag
, rifle
, shellMag
]
"P" -> [burstRifle , tinMag, bulletSynthesizer, battery]
"T" -> testInventory
"U" ->
[targetingScope tt | tt <- [minBound .. maxBound]]
<>
[ gyroscope
, gimbal
, battery
, laser
, arHUD
, rLauncher
, megaShellMag
, homingModule
, smokeReducer
, remoteScreen
, joystick
, remoteDetonator
, rLauncherX 3
, megaShellMag
, homingModule
, megaShellMag
, homingModule
, megaShellMag
, homingModule
, gLauncher
, stickyMod
]
<> [shellModule p | p <- [minBound .. maxBound]]
"V" ->
[targetingScope tt | tt <- [minBound .. maxBound]]
<>
[ battery
, zoomScope
, arHUD
, makeTypeCraft SPRING
, makeTypeCraft HARDWARE
, autoRifle
, alteRifle
, megaTinMag 10200
, megaTinMag 10200
] <>
-- [bulletTargetingModule btt | btt <- [minBound .. maxBound]]
[bulletModule (BulletModPayload (BulBall x)) | x <- [ IncendiaryBall
, ElectricalBall 0
, ExplosiveBall
, FlashBall ]]
<> [bulletModule (BulletModPayload BulGas)]
<> [bulletModule (BulletModEffect x) | x <- [minBound .. maxBound]]
_ -> []
testInventory :: [Item]
testInventory =
[ autoAmr
, brainHat
, headLamp
, magShield MagnetRepulse
, frontArmour
, wristArmour
, flatShield
, sniperRifle
] <> fold
[ makeTypeCraftNum 1 MOTOR
, makeTypeCraftNum 9 PIPE
, makeTypeCraftNum 10 HARDWARE
, makeTypeCraftNum 3 SPRING
, makeTypeCraftNum 10 CAN
, makeTypeCraftNum 3 PLANK
]
stackedInventory :: [Item]
stackedInventory =
[ laser
, megaBattery
, burstRifle
, megaTinMag 1000
, underBarrelSlot
, laser
, megaBattery
, gLauncher
, megaShellMag
, led
, magShield MagnetRepulse
, bangCone
, megaTinMag 1000
, arHUD
, smallBattery
, makeTypeCraft TRANSFORMER
, remoteScreen
, megaShellMag
, laser
, megaBattery
, capacitor
, makeTypeCraft TRANSFORMER
, teslaGun
, megaBattery
, flameThrower
, chemFuelPouch
, bulletSynthesizer
, zoomScope
, drumMag
, rLauncher
, megaShellMag
, gLauncher
, megaShellMag
, pipe
, timeScroller
, rewinder
, timeStopper
, tractorGun
, autoPistol
, megaTinMag 1000
, pistol
, megaTinMag 1000
, blinker
, miniGunX 3
, beltMag
, flatShield
, poisonSprayer
, bulletBeltPack
, bulletBeltBracer
]