From df666c5175e2c2cc6bc5db9d7f992ad093bcaf50 Mon Sep 17 00:00:00 2001 From: nek0 Date: Thu, 7 Dec 2023 22:17:03 +0100 Subject: [PATCH] more state and an affliction --- src-lib/Library/Types.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src-lib/Library/Types.hs b/src-lib/Library/Types.hs index c546c52..b2e8f9c 100644 --- a/src-lib/Library/Types.hs +++ b/src-lib/Library/Types.hs @@ -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)