minor refactor
This commit is contained in:
@@ -29396,7 +29396,7 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Dismiss into Dream
|
||||
auto=lord(creature|opponentbattlefield) transforms((Illusion,newability[@targeted(this):sacrifice]))
|
||||
auto=lord(creature|opponentbattlefield) transforms((Illusion,newability[while(restriction{cardistargeted}) sacrifice]))
|
||||
text=Enchantment. -- Each creature your opponents control is an Illusion in addition to its other types and has "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
mana={6}{U}
|
||||
type=Enchantment
|
||||
@@ -42891,7 +42891,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Frost Walker
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=When Frost Walker becomes the target of a spell or ability, sacrifice it.
|
||||
mana={1}{U}
|
||||
type=Creature
|
||||
@@ -48227,7 +48227,7 @@ toughness=2
|
||||
[card]
|
||||
name=Gossamer Phantasm
|
||||
abilities=flying
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=Flying -- When Gossamer Phantasm becomes the target of a spell or ability, sacrifice it.
|
||||
mana={1}{U}
|
||||
type=Creature
|
||||
@@ -55990,7 +55990,7 @@ toughness=4
|
||||
[card]
|
||||
name=Illusionary Servant
|
||||
abilities=flying
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=Flying -- When Illusionary Servant becomes the target of a spell or ability, sacrifice it.
|
||||
mana={1}{U}{U}
|
||||
type=Creature
|
||||
@@ -83968,7 +83968,7 @@ toughness=1
|
||||
[card]
|
||||
name=Phantasmal Abomination
|
||||
abilities=defender
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=Defender -- When Phantasmal Abomination becomes the target of a spell or ability, sacrifice it.
|
||||
mana={1}{U}{U}
|
||||
type=Creature
|
||||
@@ -83978,7 +83978,7 @@ toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
name=Phantasmal Bear
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=When Phantasmal Bear becomes the target of a spell or ability, sacrifice it.
|
||||
mana={U}
|
||||
type=Creature
|
||||
@@ -83989,7 +83989,7 @@ toughness=2
|
||||
[card]
|
||||
name=Phantasmal Dragon
|
||||
abilities=flying
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=Flying -- When Phantasmal Dragon becomes the target of a spell or ability, sacrifice it.
|
||||
mana={2}{U}{U}
|
||||
type=Creature
|
||||
@@ -84022,7 +84022,7 @@ toughness=1
|
||||
[card]
|
||||
name=Phantasmal Image
|
||||
auto=may copy NotATarget(creature)
|
||||
auto=while(restriction{copiedacard}) transforms((Illusion,newability[@targeted(this):sacrifice])) forever
|
||||
auto=while(restriction{copiedacard}) transforms((Illusion,newability[while(restriction{cardistargeted}) sacrifice])) forever
|
||||
text=You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it."
|
||||
mana={1}{U}
|
||||
type=Creature
|
||||
@@ -84093,7 +84093,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Phantom Beast
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=When Phantom Beast becomes the target of a spell or ability, sacrifice it.
|
||||
mana={3}{U}
|
||||
type=Creature
|
||||
@@ -104621,7 +104621,7 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Skulking Fugitive
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=When Skulking Fugitive becomes the target of a spell or ability, sacrifice it.
|
||||
mana={2}{B}
|
||||
type=Creature
|
||||
@@ -104632,7 +104632,7 @@ toughness=4
|
||||
[card]
|
||||
name=Skulking Ghost
|
||||
abilities=flying
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=Flying -- When Skulking Ghost becomes the target of a spell or ability, sacrifice it.
|
||||
mana={1}{B}
|
||||
type=Creature
|
||||
@@ -104643,7 +104643,7 @@ toughness=1
|
||||
[card]
|
||||
name=Skulking Knight
|
||||
abilities=flanking
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- When Skulking Knight becomes the target of a spell or ability, sacrifice it.
|
||||
mana={2}{B}
|
||||
type=Creature
|
||||
@@ -115504,7 +115504,7 @@ type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Tar Pit Warrior
|
||||
auto=@targeted(this):sacrifice
|
||||
auto=while(restriction{cardistargeted}) sacrifice
|
||||
text=When Tar Pit Warrior becomes the target of a spell or ability, sacrifice it.
|
||||
mana={2}{B}
|
||||
type=Creature
|
||||
|
||||
@@ -536,6 +536,14 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
||||
if(!card->discarded)
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("cardistargeted");
|
||||
if(check != string::npos)
|
||||
{
|
||||
bool istarget = card->isTargetted();
|
||||
if(!istarget)
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("copiedacard");
|
||||
if(check != string::npos)
|
||||
|
||||
Reference in New Issue
Block a user