Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for adding new cards to the board.
withLocation Hand $ do withAttributes ["angel", token] $ addCreature (4, 4) "Angel"
Synopsis
- addCard :: CardName -> GameMonad ()
- addAura :: CardName -> GameMonad ()
- addArtifact :: CardName -> GameMonad ()
- addCreature :: (Int, Int) -> CardName -> GameMonad ()
- addEnchantment :: CardName -> GameMonad ()
- addInstant :: CardName -> GameMonad ()
- addLand :: CardName -> GameMonad ()
- addLands :: Int -> CardName -> GameMonad ()
- addPlaneswalker :: Int -> CardName -> GameMonad ()
- addSorcery :: CardName -> GameMonad ()
- as :: Player -> GameMonad () -> GameMonad ()
- withAttribute :: String -> GameMonad () -> GameMonad ()
- withAttributes :: [String] -> GameMonad () -> GameMonad ()
- withCMC :: Int -> GameMonad () -> GameMonad ()
- withEffect :: EffectMonad CardMatcher -> [LayeredEffectPart] -> EffectName -> GameMonad () -> GameMonad ()
- withEffectWhen :: EffectMonad Bool -> EffectMonad CardMatcher -> [LayeredEffectPart] -> EffectName -> GameMonad () -> GameMonad ()
- withLocation :: Location -> GameMonad () -> GameMonad ()
- withOwner :: Player -> GameMonad () -> GameMonad ()
- withPlusOneCounters :: Int -> GameMonad () -> GameMonad ()
- withMinusOneCounters :: Int -> GameMonad () -> GameMonad ()
Builders
Each of these terminates a build chain, and will add a card with the specified type to the board.
addArtifact :: CardName -> GameMonad () Source #
addEnchantment :: CardName -> GameMonad () Source #
addInstant :: CardName -> GameMonad () Source #
addSorcery :: CardName -> GameMonad () Source #
Fluid interface
These methods can be chained together to specify different properties of the card to be created.
withAttribute :: String -> GameMonad () -> GameMonad () Source #
Add an attribute to the created card, as identified by a string. Attributes with that special meaning to Dovin built-ins (such as flying) are defined in Dovin.Attributes.
withAttributes :: [String] -> GameMonad () -> GameMonad () Source #
Helper version of withAttribute
for adding multiple attributes at a
time.
withCMC :: Int -> GameMonad () -> GameMonad () Source #
Set the converted mana cost of the created card.
:: EffectMonad CardMatcher | The set of cards to apply the effect to |
-> [LayeredEffectPart] | The effect to apply |
-> EffectName | Human-readable description, cosmetic only. |
-> GameMonad () | |
-> GameMonad () |
Add an effect to the created card. The effect will only apply when the card is in play.
:: EffectMonad Bool | Effect only applies when this returns true |
-> EffectMonad CardMatcher | The set of cards to apply the effect to |
-> [LayeredEffectPart] | The effect to apply |
-> EffectName | Human-readable description, cosmetic only. |
-> GameMonad () | |
-> GameMonad () |
A more flexible version of withEffect
that allows customization of then
the effect should apply.
withLocation :: Location -> GameMonad () -> GameMonad () Source #
Place the created card into a specific location.
withOwner :: Player -> GameMonad () -> GameMonad () Source #
Set the owner for the created card. If not specified, defaults to the owner of the card location.