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
{ spawnerPowerup :: Wand -- ^ Which 'Powerup' is being spawned
, 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
}
deriving (Show, Eq)
@ -79,6 +81,11 @@ data Wand
| BlinkWand -- ^ Spell for random teleport
deriving (Show, Eq, Enum, Bounded)
data SpawnerState
= SpawnerFull
| SpawnerEmpty
deriving (Eq, Show)
data Effect = Effect
{ effectType :: Affliction -- ^ What is happening
, effectTTL :: Float -- ^ remaining time
@ -86,6 +93,7 @@ data Effect = Effect
deriving (Show, Eq)
data Affliction
= Burning -- ^ Damage over time
| Frozen -- ^ Unable to perform any action
= Burning -- ^ Damage over time
| Frozen -- ^ Unable to perform any action
| Shielded -- ^ invulnerable until next hit or time runs out.
deriving (Show, Eq)