more state and an affliction

This commit is contained in:
nek0 2023-12-07 22:17:03 +01:00
parent b7714fbb09
commit df666c5175

View file

@ -64,6 +64,8 @@ data Arena = Arena
data Spawner = Spawner data Spawner = Spawner
{ spawnerPowerup :: Wand -- ^ Which 'Powerup' is being spawned { spawnerPowerup :: Wand -- ^ Which 'Powerup' is being spawned
, spawnerReloadTime :: Int -- ^ How long does it take for the 'Powerup' to reappear , spawnerReloadTime :: Int -- ^ How long does it take for the 'Powerup' to reappear
, spawnerState :: SpawnerState
, spawnerReloadTTL :: Float
, spawnerPosition :: Position -- ^ Position of the `Spawner` on the map , spawnerPosition :: Position -- ^ Position of the `Spawner` on the map
} }
deriving (Show, Eq) deriving (Show, Eq)
@ -79,6 +81,11 @@ data Wand
| BlinkWand -- ^ Spell for random teleport | BlinkWand -- ^ Spell for random teleport
deriving (Show, Eq, Enum, Bounded) deriving (Show, Eq, Enum, Bounded)
data SpawnerState
= SpawnerFull
| SpawnerEmpty
deriving (Eq, Show)
data Effect = Effect data Effect = Effect
{ effectType :: Affliction -- ^ What is happening { effectType :: Affliction -- ^ What is happening
, effectTTL :: Float -- ^ remaining time , effectTTL :: Float -- ^ remaining time
@ -88,4 +95,5 @@ data Effect = Effect
data Affliction data Affliction
= Burning -- ^ Damage over time = Burning -- ^ Damage over time
| Frozen -- ^ Unable to perform any action | Frozen -- ^ Unable to perform any action
| Shielded -- ^ invulnerable until next hit or time runs out.
deriving (Show, Eq) deriving (Show, Eq)