Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.Antisplice.Action
Description
Provides brick-by-brick composition for general actions, which may be used for skills and gates.
- class IsAction a where
- data Action = Action {}
- newtype ActionAfter = ActionAfter {}
- newtype ActionBefore = ActionBefore {}
- ands :: (None a, IsAction a) => [a] -> a
- andl :: (None a, IsAction a) => [a] -> a
- ors :: (None a, IsAction a) => [a] -> a
- orl :: (None a, IsAction a) => [a] -> a
- consumeCurrencyA :: CurrencyId -> Int -> Action
- consumeKindA :: KindId -> Int -> Action
- dealDamageA :: ChattyDungeonM Int -> Action
- implyCooldownA :: ChCounter m => Integer -> m Action
- implyGlobalCooldownA :: Action
Documentation
A typeclass for all action types carrying an execution condition.
Methods
(#&&) :: a -> a -> a infixl 5 Source
Conjunction _with_ short evaluation.
(#||) :: a -> a -> a infixl 5 Source
Disjunction _with_ short evaulation.
(!&&) :: a -> a -> a infixl 5 Source
Conjunction _without_ short evaluation.
(!||) :: a -> a -> a infixl 5 Source
Disjunction _without_ short evaluation.
A general action, which may be used for skills and gates.
newtype ActionAfter Source
An action that is run after a specific event.
Constructors
ActionAfter | |
Fields |
newtype ActionBefore Source
An action that is run before a specific event.
Constructors
ActionBefore | |
Fields |
consumeCurrencyA :: CurrencyId -> Int -> Action Source
Use for actions that consume a given currency.
consumeKindA :: KindId -> Int -> Action Source
Use for actions that consume an object of the given kind.
dealDamageA :: ChattyDungeonM Int -> Action Source
Deal damage to opponent
implyCooldownA :: ChCounter m => Integer -> m Action Source
Use for actions that require a cooldown time.
implyGlobalCooldownA :: Action Source
Use for actions that suffer from global cooldown.