Merge pull request #862 from kevlahnota/master

"blocked" attribute & add some cards
This commit is contained in:
Anthony Calosa
2016-08-18 18:55:28 +08:00
committed by GitHub
5 changed files with 110 additions and 3 deletions
@@ -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.) 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]
[card] [card]
name=Eureka
auto=ability$! moveto(ownerbattlefield) notatarget(<anyamount>artifact,creature,enchantment,land,planeswalker|myhand) !$ controller
auto=ability$! moveto(ownerbattlefield) notatarget(<anyamount>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 name=Feral Hydra
type=Creature type=Creature
subtype=Hydra Beast subtype=Hydra Beast
+66 -3
View File
@@ -40424,6 +40424,18 @@ text=Forsaken Sanctuary enters the battlefield tapped. -- {T}: Add {W} or {B} to
type=Land type=Land
[/card] [/card]
[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 name=Fortified Rampart
abilities=defender abilities=defender
text=Defender text=Defender
@@ -48772,6 +48784,13 @@ power=2
toughness=3 toughness=3
[/card] [/card]
[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 name=Hammerheim Deadeye
auto=destroy target(creature[flying]) auto=destroy target(creature[flying])
auto=upcost[{5}{R};next upkeep] sacrifice auto=upcost[{5}{R};next upkeep] sacrifice
@@ -53226,6 +53245,16 @@ power=4
toughness=3 toughness=3
[/card] [/card]
[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 name=Ichor Explosion
target=creature|myBattlefield target=creature|myBattlefield
auto=all(creature) -storedpower/-storedpower auto=all(creature) -storedpower/-storedpower
@@ -71963,6 +71992,16 @@ power=1
toughness=1 toughness=1
[/card] [/card]
[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 name=Muck Rats
mana={B} mana={B}
type=Creature type=Creature
@@ -72118,6 +72157,16 @@ power=3
toughness=3 toughness=3
[/card] [/card]
[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 name=Murasa Pyromancer
auto=may damage:type:ally:mybattlefield target(creature) auto=may damage:type:ally:mybattlefield target(creature)
auto=@movedTo(ally|mybattlefield):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 toughness=1
[/card] [/card]
[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 name=Repay in Kind
auto=all(player) lifeset:lowestlifetotal auto=all(player) lifeset:lowestlifetotal
text=Each player's life total becomes the lowest life total among all players. text=Each player's life total becomes the lowest life total among all players.
@@ -109706,7 +109762,7 @@ toughness=2
[card] [card]
name=Tajuru Beastmaster name=Tajuru Beastmaster
auto=choice all(creature|mybattlefield) 1/1 ueot 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. 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} mana={5}{G}
type=Creature type=Creature
@@ -109737,7 +109793,7 @@ toughness=1
[card] [card]
name=Tajuru Warcaller name=Tajuru Warcaller
auto=choice all(creature|mybattlefield) 2/2 ueot 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. 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} mana={3}{G}{G}
type=Creature type=Creature
@@ -110423,7 +110479,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Tattermunge Witch 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. text={R}{G}: Each blocked creature gets +1/+0 and gains trample until end of turn.
mana={1}{RG} mana={1}{RG}
type=Creature type=Creature
@@ -115977,6 +116033,13 @@ power=3
toughness=3 toughness=3
[/card] [/card]
[card] [card]
name=Triangle of War
auto={2}{S}:name(powerstrike) target(creature|mybattlefield) transforms((,newability[dynamicability<!powerstrike eachother!> 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 name=Triassic Egg
auto={3}{T}:counter(0/0,1,Hatchling) auto={3}{T}:counter(0/0,1,Hatchling)
auto={C(0/0,-2,Hatchling)}{S}:moveTo(myBattlefield) target(creature|myhand,mygraveyard) auto={C(0/0,-2,Hatchling)}{S}:moveTo(myBattlefield) target(creature|myhand,mygraveyard)
+1
View File
@@ -66,6 +66,7 @@ class CardDescriptor: public MTGCardInstance
int CDcontrollerDamaged; int CDcontrollerDamaged;
int CDdamager; int CDdamager;
int CDgeared; int CDgeared;
int CDblocked;
}; };
#endif #endif
+23
View File
@@ -25,6 +25,7 @@ CardDescriptor::CardDescriptor()
CDcontrollerDamaged = 0; CDcontrollerDamaged = 0;
CDdamager = 0; CDdamager = 0;
CDgeared = 0; CDgeared = 0;
CDblocked = 0;
} }
int CardDescriptor::init() int CardDescriptor::init()
@@ -217,6 +218,28 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
match = NULL; 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)) if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
{ {
match = NULL; match = NULL;
+12
View File
@@ -408,6 +408,18 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
cd->defenser = &MTGCardInstance::AnyCard; cd->defenser = &MTGCardInstance::AnyCard;
} }
} }
//Blocked
else if (attribute.find("blocked") != string::npos)
{
if (minus)
{
cd->CDblocked = -1;
}
else
{
cd->CDblocked = 1;
}
}
//Tapped, untapped //Tapped, untapped
else if (attribute.find("tapped") != string::npos) else if (attribute.find("tapped") != string::npos)
{ {