Reorganise weapons, start work on drones
This commit is contained in:
@@ -3,6 +3,7 @@ import Color
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Default
|
||||
import Dodge.FloorItem
|
||||
import Dodge.Wall.Delete
|
||||
import Dodge.WorldEvent.Explosion
|
||||
import Dodge.Item.Weapon.BatteryGuns
|
||||
@@ -37,6 +38,7 @@ updateTurret rotSpeed mc w
|
||||
| _mcHP mc < 1 = w & machines %~ IM.delete mcid
|
||||
& deleteWallIDs (_mcWallIDs mc)
|
||||
& makeExplosionAt mcpos
|
||||
& copyItemToFloor mcpos lasGun
|
||||
| otherwise = w & doDamage & maybeFire & elecDamBranch
|
||||
where
|
||||
doDamage = machines . ix mcid %~
|
||||
@@ -46,10 +48,11 @@ updateTurret rotSpeed mc w
|
||||
elecDamBranch
|
||||
| elecDam < 10 = updateFiringStatus . doTurn
|
||||
| otherwise = id
|
||||
-- TODO make this use the same function as the lasgun
|
||||
maybeFire
|
||||
| _tuFireTime (_mcType mc) > 0
|
||||
= ( particles %~ (makeLaserAt 5 (mcpos + 15 *.* unitVectorAtAngle mcdir) mcdir :) )
|
||||
. soundContinue (MachineSound mcid) mcpos tone440sawtoothS (Just 1)
|
||||
. soundContinue (MachineSound mcid) mcpos tone440sawtoothquietS (Just 1)
|
||||
| otherwise = id
|
||||
mcid = _mcID mc
|
||||
ypos = _crPos $ you w
|
||||
|
||||
Reference in New Issue
Block a user