Fix poison gas

This commit is contained in:
2021-08-28 19:24:15 +01:00
parent ef73964d09
commit f977742f06
6 changed files with 42 additions and 16 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ makeCloudAt rad t drawFunc p w = w & clouds %~ (theCloud :)
, _clRad = rad
, _clTimer = t
, _clType = SmokeCloud
--, _clEffect = const id
, _clEffect = const id
}
drawCloudWith :: Float -> Float -> Color -> Cloud -> Picture
+5 -5
View File
@@ -10,7 +10,7 @@ import Dodge.Base
import Dodge.Base.Zone
import Dodge.Base.Collide
import Dodge.Picture
import Dodge.Picture.Layer
--import Dodge.Picture.Layer
import Dodge.WorldEvent.HitEffect
import Dodge.WorldEvent.ThingsHit
import Dodge.WorldEvent.Cloud
@@ -197,8 +197,8 @@ drawFlameletZ rot pt = pictures
$ polygon (rectNSWE siz2 (-siz2) (-siz2) siz2)
pic = setDepth (z + 20)
. uncurryV translate ep
. color (brightX 1 2 $ mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
white (dark red)
. color (mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
(V4 1 1 1 3) (V4 1 0 0 1)
)
. rotate (negate ( 0.1 * fromIntegral time + rot))
. scale (0.5* sc) (0.5 *sc)
@@ -281,12 +281,12 @@ makeGasCloud pos vel w = w
theCloud = Cloud
{ _clPos = pos
, _clVel = vel
, _clPict = \_ -> onLayer CrLayer $ color (withAlpha 0.1 col)
, _clPict = \_ -> setLayer 2 . setDepth 30 $ color (withAlpha 0.1 col)
$ circleSolid 20
, _clRad = 10
, _clTimer = 400
, _clType = GasCloud
-- , _clEffect = cloudPoisonDamage
, _clEffect = cloudPoisonDamage
}
(col, g) = runState (takeOne [green,yellow]) $ _randGen w