Runtime broken level generation
This commit is contained in:
@@ -194,19 +194,19 @@ cloudPoisonDamage c w = w & creatures %~ flip (foldr (IM.adjust doDam)) damagedC
|
||||
|
||||
makeTeslaArcAt :: Int -> Point2 -> Float -> Projectile
|
||||
makeTeslaArcAt i pos dir = Projectile
|
||||
{ _ptPos = pos
|
||||
, _ptStartPos = pos
|
||||
, _ptVel = (0,0)
|
||||
, _ptPict = onLayer PtLayer $ line [(0,0),(0,0)]
|
||||
, _ptID = i
|
||||
, _ptUpdate = moveTeslaArc pos dir i
|
||||
{ _pjPos = pos
|
||||
, _pjStartPos = pos
|
||||
, _pjVel = (0,0)
|
||||
, _pjPict = onLayer PtLayer $ line [(0,0),(0,0)]
|
||||
, _pjID = i
|
||||
, _pjUpdate = moveTeslaArc pos dir i
|
||||
}
|
||||
|
||||
moveTeslaArc :: Point2 -> Float -> Int -> World -> World
|
||||
moveTeslaArc p d i w =
|
||||
set (projectiles . ix i . ptPict) pic
|
||||
$ set (projectiles . ix i . ptUpdate)
|
||||
(ptTimer 2 i)
|
||||
set (projectiles . ix i . pjPict) pic
|
||||
$ set (projectiles . ix i . pjUpdate)
|
||||
(pjTimer 2 i)
|
||||
$ set randGen g
|
||||
$ createSpark 8 nc q2 (argV sv + d1) Nothing
|
||||
$ foldr damCrs w hitCrs
|
||||
|
||||
Reference in New Issue
Block a user