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 ()
- withEffect :: CardMatcher -> (Card -> CardMatcher) -> (Card -> GameMonad Card) -> GameMonad () -> GameMonad ()
- withLocation :: Location -> 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.
:: CardMatcher | A matcher that must apply to this card for this affect to
apply. |
-> (Card -> CardMatcher) | Given the current card, return a matcher that matches cards that this affect applies to. |
-> (Card -> GameMonad Card) | Apply an effect to the given card. |
-> GameMonad () | |
-> GameMonad () |
Add an effect to the created card.