add some restrictions

This commit is contained in:
Anthony Calosa
2017-02-03 07:59:13 +08:00
parent ea09b1f6bc
commit d26e9da6c4
2 changed files with 57 additions and 18 deletions
+19 -18
View File
@@ -11944,9 +11944,10 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Blood Tribute name=Blood Tribute
target=opponent
auto=life:-halfdownopponentlifetotal targetedplayer
auto=alternative life:opponentlifetotal controller
text=Kicker - Tap an untapped Vampire you control. (You may tap a Vampire you control in addition to any other costs as you cast this spell.) -- Target opponent loses half his or her life, rounded up. If Blood Tribute was kicked, you gain life equal to the life lost this way. text=Kicker - Tap an untapped Vampire you control. (You may tap a Vampire you control in addition to any other costs as you cast this spell.) -- Target opponent loses half his or her life, rounded up. If Blood Tribute was kicked, you gain life equal to the life lost this way.
auto=life:-halfdownopponentlifetotal opponent
auto=life:opponentlifetotal controller
mana={4}{B}{B} mana={4}{B}{B}
other={4}{b}{b}{t(vampire|mybattlefield)} name(Pay Kicker) other={4}{b}{b}{t(vampire|mybattlefield)} name(Pay Kicker)
type=Sorcery type=Sorcery
@@ -23970,7 +23971,7 @@ type=Instant
name=Crypt of Agadeem name=Crypt of Agadeem
auto=tap(noevent) auto=tap(noevent)
auto={T}:Add{B} auto={T}:Add{B}
auto={2}{T}:foreach(creature[black]|mygraveyard) Add{B} auto={2}{T}:name(foreach add black mana) foreach(creature[black]|mygraveyard) Add{B}
text=Crypt of Agadeem enters the battlefield tapped. -- {T}: Add {B} to your mana pool. -- {2}, {T}: Add {B} to your mana pool for each black creature card in your graveyard. text=Crypt of Agadeem enters the battlefield tapped. -- {T}: Add {B} to your mana pool. -- {2}, {T}: Add {B} to your mana pool for each black creature card in your graveyard.
type=Land type=Land
[/card] [/card]
@@ -46940,8 +46941,8 @@ toughness=1
[/card] [/card]
[card] [card]
name=Goblin Goon name=Goblin Goon
auto=@each my attackers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantattack)) ueot auto=while(restriction{lessorequalcreatures}) cantattack
auto=@each my blockers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantblock)) ueot auto=while(restriction{lessorequalcreatures}) cantblock
text=Goblin Goon can't attack unless you control more creatures than defending player. -- Goblin Goon can't block unless you control more creatures than attacking player. text=Goblin Goon can't attack unless you control more creatures than defending player. -- Goblin Goon can't block unless you control more creatures than attacking player.
mana={3}{R} mana={3}{R}
type=Creature type=Creature
@@ -60999,7 +61000,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Keeper of the Flame name=Keeper of the Flame
auto={R}{T}:if compare(lifetotal)~lessthan~compare(opponentlifetotal) then damage:2 opponent auto={R}{T}:damage:2 opponent restriction{compare(lifetotal)~lessthan~compare(opponentlifetotal)}
text={R}, {T}: Choose target opponent who had more life than you did as you activated this ability. Keeper of the Flame deals 2 damage to him or her. text={R}, {T}: Choose target opponent who had more life than you did as you activated this ability. Keeper of the Flame deals 2 damage to him or her.
mana={R}{R} mana={R}{R}
type=Creature type=Creature
@@ -61009,7 +61010,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Keeper of the Light name=Keeper of the Light
auto={W}{T}:if compare(lifetotal)~lessthan~compare(opponentlifetotal) then life:3 controller auto={W}{T}:life:3 controller restriction{compare(lifetotal)~lessthan~compare(opponentlifetotal)}
text={W}, {T}: Choose target opponent who had more life than you did as you activated this ability. You gain 3 life. text={W}, {T}: Choose target opponent who had more life than you did as you activated this ability. You gain 3 life.
mana={W}{W} mana={W}{W}
type=Creature type=Creature
@@ -67744,8 +67745,8 @@ subtype=Aura
[card] [card]
name=Lurker name=Lurker
abilities=shroud abilities=shroud
auto=@combat(attacking) source(this):name(loses shroud) -shroud ueot auto=while(restriction{didblock}) transforms((,newability[-shroud])) ueot
auto=@combat(blocking) source(this):name(loses shroud) -shroud ueot auto=while(restriction{didattack}) transforms((,newability[-shroud])) ueot
text=Lurker can't be the target of spells unless it attacked or blocked this turn. text=Lurker can't be the target of spells unless it attacked or blocked this turn.
mana={2}{G} mana={2}{G}
type=Creature type=Creature
@@ -73930,8 +73931,8 @@ toughness=3
[/card] [/card]
[card] [card]
name=Mogg Toady name=Mogg Toady
auto=@each my attackers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantattack)) ueot auto=while(restriction{lessorequalcreatures}) cantattack
auto=@each my blockers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantblock)) ueot auto=while(restriction{lessorequalcreatures}) cantblock
text=Mogg Toady can't attack unless you control more creatures than defending player. -- Mogg Toady can't block unless you control more creatures than attacking player. text=Mogg Toady can't attack unless you control more creatures than defending player. -- Mogg Toady can't block unless you control more creatures than attacking player.
mana={1}{R} mana={1}{R}
type=Creature type=Creature
@@ -74460,8 +74461,8 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Monstrous Hound name=Monstrous Hound
auto=@each my attackers:if type(land|opponentbattlefield)~morethan~type(land|mybattlefield) then transforms((,cantattack)) ueot auto=while(restriction{lessorequallands}) cantattack
auto=@each my blockers:if type(land|opponentbattlefield)~morethan~type(land|mybattlefield) then transforms((,cantblock)) ueot auto=while(restriction{lessorequallands}) cantblock
text=Monstrous Hound can't attack unless you control more lands than defending player. -- Monstrous Hound can't block unless you control more lands than attacking player. text=Monstrous Hound can't attack unless you control more lands than defending player. -- Monstrous Hound can't block unless you control more lands than attacking player.
mana={3}{R} mana={3}{R}
type=Creature type=Creature
@@ -89051,7 +89052,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Rackling name=Rackling
auto=@each opponent upkeep:damage:0 && if type(*|opponenthand)~equalto~2 then damage:1 opponent && if type(*|opponenthand)~equalto~1 then damage:2 opponent && if type(*|opponenthand)~equalto~0 then damage:3 opponent auto=@each opponent upkeep:damage:3minustype:*:opponenthandminusend opponent
text=At the beginning of each opponent's upkeep, Rackling deals X damage to that player, where X is 3 minus the number of cards in his or her hand. text=At the beginning of each opponent's upkeep, Rackling deals X damage to that player, where X is 3 minus the number of cards in his or her hand.
mana={4} mana={4}
type=Artifact Creature type=Artifact Creature
@@ -111831,8 +111832,8 @@ toughness=3
[/card] [/card]
[card] [card]
name=Storm World name=Storm World
auto=@each opponent upkeep:damage:0 && if type(*|opponenthand)~equalto~3 then damage:1 opponent && if type(*|opponenthand)~equalto~2 then damage:2 opponent && if type(*|opponenthand)~equalto~1 then damage:3 opponent && if type(*|opponenthand)~equalto~0 then damage:4 opponent auto=@each opponent upkeep:damage:4minustype:*:opponenthandminusend opponent
auto=@each my upkeep:damage:0 && if type(*|myhand)~equalto~3 then damage:1 controller && if type(*|myhand)~equalto~2 then damage:2 controller && if type(*|myhand)~equalto~1 then damage:3 controller && if type(*|myhand)~equalto~0 then damage:4 controller auto=@each my upkeep:damage:damage:4minustype:*:opponenthandminusend opponent
auto=@movedTo(other enchantment[world]|battlefield):sacrifice all(this) auto=@movedTo(other enchantment[world]|battlefield):sacrifice all(this)
text=At the beginning of each player's upkeep, Storm World deals X damage to that player, where X is 4 minus the number of cards in his or her hand. text=At the beginning of each player's upkeep, Storm World deals X damage to that player, where X is 4 minus the number of cards in his or her hand.
mana={R} mana={R}
@@ -117417,7 +117418,7 @@ toughness=5
[card] [card]
name=The Rack name=The Rack
auto=name(choose opponent) notatarget(opponent) deplete:0 auto=name(choose opponent) notatarget(opponent) deplete:0
auto=@each targetedplayer upkeep:damage:0 && if type(*|targetedpersonshand)~equalto~2 then damage:1 targetedplayer && if type(*|targetedpersonshand)~equalto~1 then damage:2 targetedplayer && if type(*|targetedpersonshand)~equalto~0 then damage:3 targetedplayer auto=@each targetedplayer upkeep:damage:3minustype:*:targetedpersonshandminusend targetedplayer
text=As The Rack enters the battlefield, choose an opponent. -- At the beginning of the chosen player's upkeep, The Rack deals X damage to that player, where X is 3 minus the number of cards in his or her hand. text=As The Rack enters the battlefield, choose an opponent. -- At the beginning of the chosen player's upkeep, The Rack deals X damage to that player, where X is 3 minus the number of cards in his or her hand.
mana={1} mana={1}
type=Artifact type=Artifact
@@ -130601,7 +130602,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Wheel of Torture name=Wheel of Torture
auto=@each opponent upkeep:damage:0 && if type(*|opponenthand)~equalto~2 then damage:1 opponent && if type(*|opponenthand)~equalto~1 then damage:2 opponent && if type(*|opponenthand)~equalto~0 then damage:3 opponent auto=@each opponent upkeep:damage:3minustype:*:opponenthandminusend opponent
text=At the beginning of each opponent's upkeep, Wheel of Torture deals X damage to that player, where X is 3 minus the number of cards in his or her hand. text=At the beginning of each opponent's upkeep, Wheel of Torture deals X damage to that player, where X is 3 minus the number of cards in his or her hand.
type=Artifact type=Artifact
mana={3} mana={3}
+38
View File
@@ -581,6 +581,22 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0; return 0;
} }
check = restriction[i].find("lessorequalcreatures");
if(check != string::npos)
{
bool condition = (card->controller()->opponent()->inPlay()->countByType("creature") >= card->controller()->inPlay()->countByType("creature"));
if(!condition)
return 0;
}
check = restriction[i].find("lessorequallands");
if(check != string::npos)
{
bool condition = (card->controller()->opponent()->inPlay()->countByType("land") >= card->controller()->inPlay()->countByType("land"));
if(!condition)
return 0;
}
check = restriction[i].find("outnumbered");//opponent controls atleast 4 or more creatures than you check = restriction[i].find("outnumbered");//opponent controls atleast 4 or more creatures than you
if(check != string::npos) if(check != string::npos)
{ {
@@ -596,6 +612,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0; return 0;
} }
check = restriction[i].find("didblock");
if(check != string::npos)
{
if(!card->didblocked)
return 0;
}
check = restriction[i].find("didattack"); check = restriction[i].find("didattack");
if(check != string::npos) if(check != string::npos)
{ {
@@ -687,6 +710,21 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
{ {
restriction.push_back("type(creature|mybattlefield)~lessthan~type(creature|opponentbattlefield)"); restriction.push_back("type(creature|mybattlefield)~lessthan~type(creature|opponentbattlefield)");
} }
check = restriction[i].find("control less lands");
if(check != string::npos)
{
restriction.push_back("type(land|mybattlefield)~lessthan~type(land|opponentbattlefield)");
}
check = restriction[i].find("control more creatures");
if(check != string::npos)
{
restriction.push_back("type(creature|mybattlefield)~morethan~type(creature|opponentbattlefield)");
}
check = restriction[i].find("control more lands");
if(check != string::npos)
{
restriction.push_back("type(land|mybattlefield)~morethan~type(land|opponentbattlefield)");
}
check = restriction[i].find("paid("); check = restriction[i].find("paid(");
if(check != string::npos) if(check != string::npos)