minor refactor
This commit is contained in:
@@ -29396,7 +29396,7 @@ type=Instant
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Dismiss into Dream
|
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."
|
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}
|
mana={6}{U}
|
||||||
type=Enchantment
|
type=Enchantment
|
||||||
@@ -42891,7 +42891,7 @@ toughness=2
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Frost Walker
|
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.
|
text=When Frost Walker becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={1}{U}
|
mana={1}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -48227,7 +48227,7 @@ toughness=2
|
|||||||
[card]
|
[card]
|
||||||
name=Gossamer Phantasm
|
name=Gossamer Phantasm
|
||||||
abilities=flying
|
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.
|
text=Flying -- When Gossamer Phantasm becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={1}{U}
|
mana={1}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -55990,7 +55990,7 @@ toughness=4
|
|||||||
[card]
|
[card]
|
||||||
name=Illusionary Servant
|
name=Illusionary Servant
|
||||||
abilities=flying
|
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.
|
text=Flying -- When Illusionary Servant becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={1}{U}{U}
|
mana={1}{U}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -83968,7 +83968,7 @@ toughness=1
|
|||||||
[card]
|
[card]
|
||||||
name=Phantasmal Abomination
|
name=Phantasmal Abomination
|
||||||
abilities=defender
|
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.
|
text=Defender -- When Phantasmal Abomination becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={1}{U}{U}
|
mana={1}{U}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -83978,7 +83978,7 @@ toughness=5
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Phantasmal Bear
|
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.
|
text=When Phantasmal Bear becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={U}
|
mana={U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -83989,7 +83989,7 @@ toughness=2
|
|||||||
[card]
|
[card]
|
||||||
name=Phantasmal Dragon
|
name=Phantasmal Dragon
|
||||||
abilities=flying
|
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.
|
text=Flying -- When Phantasmal Dragon becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={2}{U}{U}
|
mana={2}{U}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -84022,7 +84022,7 @@ toughness=1
|
|||||||
[card]
|
[card]
|
||||||
name=Phantasmal Image
|
name=Phantasmal Image
|
||||||
auto=may copy NotATarget(creature)
|
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."
|
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}
|
mana={1}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -84093,7 +84093,7 @@ toughness=2
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Phantom Beast
|
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.
|
text=When Phantom Beast becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={3}{U}
|
mana={3}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -104621,7 +104621,7 @@ type=Instant
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Skulking Fugitive
|
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.
|
text=When Skulking Fugitive becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={2}{B}
|
mana={2}{B}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -104632,7 +104632,7 @@ toughness=4
|
|||||||
[card]
|
[card]
|
||||||
name=Skulking Ghost
|
name=Skulking Ghost
|
||||||
abilities=flying
|
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.
|
text=Flying -- When Skulking Ghost becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={1}{B}
|
mana={1}{B}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -104643,7 +104643,7 @@ toughness=1
|
|||||||
[card]
|
[card]
|
||||||
name=Skulking Knight
|
name=Skulking Knight
|
||||||
abilities=flanking
|
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.
|
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}
|
mana={2}{B}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -115504,7 +115504,7 @@ type=Artifact
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Tar Pit Warrior
|
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.
|
text=When Tar Pit Warrior becomes the target of a spell or ability, sacrifice it.
|
||||||
mana={2}{B}
|
mana={2}{B}
|
||||||
type=Creature
|
type=Creature
|
||||||
|
|||||||
@@ -536,6 +536,14 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
|||||||
if(!card->discarded)
|
if(!card->discarded)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check = restriction[i].find("cardistargeted");
|
||||||
|
if(check != string::npos)
|
||||||
|
{
|
||||||
|
bool istarget = card->isTargetted();
|
||||||
|
if(!istarget)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
check = restriction[i].find("copiedacard");
|
check = restriction[i].find("copiedacard");
|
||||||
if(check != string::npos)
|
if(check != string::npos)
|
||||||
|
|||||||
Reference in New Issue
Block a user