This module contains all the BNF defining effects: what happens on sorceries, instants, after the colon on activated abilities, or after the trigger on triggered abilities.
Replacement effects
replacementeffect ::= <mySpd::=inst> "the next time " sourceevent " this turn, " replacementeventfromeffect | "until end of turn, if " sourceevent ", " replacementeventfromeffect replacementability ::= <mySpd::=inst> "If " sourceevent ", " replacementeventfromperm sourceevent ::= maybeCreatureEvent? | maybeCreatureEvent? | <verbMood::=subjunctive> <passiveSubject::=singular> "a " qualifiedcreature " would " replaceablecreatureverb{verbtoreplace} setTargetOneCreature? | <verbMood::=subjunctive> permspecifiedplayer{myPlr}{passiveSubject} " would " replaceableplayerverb{verbtoreplace} setTargetOnePlayer? // <verbMood::=subjunctive> <passiveSubject::=singular> "a " qualifiedpermanent " would " replaceablepermanentverb{verbtoreplace} ...removed because there are no replaceablepermanentverb s
// in a be-damaged context, it-deals-more-damage doesn't make sense bedamagedreplacementevent_white ::= preventsomeofthatdamage | redirectthatdamage bedamagedreplacementevent_blue ::= preventsomeofthatdamage bedamagedreplacementevent_black ::= redirectthatdamage bedamagedreplacementevent_red ::= redirectthatdamage bedamagedreplacementevent_green ::= preventsomeofthatdamage | redirectthatdamage bedamagedreplacementevent_artifact ::= preventsomeofthatdamage | redirectthatdamage
preventsomeofthatdamage ::= "prevent " integeronethroughfour " of that damage" | "prevent " integeronethroughseven " of that damage" redirectthatdamage ::= "that damage is dealt to target " <damageRecipSpecification?::=exclusive> damagerecipient " instead" itdealsmoredamage ::= "it deals that much damage plus " dynamicinteger " instead" showsuffixes
countereffect_inst ::= "counter target " qualifiedspellorability optionalpreventativeconditionsuffix countereffect_phase ::= typeofeffect countereffect_sorc ::= typeofeffect copyspelleffect_inst ::= "copy target " qualifiedoneoffspellorability " and you may choose new targets for the copy" copyspelleffect_phase ::= typeofeffect copyspelleffect_sorc ::= typeofeffect maybenumberedeffect ::= <dt_valuetotest::=param_discrete> <dt_defined::=numberedeffect> <dt_undefined::=numberedeffect_no> definitiontest
carddraweffect ::= "draw a card" | "draw " <<N::=dynamicinteger_noXphrase>> ind_word##N " card" pluralsuffix##lastDynamicInt? showsuffixes | "draw " <N::=integeronethroughfour> ind_word##N " card" pluralsuffix##N ", then discard " <N::=integeronethroughfour> ind_word##N " card" pluralsuffix##N destroyeffect ::= "destroy target " optionallyqualifieddestroyablepermanent | "destroy target " optionallyqualifieddestroyablepermanent maybepreventregen | "destroy " somenumberofoptionallyqualifieddestroyablepermanents showsuffixes maybepreventregen##myTargetPluralSuffix? | "destroy all " optionallyqualifieddestroyablepermanents maybepreventregenplural bounceeffect ::= "return target " qualifiedpermanent " to its owner's hand" | "return " somenumberoftargetqualifiedpermanents " to " itpossessive##myTargetPluralSuffix? " owner's hand" showsuffixes lifechangeeffect ::= lifechangeeffect##myColour lifechangeeffect_white ::= lifegaineffect lifechangeeffect_black ::= lifelosseffect | lifedraineffect lifechangeeffect_green ::= lifegaineffect lifechangeeffect_artifact ::= lifegaineffect | lifelosseffect lifegaineffect ::= effectspecifiedplayer " gain" playerVerbSuffix space dynamicinteger_noXphrase " life" showsuffixes lifelosseffect ::= effectspecifiedplayer " lose" playerVerbSuffix space dynamicinteger_noXphrase " life" showsuffixes lifedraineffect ::= nonyouspecifiedplayers " lose" playerVerbSuffix space dynamicinteger_noXphrase " life" showsuffixes " and you gain that much life" counterseffect ::= counterseffect##myColour counterseffect_black ::= poisoncountereffect counterseffect_green ::= creaturecountereffect | creaturecountereffect | creaturecountereffect | poisoncountereffect counterseffect_artifact ::= creaturecountereffect | permanentcountereffect tutoreffect ::= effectspecifiedplayer{myPlr} " may search " possessive##myPlr " library for a " pushplayer tutorablecolourtargetcard popplayer ", reveal it, and " moveittozone ". If " playerSecondRef? space doverb##myPlr ", " playerSecondRef? " shuffle" playerVerbSuffix " that library afterwards." cardmoveeffect ::= "put " cardsinplayerszone " on top of " possessive##myPlr " library" inanyorder##numCards showsuffixes | "put " cardsinplayerszonebutnothand " into " possessive##myPlr " hand" showsuffixes | "put " cardsinplayerszonebutnotgraveyard " into " possessive##myPlr " graveyard" showsuffixes | "exile " cardsinplayerszonebutnotrfg recurseeffect ::= "Return target " recurseablecard " from your graveyard to " handorplay | effectspecifiedplayer{myPlr} " may return " pushplayer somenumberofrecurseablecards popplayer " from " possessive##myPlr " graveyard to hand" showsuffixes | effectspecifiedplayer{myPlr} " may return " pushplayer somenumberofrecurseablecards popplayer " from " possessive##myPlr " graveyard to hand" showsuffixes | effectspecifiedplayer{myPlr} " may return " pushplayer somenumberofqualifiedpermanentcards popplayer " from " possessive##myPlr " graveyard to the battlefield" showsuffixes pipereffect ::= effectspecifiedplayer " may put " somenumberofqualifiedpermanentcards " from hand onto the battlefield" showsuffixes
manaeffect ::= "add " dynamicmanatoadd " to your mana pool" showsuffixes optionalspendrestriction landsearcheffect ::= "search your library for a " nontapqualifiedland " card and put it into " handorplay ", then shuffle your library" | "each player may search his or her library for up to " <N::=integeronethroughfour> word##N space maybebasic "land card" pluralsuffix##N{tmpps} " and put " itorthem##tmpps " into " handorplay ". Each player who searched his or her library this way shuffles it." smallmanaeffect ::= "add " smallmanatoadd " to your mana pool" optionalspendrestriction smallmanatoadd ::= tinyinteger | manasymbol clasheffect ::= "clash with an opponent. If you win, " typeofeffect
damageeffect ::= damageeffect##mySpd damageeffect_phase ::= <tmp::=damagerecipient##myColour> damageeffect##tmp damageeffect_sorc ::= <tmp::=damagerecipient##myColour> damageeffect##tmp damageeffect_combatant ::= commoneffect damageeffect_normaldamagerecipient ::= damageeffect_inst damageeffect_flyer ::= damageeffect_inst // Damage effects at phase/sorcery speed for white aren't allowed. All other speed/colour combinations are fine. damageeffect_inst ::= "~this~ deals " dynamicinteger_noXphrase pushsuffixes " damage " tosomenumberoftargetdamagerecipients pushparams showsuffixes popparams popsuffixes pushparams showsuffixes popparams optionaldamagemodifier // pity about the push-push-pop-pop-push-pop form there, as it makes this take 150 iterations to resolve. It's because of the "X damage to Y target red legendary creatures, where Y is the number of creatures with power greater than Z, where Z is the number of poison counters you have, where X is your life total" factor
// effects from here store a target for multi-part effects ptmodeffect ::= "target " qualifiedcreature " gets " ptchange " until end of turn" showsuffixes setTargetOneCreature? | multipletarget space qualifiedcreatures " get " pushsuffixes ptchange " until end of turn" showsuffixes popshowsuffixes setTargetMultiCreatures? regenerateeffect ::= "regenerate " somenumberoftargetqualifiedcreatures showsuffixes modifycreatureeffect ::= "target " qualifiedcreature space creaturepropmodifier showsuffixesandduration setTargetOneCreature? | multipletarget space qualifiedcreatures space pushsuffixes pluralcreaturepropmodifier showsuffixesandduration popshowsuffixes setTargetMultiCreatures? modifypermanenteffect ::= "target " qualifiedpermanent space permanentpropmodifier space duration setTargetOnePermanent? | multipletarget space qualifiedpermanents space pushsuffixes pluralpermanentpropmodifier space duration popshowsuffixes setTargetMultiPermanents? | "target " qualifiednoncreaturepermanent space noncreaturepermanentpropmodifier space duration setTargetOnePermanent? | multipletarget space qualifiednoncreaturepermanents space pushsuffixes pluralnoncreaturepermanentpropmodifier space duration popshowsuffixes setTargetMultiPermanents? tokencreationeffect ::= <myTokenNumber?::=1> "put a " tokendescription " onto the battlefield" setTargetOneCreature? | <myTokenNumber?::=1> effectspecifiedplayer " put" playerVerbSuffix " a " tokendescription " onto the battlefield" setTargetOneCreature? | "put " <<N::=smalldynamicinteger_noXphrase>> ind_word##N <myTokenNumber?::=lastDynamicInt?> space tokendescription " onto the battlefield" showsuffixes setTargetMultiCreatures? | effectspecifiedplayer " put" playerVerbSuffix space <<N::=smalldynamicinteger_noXphrase>> ind_word##N <myTokenNumber?::=lastDynamicInt?> space tokendescription " onto the battlefield" showsuffixes setTargetMultiCreatures? controlchangeeffect ::= "gain control of target " noncontrolqualifiedpermanent space duration setTargetOnePermanent? | "exchange control of target " noncontrolqualifiedpermanent " you control and target permanent of the same type " playertgtopp " controls" setTargetMultiPermanents? | "untap target " noncontrolqualifiedcreature " and gain control of it " duration ". " maybegainhaste setTargetOneCreature? | "You and " playertgtopp " each untap and gain control of " somenumberoftargetqualifiedcreatures " the other controls " duration showsuffixes ". " maybegainhasteplural setTargetMultiCreatures? sacrificeeffect ::= effectspecifiedplayer " sacrifice" playerVerbSuffix " a " noncontrolqualifiedpermanent ". " effecttext | "sacrifice any number of " noncontrolqualifiedpermanents ". " thatmanynumberedeffect taporuntapeffect ::= taporuntapeffect##myColour taporuntapeffect_white ::= tapeffect | tapeffect | untapeffect taporuntapeffect_blue ::= tapeffect | untapeffect | taporuntapchoiceeffect taporuntapeffect_green ::= untapeffect taporuntapeffect_artifact ::= tapeffect tapeffect ::= "tap " <tapStatus::=untapped> somenumberoftargetqualifiedpermanents showsuffixes untapeffect ::= "untap " <tapStatus::=untapped> somenumberoftargetqualifiedpermanents showsuffixes taporuntapchoiceeffect ::= "you may tap or untap " <tapStatus::=untapped> somenumberoftargetqualifiedpermanents showsuffixes textmodeffect ::= "change the text of target " qualifiedspellorpermanent " by replacing all instances of one " modifiablephrase " with another. (This effect doesn't end at end of turn.)" attacheffect ::= "attach target " auraorequipment##myColour{attachee} " to target " qualifiedcreature ". " chooseattacheecontrolandspecialtargets chooseattacheecontrolandspecialtargets ::= "Gain control of " setTargetOnePermanent? thatattachee{myTarget} space duration | "Gain control of " thatattachee space duration setTargetOneCreature? | "(Control of " setTargetOnePermanent? thatattachee{myTarget} " doesn't change.)" | "(Control of " thatattachee " doesn't change.)" setTargetOneCreature? revealcardseffect ::= effectspecifiedsingleplayer{myPlr} " reveal" playerVerbSuffix " the top " pushplayer <<N::=dynamicinteger>> word##N popplayer " cards of " possessive##myPlr " library" pushplayer showsuffixes popplayer ". " playerSecondRef? " put" playerVerbSuffix space aorall{myCount} space pushplayer tutorablecolourtargetcard popplayer pluralsuffix##myCount " from among them into " tutordest ", and " <myPutCards?::=therest> putintograveyardorlibraryorrfg | effectspecifiedsingleplayer{myPlr} " reveal" playerVerbSuffix " cards from the top of " possessive##myPlr " library until " playerSecondRef? " reveal" playerVerbSuffix " a " pushplayer tutorablecolourtargetcard popplayer ", put" playerVerbSuffix " that card into " tutordest ", and " <myPutCards?::=therest> putintograveyardorlibraryorrfg
putintograveyardorlibraryorrfg ::= "put" playerVerbSuffix space myPutCards? space ontoporbottomoflibraryoringraveyard | "exile" playerVerbSuffix space myPutCards? "." | "shuffle" playerVerbSuffix space myPutCards? " into " possessive##myPlr " library." creaturecountereffect ::= <myCounter::=othercreaturecountertype> putordistributecounter " on " somenumberoftargetqualifiedcreatures showsuffixes permanentcountereffect ::= <myCounter::=genericcountertype> putordistributecounter " on " somenumberoftargetqualifiedpermanents showsuffixes poisoncountereffect ::= nonyouspecifiedplayers " get" playerVerbSuffix space tinyinteger{N} " poison counter" pluralsuffix##N setTargetPlayerFromVerbSuffix?##playerVerbSuffix putordistributecounter ::= "put a " myCounter | "put a " myCounter | "put two " myCounter "s" | "distribute up to " <<N::=dynamicinteger>> word##N space myCounter pluralsuffix##lastDynamicInt? showsuffixes
moveittozone ::= "put it into " possessive##myPlr " hand" | "put it into " possessive##myPlr " hand" | "put it into " possessive##myPlr " hand" | "put it into its owner's graveyard" | maybeputintoplay##tutordest maybeputintoplay_hand ::= moveittozone maybeputintoplay_play ::= "put it onto the battlefield under " possessive##myPlr " control" setTargetOnePermanent? // | "exile it" // moveittozone used by tutoreffect ontoporbottomoflibraryoringraveyard ::= "on top of " possessive##myPlr " library in any order" | "on the bottom of " possessive##myPlr " library in any order" | "into " possessive##myPlr " graveyard" // ontoporbottomoflibraryoringraveyard used by revealcardseffect
maybegainhaste_nothing2 ::= maybegainhaste maybegainhaste_s ::= maybegainhasteplural maybegainhaste ::= nothing | "It gains haste until end of turn." maybegainhasteplural ::= nothing | "They gain haste until end of turn." maybepreventregen ::= nothing | nothing | nothing | ". It can't be regenerated." maybepreventregenplural ::= nothing | nothing | nothing | ". They can't be regenerated."
numbereddestroyeffect ::= "destroy up to " param_discrete " target " optionallyqualifieddestroyablepermanents numberedbounceeffect ::= "return up to " param_discrete " target " qualifiedpermanents " to their owner's hand" numberedlifechangeeffect ::= numberedlifechangeeffect##myColour numberedlifechangeeffect_white ::= numberedlifegaineffect numberedlifechangeeffect_black ::= numberedlifelosseffect numberedlifechangeeffect_green ::= numberedlifegaineffect numberedlifechangeeffect_artifact ::= numberedlifegaineffect numberedlifegaineffect ::= effectspecifiedplayer " gain" playerVerbSuffix space param_continuous " life" numberedlifelosseffect ::= effectspecifiedplayer " lose" playerVerbSuffix space param_continuous " life" numberedcounterseffect ::= numberedcounterseffect##myColour numberedcounterseffect_black ::= numberedpoisoncountereffect numberedcounterseffect_green ::= numberedcreaturecountereffect | numberedpoisoncountereffect numberedcounterseffect_artifact ::= numberedcreaturecountereffect | numberedpermanentcountereffect numberedcreaturecountereffect ::= "distribute " param_discrete space creaturecountertype "s on " somenumberoftargetqualifiedcreatures showsuffixes numberedpermanentcountereffect ::= "distribute " param_discrete space genericcountertype "s on " somenumberoftargetqualifiedpermanents showsuffixes numberedpoisoncountereffect ::= effectspecifiedplayer " get" playerVerbSuffix space param_discrete " poison counters" numbereddamageeffect ::= "~this~ deals " param_continuous " damage " tosomenumberoftargetdamagerecipients pushparams showsuffixes popparams numberedptmodeffect ::= "target " qualifiedcreature " gets " numberedptchange " until end of turn" showsuffixes setTargetOneCreature? | "target " qualifiedcreature " gets " numberedptchange " until end of turn" showsuffixes setTargetOneCreature? | multipletarget space pushsuffixes qualifiedcreatures " get " numberedptchange " until end of turn" showsuffixes popshowsuffixes setTargetMultiCreatures? | param_discrete space qualifiedcreatures " get " pushsuffixes ptchange " until end of turn" showsuffixes popshowsuffixes numbereddraweffect ::= "draw " param_discrete " cards" | effectspecifiedplayer " draw" playerVerbSuffix space param_discrete " cards" numberedmodifycreatureeffect ::= param_discrete space qualifiedcreatures space pluralcreaturepropmodifier showsuffixesandduration | "target " qualifiedcreature space numberedcreaturepropmodifier showsuffixesandduration // | multipletarget space qualifiedcreatures space pushsuffixes pluralnumberedcreaturepropmodifier showsuffixesandduration showsuffixes numberedmodifypermanenteffect ::= param_discrete space qualifiedpermanents space pluralpermanentpropmodifier space duration | param_discrete space qualifiednoncreaturepermanents space pluralnoncreaturepermanentpropmodifier space duration // seems none of the current *modifiers would take an internal "that many" clause, so just affect that many permanents at the moment numberedtokencreationeffect ::= <myTokenNumber?::=X> "put " param_discrete space tokendescription " onto the battlefield" | <myTokenNumber?::=X> effectspecifiedplayer " put" playerVerbSuffix space param_discrete space tokendescription " onto the battlefield" numberedmanaeffect ::= "add " param_discrete space singlecolourphrase " mana to your mana pool." numberedtaporuntapeffect ::= numberedtaporuntapeffect##myColour numberedtaporuntapeffect_white ::= numberedtapeffect | numbereduntapeffect numberedtaporuntapeffect_blue ::= numberedtapeffect | numbereduntapeffect | numberedtaporuntapchoiceeffect numberedtaporuntapeffect_green ::= numbereduntapeffect numberedtaporuntapeffect_artifact ::= numberedtapeffect numberedtapeffect ::= "tap up to " param_discrete " target " <tapStatus::=untapped> qualifiedpermanents numbereduntapeffect ::= "untap up to " param_discrete " target " <tapStatus::=untapped> qualifiedpermanents numberedtaporuntapchoiceeffect ::= "You may tap or untap up to " param_discrete " target " <tapStatus::=untapped> qualifiedpermanents numberedlandsearcheffect ::= "search your library for up to " param_discrete space nontapqualifiedland " cards and put them into " handorplay ", then shuffle your library" | "each player may search his or her library for up to " param_discrete space maybebasic "land cards and put them into " handorplay ". Each player who searched his or her library this way shuffles it."
Specified-Target Effects
// specialtargeteffects use myTargetType? to decide whether they can affect the target in question. Valid values are: ctr, perm, nonctr, plr // Also note that ##myTargetPluralSuffix? will only be valid AFTER myTarget is actually evaluated
// permanent specialtarget effects //specialtargetdestroyeffect ::= "destroy " myTarget maybepreventregen##myTargetPluralSuffix? maybepreventregen_nothing2 ::= maybepreventregen maybepreventregen_s ::= maybepreventregenplural specialtargetbounceeffect ::= "return " myTarget " to " itpossessive##myTargetPluralSuffix? " owner's hand" specialtargetcounterseffect ::= pushcounter <myCounter::=countertype##myTargetType?> putordistributecounter popcounter " on " myTarget specialtargetregenerateeffect ::= "regenerate " myTarget specialtargetmodifypermanenteffect ::= myTarget space permanentpropmodifier##myTargetPluralSuffix? space duration | myTarget space noncreaturepermanentpropmodifier##myTargetPluralSuffix? space duration specialtargetcontrolchangeeffect ::= "gain control of " myTarget space duration | "untap " myTarget " and gain control of " itorthem##myTargetPluralSuffix? space duration ". " maybegainhaste##myTargetPluralSuffix?
// player specialtarget effects specialtargetcarddraweffect ::= myTarget " draw" myTargetVerbSuffix? " a card" | myTarget " draw" myTargetVerbSuffix? space <<N::=dynamicinteger_noXphrase>> ind_word##N " card" pluralsuffix##lastDynamicInt? showsuffixes | myTarget " draw" myTargetVerbSuffix? space <N::=integeronethroughfour> ind_word##N " card" pluralsuffix##N ", then discard " <N::=integeronethroughfour> ind_word##N " card" pluralsuffix##N specialtargetlifechangeeffect ::= specialtargetlifechangeeffect##myColour specialtargetlifechangeeffect_white ::= specialtargetlifegaineffect specialtargetlifechangeeffect_black ::= specialtargetlifelosseffect specialtargetlifechangeeffect_green ::= specialtargetlifegaineffect specialtargetlifechangeeffect_artifact ::= specialtargetlifegaineffect specialtargetlifegaineffect ::= myTarget " gain" myTargetVerbSuffix? space dynamicinteger_noXphrase " life" showsuffixes specialtargetlifelosseffect ::= myTarget " lose" myTargetVerbSuffix? space dynamicinteger_noXphrase " life" showsuffixes specialtargettutoreffect ::= myTarget " may search " possessive##myTarget " library for a " tutorablecolourtargetcard ", reveal it, and " <myPlr::=myTarget> moveittozone ". If " playerSecondRef? space doverb##myPlr ", " playerSecondRef? " shuffle" myTargetVerbSuffix? " that library afterwards." specialtargetmanaeffect ::= myTarget " add" myTargetVerbSuffix? space dynamicmanatoadd " to his or her mana pool" showsuffixes optionalspendrestriction specialtargetlandsearcheffect ::= myTarget " may search his or her library for a " nontapqualifiedland " card and put it into " handorplay ", then shuffle that library" | myTarget " may search his or her library for up to " <N::=integeronethroughfour> word##N space maybebasic "land card" pluralsuffix##N{tmpps} " and put " itorthem##tmpps " into " handorplay ". If " playerSecondRef? space doverb##playerSecondRef? ", " playerSecondRef? " shuffle" myTargetVerbSuffix? " that library afterwards."