h$qIf      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                      #None 1    None8 FdovinA phase or step in a turn. Phases and steps are not distinguished between because haven't seen a need to.YdovinTarget a player, use  to construct.ZdovinTarget a card, use  to construct.]dovinFilter to determine which cards are affected by this effect, if enabled.^dovin'The actions to apply to affected cards._dovin6A human readable description of the effect. Optional.ddovinCopiable effectsedovinFace down spells and permanentsfdovinControl-changing effectsgdovinText changing effectshdovinType changing effectsidovinColor changing effectsjdovinAbility changing effectskdovin P/T from CDAsldovinP/T from settingmdovinP/T adjustments (inc. counters)ndovin P/T Switchingodovin!Other game rule affecting effects'&$#"! %()*+,-.@?>=<;:9876543210/ABCDEFSRQPONMLKJIHGTUVWXZY[\_^]`abconmlkjihgfedpqrutsv|{zyxw}~~}v|{zyxwqrutspconmlkjihgfedab`[\_^]XZYWVTUFSRQPONMLKJIHGECDAB-.@?>=<;:9876543210/+,)*('&$#"! %NoneNoneNone_dovin0Return a card name suffixed by the given number.$$None None! dovinConstant variant of .dovin=Layer 7B effect to set the power and toughness of a creature.dovinConstant variant of dovinLayer 7C effect to adjust the power and toughness of a creature.dovinLayer 6 effect to add an ability to a card. In practice, it adds adds a new .dovinLayer 6 effect to remove all abilities from a card. This doesn't temporary abilities added by  addEffect.dovinLayer 4 effect to add a type to a card. Since card types are modeled explicitly, it instead adds a new .dovin:Effect enabled definition to apply when a card is in play.dovin5The card that is generating the effect being applied.dovinApply a lens to .dovin'Return cards fitting the given matcher.dovinInternal algorithm to apply re-calculate the state of the board by applying all effects.  Noneq None?   None dovin'Perform action as the specified player.dovinAdd 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.dovinHelper version of + for adding multiple attributes at a time.dovinAdd an effect to the created card. The effect will only apply when the card is in play.dovinA more flexible version of < that allows customization of then the effect should apply.dovin0Set the converted mana cost of the created card.dovin0Place the created card into a specific location.dovinSet the owner for the created card. If not specified, defaults to the owner of the card location.dovin5Set the number of +1/+1 counters of the created card.dovin5Set the number of -1/-1 counters of the created card.dovin'The set of cards to apply the effect todovinThe effect to applydovin*Human-readable description, cosmetic only.dovin*Effect only applies when this returns truedovin'The set of cards to apply the effect todovinThe effect to applydovin*Human-readable description, cosmetic only. NoneQ1dovinAdd mana to actor's mana pool.  addMana "2RG"  ValidatesMana specification is valid. EffectsMana pool is increased.dovin$Casts a card from actor's hand. See  for specification. cast "R" "Shock"  ValidatesCard exists in hand.dovinMove a card to the stack, spending the specified mana. If not tracking mana, use the empty string to cast for no mana. Typically you will want to ? after casting. For the common case of casting from hand, see . See - for additional mana validations and effects. 7castFromLocation "1B" "Oathsworn Vampire" >> resolveTop  ValidatesCard exists in location.$If not an instant or has flash, see  for extra validations. EffectsCard moved to top of stack.Counter  incremented if card has  or  attribute.dovinRemove a spell from the stack. counter "Shock"  ValidatesCard is on stack.-Card is not a triggered or activated ability. Effects!Card is moved to graveyard. (See  for alternate effects.)dovinCast a card from actor's graveyard, exiling it when it leaves the stack. See  for further specification. flashback "R" "Shock"Does not validate whether the card actually has a flashback cost. If important, use a wrapper function in your solution: flashbackSnapped mana castName = do validate (matchAttribute "snapcastered") castName flashback mana castName   ValidatesCard is in actor's graveyard. Effects Card gains .dovinCast a card from active player's graveyard, discarding a card in addition to its mana cost, exiling it when it leaves the stack. See  for further specification.  jumpstart "R" "Mountain" "Shock"  ValidatesCard is in actor's graveyard. Discard card is in actor's hand. Effects Card gains . Discard card moved to graveyard.dovinResolves a card on the stack. #cast "R" "Shock" >> resolve "Shock"  ValidatesStack is not empty.Card is on top of stack.EffectsSee .dovinResolves the top card of the stack. Use this for simple cast-and-resolve scenarios. For more complicated stack states, prefer = with a named spell to ensure the expected one is resolving.  ValidatesStack is not empty.Effects*If spell, move card to graveyard of owner..If permanent, move card to play area of owner.If trigger, remove card.See  for possible alternate effects, depending on card attributes.dovinResolves a trigger created by <. Adds +1/+1 to target card if still a valid mentor target. )resolveMentor "Goblin 1" "Legion Warboss"  ValidatesMentor trigger is top of stack.Target card is attacking.,Target card has less power than source card. EffectsTarget card gets +1/+1.%Trigger is removed from top of stack.dovinSacrifice a permanent. sacrifice "Soldier"  Validates&Permanent controlled by current actor.Permanent is in play. Effects Card is moved to graveyard. See  for possible alternate effects.dovin5Splices a spell on to a previously cast arcane spell. 5splice "Goryo's Vengeance" "2RR" "Through the Breach"  ValidatesTarget spell is arcane.Target spell is on stack.Spliced spell is in hand.See  for additional validations. EffectsSee  for additional effects.dovinCombination of  and , see them for specification.dovin'Transition to a new game phase or step. transitionTo DeclareAttackers  ValidatesThe new phase would occur after the current phase in a normal turn. EffectsEmpty the mana pool.Transition to new phase.dovinEquivalent to  except it skips all validation. Useful when an effect has modified the normal order of phases, such as adding an extra combat step.dovin>Triggers an effect of a permanent. Typically you will want to  after triggering. 0trigger "Draw Card" "Dawn of Hope" >> resolveTop  ValidatesCard is in play or graveyard.Card is cotrolled by actor. Effects A card with  is added to stack.dovinTriggers a mentor effect from an attacking creature, targeting another attacking creature with lesser power. Typically you will want to  after triggering. )triggerMentor "Goblin 1" "Legion Warboss"  Validates0Source card has attacking and mentor attributes.Target card is attacking.,Target card has less power than source card. Effects(A triggered card is placed on the stack.dovin(Helper function to provide a scoped let. -with "Angel" $ \cn -> target cn >> destroy cndovin)Move a card from one location to another. ,move (Opponent, Play) (Active, Play) "Angel"  ValidatesCard exists in source location. Destination is not stack (use a  variant instead)."Destination does not match source. If card has  attribute, source is in play. (Removing token once they have left play is handled by .) If card has  attribute, source is the stack. (Removing token once they have left play is handled by .)Effects#Card moved to destination location.If card is leaving play, remove all damage, counters, and gained attributes. If card has ' attribute, move to exile and remove  instead. If card has , is moving from play to graveyard, and has no +1/+1 counters, add a +1/+1 counter instead. (Note: undying should move card to graveyard then back to play for owner, but since neither triggers nor owner tracking are implemented, this simplification is valid.)5If card is entering play or changing controller, add  attribute.dovinTarget a permanent.  ValidatesCard is in play.+If card belongs to opponent, does not have .dovin%Target a card in a non-play location.  ValidatesCard is in zone.dovin(Activate an ability of a permanent. See  for additional mana validations and effects. Typically you will want to  after activating. ;activate "Create Soldier" "3W" "Dawn of Hope" >> resolveTop  ValidatesCard is in play or graveyard.Card is controlled by actor. Effects A card with  is added to stack.dovinActivate a loyalty ability of a planeswalker. Typically you will want to  after activating. activatePlaneswalker2 "Get a card" (-1) "Karn, Scion of Urza" >> resolveTop  ValidatesCard is in play.Card has enough loyalty. EffectsCard loyalty is adjusted.See ( for additional validations and effects.dovin)Start an attack with the given creatures. "attackWith ["Fanatical Firebrand"]  ValidatesCards are in play. Cards have  attribute.Cards either have  or are missing .Cards do not have . Effects&Cards become tapped, unless they have . Cards gain  attribute.Transitions to L step.dovinApply combat damage between an attacker and blockers, using a simple damage assignment algorithm. For more complex assignments, use  directly. -combatDamage ["Spirit 1", "Spirit 2"] "Angel"See # for other validations and effects.  ValidatesAttacker has attribute ."Attacker and blockers are in play.%Attacker controlled by current actor.Blockers have attribute . EffectsDamage is dealt to blockers in order given, with the final blocker receiving any left over damage.3If no blockers, damage is dealt to opposing player.If attacker has 8, any remaining damage is dealt to opposing player.dovin5Copy a spell on the stack, adding it to top of stack. copySpell "Snap Copy" "Snap"  ValidatesCard is on stack. EffectsNew card is on top of stack.dovin)Applies damage from a source to a target. 0damage (const 2) (targetPlayer Opponent) "Shock"  ValidatesSource exists.Damage is not less than zero.If targeting a card, target is in play and is either a creature or a planeswalker. EffectsAdds damage to the target.=If target is a planeswalker, remove loyalty counters instead.If source has ; and target is a creature and damage is non-zero, add  attribute to target.If source has =, controller of source gains life equal to damage dealt.Note  handles actual destruction (if applicable) of creatures and planeswalkers.dovinDestroy a permanent.  ValidatesCard is in play. Card is not  Effects Card is moved to graveyard. See  for possible alternate effects.dovin-Discard a card from the active player's hand. discard "Mountain"  Validates$Card exists in active player's hand. EffectsCard moved to graveyard.dovinExert a card. Works best when card has an associated effect that applies when  attribute is present. withAttributes [flying] $ withEffect (matchInPlay <> matchAttribute exerted) ( matchLocation . view cardLocation <> const (matchAttribute creature) ) (pure . over cardStrengthModifier (mkStrength (1, 1) <>)) $ addCreature (2, 2) "Tah-Crop Elite" attackWith ["Tah-Crop Elite"] exert "Tah-Crop Elite"  Validates Card has  attribute. Effects Card gains  attribute.dovinMove a card to the Exile zone. exile "Bridge from Below"See  for validations and effects.dovin=Have one card fight another (each deals damage to the other).  ValidatesCard is in play.Card is a creature. EffectsEach card has damage dealt to it equal to the other's power. A creature fighting itself will take twice its power in damage.Note > handles actual destruction (if applicable) of creatures.dovinModify the strength of a card in play. It will be reset to base when the card leaves play. !modifyStrength (-2, -2) "Soldier"  ValidatesCard is in play.Card is a creature. Effects+Changes the strength modifier for the card.dovin+Move card to location with same controller. moveTo Graveyard "Forest"  Validates Card exists.EffectsCard is moved to location.See 2 for possible alternate effects, depending on carddovinRemove mana from the pool. Colored mana will be removed first, then extra mana of any type will be removed to match the colorless required. spendMana "2RG"  ValidatesMana specification is valid.Sufficient mana exists in pool.EffectsMana pool is reduced.dovin Taps a card.  ValidatesCard is in play.Card is not tapped.*If creature, is not summoned or has haste. EffectsCard gains tapped attribute.dovinUntaps a card.  ValidatesCard is in play.Card is tapped. EffectsCard loses tapped attribute.dovin'Validate that a card matches a matcher. 8validate (matchAttribute "pirate") "Angrath's Marauders"  ValidatesCard matches matcher.dovinValidates that a card is no longer present in the game. Particularly helpful for checking destruction of tokens. validateRemoved "Angel"  ValidatesName does not refer to a card.dovin1Validates that the game is in a particular phase. validatePhase BeginCombat  ValidatesGame is in the given phase.dovin,Validates that a sorcery is able to be cast.  ValidatesStack is empty.In a main phase.dovin-Validates a player has a specific life total. validateLife 0 Opponent  ValidatesPlayer life equals amount.dovinPause running of state-based actions for the duration of the action, running them at the end.dovin'Run state-based actions. These include:If a creature does not have ., and has damage exceeding toughess or  attribute, destroy it.If a card is a  and is not in play, remove it.If a card is a $ and is not on the stack, remove it.,These are run implicitly at the end of each , so it's not usually needed to call this explicitly. Even then, using  is usually preferred.Running state-based actions can in turn trigger more state-based actions. This method loops until no more are generated, which has the potential for non-termination for pathological game states.dovinDefine a high-level step in the proof. A proof typically consists on multiple steps. Each step is a human-readable description, then a definition of that step using actions. If a step fails, no subsequent steps will be run. 7 is implicitly called at the end of each step. Nested  invocations execute the nested action but have no other effects - generally they should be avoided.dovinBranch off a labeled alternate line. Steps inside the fork will be reported at the end of the main line output.dovin(Increments life total for current actor. as Opponent $ gainLife 1 EffectsIncreases life total by amountdovin(Decrements life total for current actor. as Opponent $ loseLife 1 EffectsDecreases life total by amountdovin"Sets life total for current actor. as Opponent $ setLife 1 EffectsSets life total to amountdovinAdds an "until end of turn" effect to a card. Note in practice, since turns aren't modeled, the effect will stay around until the end of the solution. %addEffect (effectPTSet 1 1) "Soldier" EffectsAdds a new "until end of turn" effect to the card with the current timestamp.dovinA function that returns the amount of damage to apply, given the source card.dovinTarget to apply damage todovin Source card22 NoneU dovin'Validate that a card matches a matcher. 8validate "Angrath's Marauders" $ matchAttribute "pirate"  ValidatesCard matches matcher.dovin-Validates a player has a specific life total. validateLife Opponent 0  ValidatesPlayer life equals amount.dovin%Set the location of the created card.dovin Branch off to an alternate line.dovin"Add an effect to the created card.dovinA matcher that must apply to this card for this affect to apply.  is a typical value.dovinGiven the current card, return a matcher that matches cards that this affect applies to.dovin"Apply an effect to the given card.'&$#"! %()*+,-.@?>=<;:987654321/0ABCDEFSRQPONMLKJIGHTUVWXYZ[\_]^`abconmlkjihgfdepqrustv|{zywx}~ NoneX '&$#"! %()*+,-.@?>=<;:987654321/0ABCDEFSRQPONMLKJIGHTUVWXYZ[\_]^`abconmlkjihgfdepqrustv|{zywx}~'&$#"! %()*+,-.@?>=<;:987654321/0ABCDEFSRQPONMLKJIGHTUVWXYZ[\_]^`abconmlkjihgfdepqrustv|{zywx}~!None[|'&$#"! %()*+,-.@?>=<;:987654321/0ABCDEFSRQPONMLKJIGHTUVWXYZ[\_]^`abconmlkjihgfdepqrustv|{zywx}~'&$#"! %()*+,-.@?>=<;:987654321/0ABCDEFSRQPONMLKJIGHTUVWXYZ[\_]^`abconmlkjihgfdepqrustv|{zywx}~"None`)'&$#"! %()*+,-.@?>=<;:987654321/0ABCDEFSRQPONMLKJIGHTUVWXYZ[\_]^`abconmlkjihgfdepqrustv|{zywx}~# Safe-Inferredb Noneb  NonecNonecPNonecyNonecNonecNonecNonedNoned>NonedgNonedNonedNonedNonee Nonee8NoneeiNoneeNoneeNonee$%&$%'$()$*+,-./01/23/45/46/78/79/7:/7;,-<=>??@ABCDDEFGHIIJKLMNOPQRSTUUVVWWXYZ[\]^_`abcdefghijjklmnopqrstuvwxyz{||}~                                                                                                      ######## dovin-3.0-D8jAg3rtI8467M8j4unCKt Dovin.Prelude Dovin.Types Dovin.Monad Dovin.RunnerDovin.AttributesDovin.Matchers Dovin.Effects Dovin.HelpersDovin.Formatting Dovin.Builder Dovin.ActionsDovin.V1Solutions.ChannelFireballSolutions.Core19_9Solutions.Dominaria5Solutions.Example"Solutions.ExplorersOfIxalanContestSolutions.GuildsOfRavnica1Solutions.GuildsOfRavnica3Solutions.GuildsOfRavnica8Solutions.GuildsOfRavnica9Solutions.GuildsOfRavnicaPre2Solutions.RavnicaAllegiance3Solutions.RavnicaAllegiance4Solutions.RavnicaAllegiance5Solutions.RavnicaAllegiance7Solutions.RavnicaAllegiancePre2Solutions.RivalsOfIxalan7Solutions.UltimateMastersSolutions.WarOfTheSpark2 SolutionsDovin.V2Dovin.V3Dovin Paths_dovinbase Control.MonadunlessfoldM Data.FoldableforM_GHC.Basewhen mtl-2.2.2Control.Monad.Error.Class throwError"lens-4.19.2-AeSgoS8x1WLHA65MwtV7weControl.Lens.AtatControl.Lens.IsononControl.Lens.GetteruseviewControl.Lens.Setter modifyingassignsetover catchError Formatter GameMonadStep_stepId _stepLabel _stepStateStepIdentifierEnv _envTemplate_envSBAEnabled _envActor _envOwnerBoard_cards_resolvedCards_stack_deck _counters_life _manaPool_phase _currentStep _currentTime EffectName CardMatcherBaseCardCard _cardName _location _cardOwner_cardDefaultAttributes_cardAttributes _cardStrength_cardStrengthModifier _cardDamage _cardLoyalty _cardEffects_cardCmc _cardColors _cardTargets_cardTimestamp_cardPassiveEffects_cardAbilityEffects_cardPlusOneCounters_cardMinusOneCounters AbilityEffectEffectDuration EndOfTurn TimestampPhaseUntapUpkeepDrawStep FirstMain BeginCombatDeclareAttackersDeclareBlockersFirstStrikeDamage CombatDamage EndCombat SecondMainEndStepWon CardStrengthCardAttributes CardLocationTarget TargetPlayer TargetCardLayeredEffectDefinition _leAppliesTo _leEffect_leName LayeredEffectLayeredEffectPartLayerLayer1ALayer1BLayer2Layer3Layer4Layer5Layer6Layer7ALayer7BLayer7CLayer7D LayerOther EffectMonad CardEffect_effectEnabled _effectFilter _effectActionLocationHand GraveyardPlayStackExileDeck ManaStringManaPoolPlayerActiveOpponent CardAttributeCardNameColorsColorRedGreenBlueBlackWhite allLayersmkEffectmkLayeredEffectPart targetPlayer targetCard incrementStep$fHashablePlayer$fShowCardStrength$fEqCard $fShowCard$fShowBaseCard $fEqBaseCard $fShowPhase $fEqPhase $fOrdPhase$fEqCardStrength $fEqTarget $fShowTarget $fShowLayer $fOrdLayer $fEqLayer$fBoundedLayer $fEnumLayer$fShowLocation $fEqLocation $fOrdLocation $fShowPlayer $fEqPlayer$fGenericPlayer $fOrdPlayer $fShowColor $fEqColor $fOrdColorcardscounters currentStep currentTimedecklifemanaPoolphase resolvedCardsstackcardAbilityEffectscardAttributescardCmc cardColors cardDamagecardDefaultAttributes cardEffects cardLoyaltycardMinusOneCounterscardName cardOwnercardPassiveEffectscardPlusOneCounters cardStrengthcardStrengthModifier cardTargets cardTimestamplocation effectAction effectEnabled effectFilterenvActorenvOwner envSBAEnabled envTemplatestepId stepLabel stepState leAppliesToleEffectleNamestepFork stepNumbermkStep cardLocation cardPower cardToughnesscardController manaPoolFor_manaPoolForTypingemptyEnv mkStrength emptyCardmkCardopposing emptyBoard$fMonoidCardStrength$fSemigroupCardStrength$fMonoidCardMatcher$fSemigroupCardMatcher$fShowCardMatcherrunMonad execMonadrunnumbered activatedarcane attackingauraartifactcopycreature deathtouch deathtoucheddefender doublestrike enchantmentexertedexileWhenLeaveStack firststrikeflashflyinghasteindestructibleinstanthexproofland legendarylifelinkmentor planeswalkersorcerystormsummonedundyingtappedtokentrample triggered vigilance matchDamage matchLoyaltymatchPlusOneCountersmatchMinusOneCounters matchLocation matchInPlaymatchAttributematchAttributes matchNamematchOtherCreatures matchOthermatchControllermatchLesserPower matchNone matchCardmatchToughness matchPower matchStrength matchTargetmissingAttributematchOrinvert labelMatchapplyMatcherWithDesc applyMatcher effectPTSet effectPTSetFeffectPTAdjusteffectPTAdjustFeffectAddAbilityeffectNoAbilities effectAddType enabledInPlayaskSelfviewSelfaskCardsresolveEffects hasAttributemanaSpec parseMana requireCardallCardsmodifyCardDeprecated modifyCard loseAttributeremoveAttribute gainAttribute setAttributeforCards gameFinished getTimestamp FormatMonadblankFormatterattributeFormatterstackFormatter cardFormatter formatCards formatCardboardFormatter attribute countLife countValue countCards countManaPooladdCardaddAura addArtifact addCreatureaddPlaneswalkeraddEnchantment addInstantaddLandaddLands addSorceryas withAttributewithAttributes withEffectwithEffectWhenwithCMC withLocation withOwnerwithPlusOneCounterswithMinusOneCountersaddManacastcastFromLocationcounter flashback jumpstartresolve resolveTop resolveMentor sacrificesplice tapForMana transitionTotransitionToForcedtrigger triggerMentorwithmovetargettargetInLocationactivateactivatePlaneswalker attackWith combatDamage copySpelldamagedestroydiscardexertexilefightmodifyStrengthmoveToremove spendManatapuntapvalidatevalidateRemoved validatePhasevalidateCanCastSorcery validateLifewithStateBasedActionsrunStateBasedActionsstepforkgainLifeloseLifesetLife addEffectsolution attributesplayExLandFormatter formatter spellCounterhighTideCounteraetherfluxTriggerNamesnapped withTriggerstapForManaWithTideresolveAetherfluxflashbackSnapped spellCountcastWithTriggersmatchPowerstonesmatchArtifactMana manaSources manaFormatterdamageFormatter whenMatch triggerStormtapWithFreyalise unblockableresolveHarpyTriggerblockedcopyAttributessacrificeToAltar manaAttribute oldFormatterdinosaurallversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName