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

View File

@@ -11944,9 +11944,10 @@ type=Sorcery
[/card]
[card]
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.
auto=life:-halfdownopponentlifetotal opponent
auto=life:opponentlifetotal controller
mana={4}{B}{B}
other={4}{b}{b}{t(vampire|mybattlefield)} name(Pay Kicker)
type=Sorcery
@@ -23970,7 +23971,7 @@ type=Instant
name=Crypt of Agadeem
auto=tap(noevent)
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.
type=Land
[/card]
@@ -46940,8 +46941,8 @@ toughness=1
[/card]
[card]
name=Goblin Goon
auto=@each my attackers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantattack)) ueot
auto=@each my blockers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantblock)) ueot
auto=while(restriction{lessorequalcreatures}) cantattack
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.
mana={3}{R}
type=Creature
@@ -60999,7 +61000,7 @@ toughness=2
[/card]
[card]
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.
mana={R}{R}
type=Creature
@@ -61009,7 +61010,7 @@ toughness=2
[/card]
[card]
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.
mana={W}{W}
type=Creature
@@ -67744,8 +67745,8 @@ subtype=Aura
[card]
name=Lurker
abilities=shroud
auto=@combat(attacking) source(this):name(loses shroud) -shroud ueot
auto=@combat(blocking) source(this):name(loses shroud) -shroud ueot
auto=while(restriction{didblock}) transforms((,newability[-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.
mana={2}{G}
type=Creature
@@ -73930,8 +73931,8 @@ toughness=3
[/card]
[card]
name=Mogg Toady
auto=@each my attackers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantattack)) ueot
auto=@each my blockers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantblock)) ueot
auto=while(restriction{lessorequalcreatures}) cantattack
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.
mana={1}{R}
type=Creature
@@ -74460,8 +74461,8 @@ type=Sorcery
[/card]
[card]
name=Monstrous Hound
auto=@each my attackers:if type(land|opponentbattlefield)~morethan~type(land|mybattlefield) then transforms((,cantattack)) ueot
auto=@each my blockers:if type(land|opponentbattlefield)~morethan~type(land|mybattlefield) then transforms((,cantblock)) ueot
auto=while(restriction{lessorequallands}) cantattack
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.
mana={3}{R}
type=Creature
@@ -89051,7 +89052,7 @@ type=Instant
[/card]
[card]
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.
mana={4}
type=Artifact Creature
@@ -111831,8 +111832,8 @@ toughness=3
[/card]
[card]
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 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 opponent upkeep:damage:4minustype:*:opponenthandminusend opponent
auto=@each my upkeep:damage:damage:4minustype:*:opponenthandminusend opponent
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.
mana={R}
@@ -117417,7 +117418,7 @@ toughness=5
[card]
name=The Rack
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.
mana={1}
type=Artifact
@@ -130601,7 +130602,7 @@ type=Sorcery
[/card]
[card]
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.
type=Artifact
mana={3}

View File

@@ -581,6 +581,22 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
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
if(check != string::npos)
{
@@ -596,6 +612,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0;
}
check = restriction[i].find("didblock");
if(check != string::npos)
{
if(!card->didblocked)
return 0;
}
check = restriction[i].find("didattack");
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)");
}
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(");
if(check != string::npos)