diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 574744bc9..b963e5517 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -85,6 +85,14 @@ type=Instant text=Target creature you control gains protection from the color of your choice until end of turn. Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) [/card] [card] +name=Eureka +auto=ability$! moveto(ownerbattlefield) notatarget(artifact,creature,enchantment,land,planeswalker|myhand) !$ controller +auto=ability$! moveto(ownerbattlefield) notatarget(artifact,creature,enchantment,land,planeswalker|myhand) !$ opponent +text=Starting with you, each player may put a permanent card from his or her hand onto the battlefield. Repeat this process until no one puts a card onto the battlefield. +mana={2}{G}{G} +type=Sorcery +[/card] +[card] name=Feral Hydra type=Creature subtype=Hydra Beast diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 3c80e3973..cfb0a9ae9 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -40424,6 +40424,18 @@ text=Forsaken Sanctuary enters the battlefield tapped. -- {T}: Add {W} or {B} to type=Land [/card] [card] +name=Forsaken Wastes +abilities=nolifegain,nolifegainopponent +auto=@each my upkeep:life:-1 controller +auto=@each opponent upkeep:life:-1 opponent +auto=@targeted(this) from(*|mystack):life:-5 controller +auto=@targeted(this) from(*|opponentstack):life:-5 opponent +auto=@movedTo(enchantment[world]|battlefield):sacrifice all(this) +text=Players can't gain life. -- At the beginning of each player's upkeep, that player loses 1 life. -- Whenever Forsaken Wastes becomes the target of a spell, that spell's controller loses 5 life. +mana={2}{B} +type=World Enchantment +[/card] +[card] name=Fortified Rampart abilities=defender text=Defender @@ -48772,6 +48784,13 @@ power=2 toughness=3 [/card] [card] +name=Hammerheim +auto={t}:add{r} +auto={t}:name(lose all landwalk) target(creature) transforms((,newability[-forestwalk],newability[-islandwalk],newability[-mountainwalk],newability[-swampwalk],newability[-plainswalk],newability[-snowlandwalk],newability[-nonbasiclandwalk],newability[-legendarylandwalk],newability[-desertlandwalk],newability[-snowforestlandwalk],newability[-snowplainslandwalk],newability[-snowmountainlandwalk],newability[-snowislandlandwalk],newability[-snowswamplandwalk])) ueot +text={T}: Add {R} to your mana pool. -- -- {T}: Target creature loses all landwalk abilities until end of turn. +type=Legendary Land +[/card] +[card] name=Hammerheim Deadeye auto=destroy target(creature[flying]) auto=upcost[{5}{R};next upkeep] sacrifice @@ -53226,6 +53245,16 @@ power=4 toughness=3 [/card] [card] +name=Ichneumon Druid +auto=@movedto(instant|opponentstack) restriction{thisturn(instant|opponentstack)~morethan~1}:damage:4 opponent +text=Whenever an opponent casts an instant spell other than the first instant spell that player casts each turn, Ichneumon Druid deals 4 damage to him or her. +mana={1}{G}{G} +type=Creature +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] name=Ichor Explosion target=creature|myBattlefield auto=all(creature) -storedpower/-storedpower @@ -71963,6 +71992,16 @@ power=1 toughness=1 [/card] [card] +name=Mtenda Lion +auto=@combat(attacking) source(this):name(pay 1 blue mana nodamage) ability$!pay[[{U}]] fog from(mystored)!$ opponent +text=Whenever Mtenda Lion attacks, defending player may pay {U}. If that player does, prevent all combat damage that would be dealt by Mtenda Lion this turn. +mana={G} +type=Creature +subtype=Cat +power=2 +toughness=1 +[/card] +[card] name=Muck Rats mana={B} type=Creature @@ -72118,6 +72157,16 @@ power=3 toughness=3 [/card] [card] +name=Mundungu +auto={T}:name(counter spell) target(*|stack) transforms((,newability[pay[[{1}{L}]] name(pay 1 mana & 1 life) donothing?fizzle])) forever +text={T}: Counter target spell unless its controller pays {1} and 1 life. +mana={1}{U}{B} +type=Creature +subtype=Human Wizard +power=1 +toughness=1 +[/card] +[card] name=Murasa Pyromancer auto=may damage:type:ally:mybattlefield target(creature) auto=@movedTo(ally|mybattlefield):may damage:type:ally:mybattlefield target(creature) @@ -87755,6 +87804,13 @@ power=1 toughness=1 [/card] [card] +name=Reparations +auto=@targeted(creature|mybattlefield) from(*|opponentstack):may draw:1 controller +text=Whenever an opponent casts a spell that targets you or a creature you control, you may draw a card. +mana={1}{W}{U} +type=Enchantment +[/card] +[card] name=Repay in Kind auto=all(player) lifeset:lowestlifetotal text=Each player's life total becomes the lowest life total among all players. @@ -109706,7 +109762,7 @@ toughness=2 [card] name=Tajuru Beastmaster auto=choice all(creature|mybattlefield) 1/1 ueot -auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) 1/1 ueot +auto=@movedTo(other ally|myBattlefield):all(creature|mybattlefield) 1/1 ueot text=Rally — Whenever Tajuru Beastmaster or another Ally enters the battlefield under your control, creatures you control get +1/+1 until end of turn. mana={5}{G} type=Creature @@ -109737,7 +109793,7 @@ toughness=1 [card] name=Tajuru Warcaller auto=choice all(creature|mybattlefield) 2/2 ueot -auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) 2/2 ueot +auto=@movedTo(other ally|myBattlefield):all(creature|mybattlefield) 2/2 ueot text=Rally — Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn. mana={3}{G}{G} type=Creature @@ -110423,7 +110479,7 @@ toughness=1 [/card] [card] name=Tattermunge Witch -auto={R}{G}:lord(creature[blocked]) 1/0 && lord(creature[blocked]) trample +auto={R}{G}:name(1/0 & trample) all(creature[blocked]) transforms((,newability[1/0],newability[trample])) ueot text={R}{G}: Each blocked creature gets +1/+0 and gains trample until end of turn. mana={1}{RG} type=Creature @@ -115977,6 +116033,13 @@ power=3 toughness=3 [/card] [card] +name=Triangle of War +auto={2}{S}:name(powerstrike) target(creature|mybattlefield) transforms((,newability[dynamicability target(creature|opponentbattlefield)])) forever +text={2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.) +mana={1} +type=Artifact +[/card] +[card] name=Triassic Egg auto={3}{T}:counter(0/0,1,Hatchling) auto={C(0/0,-2,Hatchling)}{S}:moveTo(myBattlefield) target(creature|myhand,mygraveyard) diff --git a/projects/mtg/include/CardDescriptor.h b/projects/mtg/include/CardDescriptor.h index 96db093cb..b4808d2bb 100644 --- a/projects/mtg/include/CardDescriptor.h +++ b/projects/mtg/include/CardDescriptor.h @@ -66,6 +66,7 @@ class CardDescriptor: public MTGCardInstance int CDcontrollerDamaged; int CDdamager; int CDgeared; + int CDblocked; }; #endif diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 4964d5ef5..149e4cdee 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -25,6 +25,7 @@ CardDescriptor::CardDescriptor() CDcontrollerDamaged = 0; CDdamager = 0; CDgeared = 0; + CDblocked = 0; } int CardDescriptor::init() @@ -216,6 +217,28 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card) { match = NULL; } + + if (CDblocked == -1) + { + if(!card->isAttacker()) + match = NULL; + else + { + if(card->isBlocked()) + match = NULL; + } + } + + if (CDblocked == 1) + { + if(!card->isAttacker()) + match = NULL; + else + { + if(!card->isBlocked()) + match = NULL; + } + } if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored)) { diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 82f410eaf..f3373d42f 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -408,6 +408,18 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta cd->defenser = &MTGCardInstance::AnyCard; } } + //Blocked + else if (attribute.find("blocked") != string::npos) + { + if (minus) + { + cd->CDblocked = -1; + } + else + { + cd->CDblocked = 1; + } + } //Tapped, untapped else if (attribute.find("tapped") != string::npos) {