dovin- A proof assistant for Magic: The Gathering puzzles.

Safe HaskellNone




Functions for adding new cards to the board.

withLocation Hand $ do
  withAttributes ["angel", token] $ addCreature (4, 4) "Angel"


Each of these terminates a build chain, and will add a card with the specified type to the board.

Fluid interface

These methods can be chained together to specify different properties of the card to be created.

as :: Player -> GameMonad () -> GameMonad () Source #

Perform action as the specified player.

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.

withEffect Source #


:: CardMatcher

A matcher that must apply to this card for this affect to apply. matchInPlay is a typical value.

-> (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.

withPlusOneCounters :: Int -> GameMonad () -> GameMonad () Source #

Set the number of +1/+1 counters of the created card.