diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index e6a8e81df..28ab9db4c 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -1,6 +1,6 @@ #Primitives Pack for Wagic the Homebrew. #Please keep these card alphabetized, and try to have the "name=" line at the top of each card -#I sorted this programatically so the other comments are removed except for AUTO_DEFINE - kevlahnota 02-10-2017 +#I sorted this programatically so the other comments are removed except for AUTO_DEFINE - kevlahnota 03-09-2017 [card] name=Abandon Reason target=creature @@ -7851,6 +7851,7 @@ type=Instant [card] name=Aven Warhawk abilities=flying +aicode=activate target(*[bird;soldier]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[bird;soldier]|myhand) optionone foreach(*[bird;soldier]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Bird and/or Soldier card you reveal in your hand.) -- Flying mana={4}{W} @@ -15207,6 +15208,17 @@ mana={2}{G} type=Enchantment [/card] [card] +name=Brontotherium +abilities=trample +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=Trample -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) +mana={4}{G}{G} +type=Creature +subtype=Beast +power=5 +toughness=3 +[/card] +[card] name=Bronze Sable mana={2} type=Artifact Creature @@ -15853,6 +15865,18 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Burning-Tree Bloodscale +auto=bloodthirst:1 +auto={2}{R}:target(creature) ueot cantbeblockerof(this) +auto={2}{G}:setblocker target(creature|opponentbattlefield) +text=Bloodthirst 1 (If an opponent was dealt damage this turn, this creature enters the battlefield with a +1/+1 counter on it.) -- {2}{R}: Target creature can't block Burning-Tree Bloodscale this turn. -- {2}{G}: Target creature blocks Burning-Tree Bloodscale this turn if able. +mana={2}{R}{G} +type=Creature +subtype=Viashino Berserker +power=2 +toughness=2 +[/card] +[card] name=Burning-Tree Emissary auto=Add{R}{G} text=When Burning-Tree Emissary enters the battlefield, add {R}{G} to your mana pool. @@ -16656,6 +16680,7 @@ subtype=Aura [card] name=Canopy Crawler auto={t}:target(creature) thisforeach(counter{1/1.1}) +1/+1 ueot +aicode=activate target(*[beast]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[beast]|myhand) optionone foreach(*[beast]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Beast card you reveal in your hand.) -- {T}: Target creature gets +1/+1 until end of turn for each +1/+1 counter on Canopy Crawler. mana={3}{G} @@ -23623,6 +23648,17 @@ type=Enchantment text=At the beginning of each upkeep, put a strife counter on Crescendo of War. Attacking creatures get +1/+0 for each strife counter on Crescendo of War. Blocking creatures you control get +1/+0 for each strife counter on Crescendo of War. [/card] [card] +name=Crested Craghorn +abilities=haste +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=Haste -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) +mana={4}{R} +type=Creature +subtype=Goat Beast +power=4 +toughness=1 +[/card] +[card] name=Crevasse auto=lord(creature) -mountainwalk text=Creatures with mountainwalk can be blocked as though they didn't have mountainwalk. @@ -26235,6 +26271,7 @@ toughness=1 [/card] [card] name=Daru Stinger +aicode=activate target(*[human;soldier]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[human;soldier]|myhand) optionone foreach(*[human;soldier]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend auto={t}:target(creature[attacking;blocking]) thisforeach(counter{1/1.1}) damage:1 text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Human and/or Soldier card you reveal in your hand.) -- {T}: Daru Stinger deals damage equal to the number of +1/+1 counters on it to target attacking or blocking creature. @@ -28063,6 +28100,17 @@ power=2 toughness=1 [/card] [card] +name=Deftblade Elite +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +auto={1}{W}:preventAllCombatDamage to(this) && preventAllCombatDamage from(this) +text=Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -- {1}{W}: Prevent all combat damage that would be dealt to and dealt by Deftblade Elite this turn. +mana={W} +type=Creature +subtype=Human Soldier +power=1 +toughness=1 +[/card] +[card] name=Defy Death target=creature|mygraveyard auto=moveto(mybattlefield) && transforms((,newability[if cantargetcard(angel) then counter(1/1.2)])) oneshot @@ -35181,6 +35229,7 @@ toughness=3 name=Embalmed Brawler auto=@combat(attacking) source(this):thisforeach(counter{1/1.1}) life:-1 controller auto=@combat(blocking) source(this):thisforeach(counter{1/1.1}) life:-1 controller +aicode=activate target(*[zombie]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[Zombie]|myhand) optionone foreach(*[Zombie]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Zombie card you reveal in your hand.) -- Whenever Embalmed Brawler attacks or blocks, you lose 1 life for each +1/+1 counter on it. mana={2}{B} @@ -39822,6 +39871,18 @@ power=6 toughness=3 [/card] [card] +name=Feral Throwback +aicode=activate target(*[beast]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1,2) )! +auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[beast]|myhand) optionone foreach(*[beast]|reveal) counter(1/1,2) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=Amplify 2 (As this creature enters the battlefield, put two +1/+1 counters on it for each Beast card you reveal in your hand.) -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) +mana={4}{G}{G} +type=Creature +subtype=Beast +power=3 +toughness=3 +[/card] +[card] name=Ferocious Charge target=creature auto=4/4 @@ -40227,6 +40288,13 @@ power=1 toughness=1 [/card] [card] +name=Fierce Invocation +auto=manifest and!( counter(1/1,2) )! all(*[zpos=1]|mylibrary) +text=Manifest the top card of your library, then put two +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) +mana={4}{R} +type=Sorcery +[/card] +[card] name=Fiery Conclusion auto=damage:5 target(creature) text=As an additional cost to cast Fiery Conclusion, sacrifice a creature. -- Fiery Conclusion deals 5 damage to target creature. @@ -40262,13 +40330,6 @@ mana={R} type=Instant [/card] [card] -name=Fierce Invocation -auto=manifest and!( counter(1/1,2) )! all(*[zpos=1]|mylibrary) -text=Manifest the top card of your library, then put two +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) -mana={4}{R} -type=Sorcery -[/card] -[card] name=Fiery Mantle target=creature autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand) @@ -45528,6 +45589,7 @@ type=Sorcery [/card] [card] name=Ghastly Remains +aicode=activate target(*[zombie]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[Zombie]|myhand) optionone foreach(*[Zombie]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend autograveyard={B}{B}{B}:moveTo(myhand) myUpkeepOnly text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Zombie card you reveal in your hand.) -- At the beginning of your upkeep, if Ghastly Remains is in your graveyard, you may pay {B}{B}{B}. If you do, return Ghastly Remains to your hand. @@ -46046,6 +46108,17 @@ power=7 toughness=7 [/card] [card] +name=Giant Ambush Beetle +abilities=haste +auto=may setblocker target(creature|opponentbattlefield) +text=Haste -- When Giant Ambush Beetle enters the battlefield, you may have target creature block it this turn if able. +mana={3}{BG}{R} +type=Creature +subtype=Insect +power=4 +toughness=3 +[/card] +[card] name=Giant Badger auto=@combat(blocking) source(this):2/2 ueot text=Whenever Giant Badger blocks, it gets +2/+2 until end of turn. @@ -47201,6 +47274,7 @@ toughness=3 [/card] [card] name=Glowering Rogon +aicode=activate target(*[beast]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[beast]|myhand) optionone foreach(*[beast]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Beast card you reveal in your hand.) mana={5}{G} @@ -47845,6 +47919,16 @@ power=6 toughness=6 [/card] [card] +name=Goblin Grappler +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) +mana={R} +type=Creature +subtype=Goblin +power=1 +toughness=1 +[/card] +[card] name=Goblin Grenade auto=damage:5 target(creature,player) text=As an additional cost to cast Goblin Grenade, sacrifice a Goblin. -- Goblin Grenade deals 5 damage to target creature or player. @@ -56228,6 +56312,16 @@ power=3 toughness=3 [/card] [card] +name=Hunter Sliver +auto=lord(sliver) transforms((,newability[@combat(attacking) source(this):may provoke target(creature|opponentbattlefield)])) +text=All Sliver creatures have provoke. (When a Sliver attacks, its controller may have target creature defending player controls untap and block it if able.) +mana={1}{R} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Hunter's Ambush auto=preventAllCombatDamage from(creature[-Green]) ueot text=Prevent all combat damage that would be dealt by nongreen creatures this turn. @@ -62772,6 +62866,7 @@ toughness=3 name=Kilnmouth Dragon abilities=flying auto={t}:target(creature,player) thisforeach(counter{1/1.1}) damage:1 +aicode=activate target(*[dragon]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1,3) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[Dragon]|myhand) optionone foreach(*[Dragon]|reveal) counter(1/1,3) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend text=Amplify 3 (As this creature enters the battlefield, put three +1/+1 counters on it for each Dragon card you reveal in your hand.) -- Flying -- {T}: Kilnmouth Dragon deals damage equal to the number of +1/+1 counters on it to target creature or player. mana={5}{R}{R} @@ -64653,6 +64748,17 @@ text=Krosan Verge enters the battlefield tapped. -- {T}: Add {1} to your mana po type=Land [/card] [card] +name=Krosan Vorine +abilities=oneblocker +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -- Krosan Vorine can't be blocked by more than one creature. +mana={3}{G} +type=Creature +subtype=Cat Beast +power=3 +toughness=2 +[/card] +[card] name=Krosan Warchief auto={1}{G}:regenerate target(beast) auto=lord(beast|mycastingzone) altercost(colorless,-1) @@ -68561,6 +68667,17 @@ power=3 toughness=3 [/card] [card] +name=Lowland Tracker +abilities=first strike +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=First strike -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) +mana={4}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Loxodon Anchorite auto={T}:prevent:2 target(creature,player) text={T}: Prevent the next 2 damage that would be dealt to target creature or player this turn. @@ -71823,6 +71940,13 @@ power=3 toughness=2 [/card] [card] +name=Master's Call +auto=token(Myr,Artifact Creature Myr,1/1)*2 +text=Put two 1/1 colorless Myr artifact creature tokens onto the battlefield. +mana={2}{W} +type=Instant +[/card] +[card] name=Mastery of the Unseen auto=@facedup(*|mybattlefield):life:type:creature:battlefield controller auto={3}{W}:manifest all(*[zpos=1]|mylibrary) @@ -71831,13 +71955,6 @@ mana={1}{W} type=Enchantment [/card] [card] -name=Master's Call -auto=token(Myr,Artifact Creature Myr,1/1)*2 -text=Put two 1/1 colorless Myr artifact creature tokens onto the battlefield. -mana={2}{W} -type=Instant -[/card] -[card] name=Masticore auto=upcost[{D(*|myhand)}] sacrifice auto={2}:damage:1 target(creature) @@ -71891,6 +72008,17 @@ power=2 toughness=2 [/card] [card] +name=Matsu-Tribe Decoy +auto={2}{G}:setblocker target(creature|opponentbattlefield) +auto=@combatdamaged(creature) from(this):all(trigger[to]) tap && all(trigger[to]) frozen +text={2}{G}: Target creature blocks Matsu-Tribe Decoy this turn if able. -- Whenever Matsu-Tribe Decoy deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step. +mana={2}{G} +type=Creature +subtype=Snake Warrior +power=1 +toughness=3 +[/card] +[card] name=Matsu-Tribe Sniper auto=@damaged(creature) from(this):all(trigger[to]) tap && all(trigger[to]) frozen auto={T}:damage:1 target(creature[flying]) @@ -74759,8 +74887,8 @@ type=Sorcery [/card] [card] name=Mist Dragon -auto={0}:flying -auto={0}:-flying +auto={0}:flying forever +auto={0}:-flying forever auto={3}{U}{U}:phaseout text={0}: Mist Dragon gains flying. (This effect lasts indefinitely.) -- {0}: Mist Dragon loses flying. (This effect lasts indefinitely.) -- {3}{U}{U}: Mist Dragon phases out. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.) mana={4}{U}{U} @@ -91686,6 +91814,16 @@ power=6 toughness=4 [/card] [card] +name=Rampant Elephant +auto={G}:setblocker target(creature|opponentbattlefield) +text={G}: Target creature blocks Rampant Elephant this turn if able. +mana={3}{W} +type=Creature +subtype=Elephant +power=2 +toughness=2 +[/card] +[card] name=Rampant Growth aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) auto=name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend @@ -116509,6 +116647,18 @@ power=3 toughness=3 [/card] [card] +name=Swooping Talon +abilities=flying +auto={1}:-flying ueot +auto=@combat(attacking) source(this):may provoke target(creature|opponentbattlefield) +text=Flying -- {1}: Swooping Talon loses flying until end of turn. -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) +mana={4}{W}{W} +type=Creature +subtype=Bird Soldier +power=2 +toughness=6 +[/card] +[card] name=Sword Dancer auto={W}{W}:-1/0 target(creature[attacking]) text={W}{W}: Target attacking creature gets -1/-0 until end of turn. @@ -117634,6 +117784,17 @@ mana={1}{W} type=Instant [/card] [card] +name=Tangle Angler +abilities=infect +auto={G}:setblocker target(creature|opponentbattlefield) +text=Infect (This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) -- {G}: Target creature blocks Tangle Angler this turn if able. +mana={3}{G} +type=Creature +subtype=Horror +power=1 +toughness=5 +[/card] +[card] name=Tangle Asp auto=@combat(blocking,blocked) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] destroy text=Whenever Tangle Asp blocks or becomes blocked by a creature, destroy that creature at end of combat. @@ -124486,6 +124647,16 @@ mana={2}{R} type=Instant [/card] [card] +name=Trumpeting Armodon +auto={1}{G}:setblocker target(creature|opponentbattlefield) +text={1}{G}: Target creature blocks Trumpeting Armodon this turn if able. +mana={3}{G} +type=Creature +subtype=Elephant +power=3 +toughness=3 +[/card] +[card] name=Trusted Advisor auto=hmodifer:2 controller auto=@each my upkeep:moveTo(ownerhand) notatarget(creature[blue]|myBattlefield) @@ -124755,6 +124926,17 @@ type=Instant mana={2}{U}{U} [/card] [card] +name=Turntimber Basilisk +abilities=deathtouch +auto=@movedTo(land|myBattlefield):may setblocker target(creature|opponentbattlefield) +text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) -- Landfall -- Whenever a land enters the battlefield under your control, you may have target creature block Turntimber Basilisk this turn if able. +mana={1}{G}{G} +type=Creature +subtype=Basilisk +power=2 +toughness=1 +[/card] +[card] name=Turntimber Grove auto=tap(noevent) auto=1/1 target(creature) ueot @@ -137186,6 +137368,7 @@ toughness=3 [card] name=Zombie Brute abilities=trample +aicode=activate target(*[zombie]|myhand) name(revealed card) moveto(myhand) name(revealed card) and!( all(this) counter(1/1) )! auto=Reveal:type:*:myhand revealzone(myhand) revealtype(*[Zombie]|myhand) optionone foreach(*[Zombie]|reveal) counter(1/1,1) optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend text=Amplify 1 (As this creature enters the battlefield, put a +1/+1 counter on it for each Zombie card you reveal in your hand.) -- Trample mana={6}{B} diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index b7fca30d1..80e0011bf 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -1584,15 +1584,6 @@ mana={4}{B} type=Instant [/card] [card] -name=Brontotherium -text=Trample -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -mana={4}{G}{G} -type=Creature -subtype=Beast -power=5 -toughness=3 -[/card] -[card] name=Bronze Bombshell text=When a player other than Bronze Bombshell's owner controls it, that player sacrifices it. If the player does, Bronze Bombshell deals 7 damage to him or her. mana={4} @@ -1677,15 +1668,6 @@ power=3 toughness=3 [/card] [card] -name=Burning-Tree Bloodscale -text=Bloodthirst 1 (If an opponent was dealt damage this turn, this creature enters the battlefield with a +1/+1 counter on it.) -- {2}{R}: Target creature can't block Burning-Tree Bloodscale this turn. -- {2}{G}: Target creature blocks Burning-Tree Bloodscale this turn if able. -mana={2}{R}{G} -type=Creature -subtype=Viashino Berserker -power=2 -toughness=2 -[/card] -[card] name=Burning-Tree Shaman text=Whenever a player activates an ability that isn't a mana ability, Burning-Tree Shaman deals 1 damage to that player. mana={1}{R}{G} @@ -2947,15 +2929,6 @@ mana={3}{B} type=Enchantment [/card] [card] -name=Crested Craghorn -text=Haste -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -mana={4}{R} -type=Creature -subtype=Goat Beast -power=4 -toughness=1 -[/card] -[card] name=Crime // Punishment text=Put target creature or enchantment card from an opponent's graveyard onto the battlefield under your control. -- // -- Destroy each artifact, creature, and enchantment with converted mana cost X. mana={3}{W}{B} // {X}{B}{G} @@ -3533,15 +3506,6 @@ mana={3}{U} type=Instant [/card] [card] -name=Deftblade Elite -text=Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -- {1}{W}: Prevent all combat damage that would be dealt to and dealt by Deftblade Elite this turn. -mana={W} -type=Creature -subtype=Human Soldier -power=1 -toughness=1 -[/card] -[card] name=Degavolver text=Kicker {1}{B} and/or {R} (You may pay an additional {1}{B} and/or {R} as you cast this spell.) -- If Degavolver was kicked with its {1}{B} kicker, it enters the battlefield with two +1/+1 counters on it and with "Pay 3 life: Regenerate Degavolver." -- If Degavolver was kicked with its {R} kicker, it enters the battlefield with a +1/+1 counter on it and with first strike. mana={1}{W} @@ -4873,15 +4837,6 @@ power=0 toughness=0 [/card] [card] -name=Feral Throwback -text=Amplify 2 (As this creature enters the battlefield, put two +1/+1 counters on it for each Beast card you reveal in your hand.) -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -mana={4}{G}{G} -type=Creature -subtype=Beast -power=3 -toughness=3 -[/card] -[card] name=Ferropede text=Ferropede is unblockable. -- Whenever Ferropede deals combat damage to a player, you may remove a counter from target permanent. mana={3} @@ -5605,15 +5560,6 @@ power=1 toughness=1 [/card] [card] -name=Giant Ambush Beetle -text=Haste -- When Giant Ambush Beetle enters the battlefield, you may have target creature block it this turn if able. -mana={3}{BG}{R} -type=Creature -subtype=Insect -power=4 -toughness=3 -[/card] -[card] name=Giant Oyster text=You may choose not to untap Giant Oyster during your untap step. -- {T}: For as long as Giant Oyster remains tapped, target tapped creature doesn't untap during its controller's untap step, and at the beginning of each of your draw steps, put a -1/-1 counter on that creature. When Giant Oyster leaves the battlefield or becomes untapped, remove all -1/-1 counters from the creature. mana={2}{U}{U} @@ -5946,15 +5892,6 @@ mana={5}{R}{R} type=Sorcery [/card] [card] -name=Goblin Grappler -text=Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -mana={R} -type=Creature -subtype=Goblin -power=1 -toughness=1 -[/card] -[card] name=Goblin Grenadiers text=Whenever Goblin Grenadiers attacks and isn't blocked, you may sacrifice it. If you do, destroy target creature and target land. mana={3}{R} @@ -6985,15 +6922,6 @@ mana={G} type=Sorcery [/card] [card] -name=Hunter Sliver -text=All Sliver creatures have provoke. (When a Sliver attacks, its controller may have target creature defending player controls untap and block it if able.) -mana={1}{R} -type=Creature -subtype=Sliver -power=1 -toughness=1 -[/card] -[card] name=Hushwing Gryff text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- Creatures entering the battlefield don't cause abilities to trigger. mana={2}{W} @@ -8365,15 +8293,6 @@ power=3 toughness=3 [/card] [card] -name=Krosan Vorine -text=Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -- Krosan Vorine can't be blocked by more than one creature. -mana={3}{G} -type=Creature -subtype=Cat Beast -power=3 -toughness=2 -[/card] -[card] name=Krovikan Vampire text=At the beginning of each end step, if a creature dealt damage by Krovikan Vampire this turn died, put that card onto the battlefield under your control. Sacrifice it when you lose control of Krovikan Vampire. mana={3}{B}{B} @@ -8909,15 +8828,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Lowland Tracker -text=First strike -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -mana={4}{W} -type=Creature -subtype=Human Soldier -power=2 -toughness=2 -[/card] -[card] name=Loxodon Smiter text=Loxodon Smiter can't be countered. -- If a spell or ability an opponent controls causes you to discard Loxodon Smiter, put it onto the battlefield instead of putting it into your graveyard. mana={1}{G}{W} @@ -9329,15 +9239,6 @@ type=Artifact subtype=Equipment [/card] [card] -name=Matsu-Tribe Decoy -text={2}{G}: Target creature blocks Matsu-Tribe Decoy this turn if able. -- Whenever Matsu-Tribe Decoy deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step. -mana={2}{G} -type=Creature -subtype=Snake Warrior -power=1 -toughness=3 -[/card] -[card] name=May Civilization Collapse text=When you set this scheme in motion, target opponent chooses self or others. If that player chooses self, he or she sacrifices two lands. If the player chooses others, each of your other opponents sacrifices a land. type=Scheme @@ -12284,15 +12185,6 @@ mana={5}{R} type=Sorcery [/card] [card] -name=Rampant Elephant -text={G}: Target creature blocks Rampant Elephant this turn if able. -mana={3}{W} -type=Creature -subtype=Elephant -power=2 -toughness=2 -[/card] -[card] name=Rapid Fire text=Cast Rapid Fire only before blockers are declared. -- Target creature gains first strike until end of turn. If it doesn't have rampage, that creature gains rampage 2 until end of turn. (Whenever this creature becomes blocked, it gets +2/+2 until end of turn for each creature blocking it beyond the first.) mana={3}{W} @@ -15675,15 +15567,6 @@ mana={4}{U} type=Sorcery [/card] [card] -name=Swooping Talon -text=Flying -- {1}: Swooping Talon loses flying until end of turn. -- Provoke (When this attacks, you may have target creature defending player controls untap and block it if able.) -mana={4}{W}{W} -type=Creature -subtype=Bird Soldier -power=2 -toughness=6 -[/card] -[card] name=Sword of the Ages text=Sword of the Ages enters the battlefield tapped. -- {T}, Sacrifice Sword of the Ages and any number of creatures you control: Sword of the Ages deals X damage to target creature or player, where X is the total power of the creatures sacrificed this way, then exile Sword of the Ages and those creature cards. mana={6} @@ -15827,15 +15710,6 @@ type=Planeswalker subtype=Tamiyo [/card] [card] -name=Tangle Angler -text=Infect (This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) -- {G}: Target creature blocks Tangle Angler this turn if able. -mana={3}{G} -type=Creature -subtype=Horror -power=1 -toughness=5 -[/card] -[card] name=Tangle Wire text=Fading 4 (This artifact enters the battlefield with four fade counters on it. At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.) -- At the beginning of each player's upkeep, that player taps an untapped artifact, creature, or land he or she controls for each fade counter on Tangle Wire. mana={3} @@ -16593,15 +16467,6 @@ type=Plane subtype=Ergamon [/card] [card] -name=Trumpeting Armodon -text={1}{G}: Target creature blocks Trumpeting Armodon this turn if able. -mana={3}{G} -type=Creature -subtype=Elephant -power=3 -toughness=3 -[/card] -[card] name=Truth or Tale text=Reveal the top five cards of your library and separate them into two piles. An opponent chooses one of those piles. Put a card from the chosen pile into your hand, then put all other cards revealed this way on the bottom of your library in any order. mana={1}{U} @@ -16662,15 +16527,6 @@ mana={3}{W}{W} type=Instant [/card] [card] -name=Turntimber Basilisk -text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) -- Landfall — Whenever a land enters the battlefield under your control, you may have target creature block Turntimber Basilisk this turn if able. -mana={1}{G}{G} -type=Creature -subtype=Basilisk -power=2 -toughness=1 -[/card] -[card] name=Turri Island text=Creature spells cost {2} less to cast. -- Whenever you roll {C}, reveal the top three cards of your library. Put all creature cards revealed this way into your hand and the rest into your graveyard. type=Plane diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index a58c6e344..c34159c5e 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -7120,8 +7120,8 @@ public: if(mt.size()) { MTGAbility * fd = af.parseMagicLine(mt, GetId(), NULL, copy); - if(fd && isCreature) - { + if(fd) + {//allow morph to all if it exists fd->target = copy; if(fd->oneShot) { @@ -7165,6 +7165,63 @@ public: return NEW AManifest(*this); } }; +//provoke +class AProvoke: public InstantAbility +{ +public: + bool setblocker; + MTGAbility * andAbility; + AProvoke(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target) : + InstantAbility(observer, _id, _source) + { + target = _target; + andAbility = NULL; + setblocker = false; + } + + int resolve() + { + MTGCardInstance * card = (MTGCardInstance *) target; + if (card) + { + card->isProvoked = true; + card->Provoker = source; + if(!setblocker)//not provoke + card->untap(); + source->ProvokeTarget = card; + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = card; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } + } + return 1; + } + const string getMenuText() + { + if(setblocker) + return "Set Blocker"; + return "Provoke"; + } + virtual ostream& toString(ostream& out) const + { + out << "AAProvoke ::: ("; + return InstantAbility::toString(out) << ")"; + } + AProvoke * clone() const + { + return NEW AProvoke(*this); + } +}; //------------------ // utility functions diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index d8182f641..a29ac5c2e 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -68,6 +68,9 @@ public: bool damageToOpponent; bool damageToController; bool damageToCreature; + bool isProvoked; + MTGCardInstance * ProvokeTarget; + MTGCardInstance * Provoker; bool mPropertiesChangedSinceLastUpdate; int reduxamount; int flanked; diff --git a/projects/mtg/include/MTGGameZones.h b/projects/mtg/include/MTGGameZones.h index 90a4d48eb..65a022d28 100644 --- a/projects/mtg/include/MTGGameZones.h +++ b/projects/mtg/include/MTGGameZones.h @@ -186,7 +186,9 @@ public: void untapAll(); MTGCardInstance * getNextAttacker(MTGCardInstance * previous); MTGCardInstance * getNextLurer(MTGCardInstance * previous); + MTGCardInstance * getNextProvoker(MTGCardInstance * previous, MTGCardInstance * source); MTGCardInstance * findALurer(); + MTGCardInstance * findAProvoker(MTGCardInstance * source); virtual ostream& toString(ostream&) const; const char * getName(){return "battlefield";} }; diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index f2b9ef22c..f9c60293d 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -984,6 +984,20 @@ void GameObserver::gameStateBasedEffects() } } } + ///provoke clear/// + if (mCurrentGamePhase == MTG_PHASE_COMBATEND) + { + for (int l = z->nb_cards - 1; l >= 0; l--) + { + MTGCardInstance * c = z->cards[l]; + if(c) + { + c->isProvoked = false; + c->ProvokeTarget = NULL; + c->Provoker = NULL; + } + } + } ///////////////////////////////////////////////// //handle end of turn effects while we're at it.// ///////////////////////////////////////////////// @@ -1011,6 +1025,9 @@ void GameObserver::gameStateBasedEffects() c->combatdamageToOpponent = false; c->damageToCreature = false; c->isAttacking = NULL; + c->isProvoked = false; + c->ProvokeTarget = NULL; + c->Provoker = NULL; } for (int jj = z->nb_cards - 1; jj >= 0; jj--) { diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 19ee9b317..746de1d19 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2910,6 +2910,36 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } + //provoke + found = s.find("provoke"); + if (found != string::npos) + { + MTGAbility * a = NEW AProvoke(observer, id, card, target); + a->oneShot = 1; + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((AProvoke*)a)->andAbility = parseMagicLine(stored, id, spell, card); + } + return a; + } + //setblocker + found = s.find("setblocker"); + if (found != string::npos) + { + MTGAbility * a = NEW AProvoke(observer, id, card, target); + a->oneShot = 1; + ((AProvoke*)a)->setblocker = true; + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((AProvoke*)a)->andAbility = parseMagicLine(stored, id, spell, card); + } + return a; + } + //clone found = s.find("clone"); if (found != string::npos) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 7849432c3..81d6c68ae 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -242,6 +242,9 @@ void MTGCardInstance::initMTGCI() damageToOpponent = false; damageToController = false; damageToCreature = false; + isProvoked = false; + ProvokeTarget = NULL; + Provoker = NULL; wasDealtDamage = false; isDualWielding = false; suspended = false; diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 9c9baa4fa..70c9aea9b 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -1015,6 +1015,43 @@ MTGCardInstance * MTGInPlay::getNextLurer(MTGCardInstance * previous) return NULL; } +MTGCardInstance * MTGInPlay::getNextProvoker(MTGCardInstance * previous, MTGCardInstance * thiscard) +{ + int foundprevious = 0; + if (previous == NULL) + { + foundprevious = 1; + } + for (int i = 0; i < nb_cards; i++) + { + MTGCardInstance * current = cards[i]; + if (current == previous) + { + foundprevious = 1; + } + else if (foundprevious && current->isAttacker() && thiscard->isProvoked && current->ProvokeTarget) + { + if(thiscard == current->ProvokeTarget) + return current; + } + } + return NULL; +} + +MTGCardInstance * MTGInPlay::findAProvoker(MTGCardInstance * thiscard) +{ + for (int i = 0; i < nb_cards; i++) + { + MTGCardInstance * current = cards[i]; + if (current->isAttacker() && current->ProvokeTarget) + { + if(current->ProvokeTarget == thiscard) + return current; + } + } + return NULL; +} + MTGCardInstance * MTGInPlay::findALurer() { for (int i = 0; i < nb_cards; i++) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 42890c21e..eb78a8027 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -2259,23 +2259,31 @@ int MTGBlockRule::receiveEvent(WEvent *e) for (size_t i = 0; i < tf->cards.size(); i++) { MTGCardInstance * card = tf->cards[i]; - if (card->has(Constants::MUSTBLOCK) && !card->defenser && card->canBlock()) + if ((card->has(Constants::MUSTBLOCK) || card->isProvoked) && !card->defenser && card->canBlock()) {//force mustblockers to block the first thing theyre allowed to block if player leaves blockers with them //unassigned as a block. - for (size_t i = 0; i < Attacker.size(); i++) + if(!card->isProvoked) { - if (card->canBlock(Attacker[i]) && !card->defenser) + for (size_t i = 0; i < Attacker.size(); i++) { - blocker = NEW AABlock(card->getObserver(), -1, card, NULL); - blocker->oneShot = true; - blocker->forceDestroy = 1; - blocker->canBeInterrupted = false; - blocker->target = Attacker[i]; - blocker->resolve(); - SAFE_DELETE(blocker); + if (card->canBlock(Attacker[i]) && !card->defenser) + { + blocker = NEW AABlock(card->getObserver(), -1, card, NULL); + blocker->oneShot = true; + blocker->forceDestroy = 1; + blocker->canBeInterrupted = false; + blocker->target = Attacker[i]; + blocker->resolve(); + SAFE_DELETE(blocker); + } } } - + else + { + MTGCardInstance * provoker = card->Provoker; + if(provoker && card->canBlock(provoker) && card->blockCost < 1) + card->setDefenser(provoker); + } } } @@ -2370,6 +2378,19 @@ int MTGBlockRule::reactToClick(MTGCardInstance * card) else card->toggleDefenser(NULL); } + else if(card->isProvoked) + { + while (!result) + { + currentOpponent = game->currentPlayer->game->inPlay->getNextProvoker(currentOpponent, card); + canDefend = card->toggleDefenser(currentOpponent); + + DebugTrace("Defenser Toggle: " << card->getName() << endl + << "- canDefend: " << (canDefend == 0) << endl + << "- currentOpponent: " << currentOpponent); + result = (canDefend || currentOpponent == NULL); + } + } else { bool lured = false; diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 29c26ca85..2c9ae424e 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -1819,9 +1819,20 @@ bool BlockableChooser::canTarget(Targetable * target,bool withoutProtections) } if(lured && card->controller()->inPlay()->hasAbility(Constants::LURE) && !card->has(Constants::LURE)) return false; + //provoke + bool provoked = false; + MTGCardInstance * provoker = observer->currentPlayer->game->inPlay->findAProvoker(source); + if(provoker) + { + provoked = true; + } + if(provoked && source->isProvoked && !card->ProvokeTarget) + return false; + if(provoked && source->isProvoked && card->ProvokeTarget && card->ProvokeTarget != source) + return false; return true; } - return TypeTargetChooser::canTarget(target,withoutProtections); + return false;//TypeTargetChooser::canTarget(target,withoutProtections); } BlockableChooser* BlockableChooser::clone() const