mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
*Added Phantasmal Image
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5575,6 +5575,7 @@ res/cardsfolder/p/phantasmal_bear.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/p/phantasmal_dragon.txt svneol=native#text/plain
|
res/cardsfolder/p/phantasmal_dragon.txt svneol=native#text/plain
|
||||||
res/cardsfolder/p/phantasmal_fiend.txt svneol=native#text/plain
|
res/cardsfolder/p/phantasmal_fiend.txt svneol=native#text/plain
|
||||||
res/cardsfolder/p/phantasmal_forces.txt svneol=native#text/plain
|
res/cardsfolder/p/phantasmal_forces.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/p/phantasmal_image.txt -text
|
||||||
res/cardsfolder/p/phantasmal_terrain.txt svneol=native#text/plain
|
res/cardsfolder/p/phantasmal_terrain.txt svneol=native#text/plain
|
||||||
res/cardsfolder/p/phantatog.txt svneol=native#text/plain
|
res/cardsfolder/p/phantatog.txt svneol=native#text/plain
|
||||||
res/cardsfolder/p/phantom_beast.txt svneol=native#text/plain
|
res/cardsfolder/p/phantom_beast.txt svneol=native#text/plain
|
||||||
|
|||||||
6
res/cardsfolder/p/phantasmal_image.txt
Normal file
6
res/cardsfolder/p/phantasmal_image.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Name:Phantasmal Image
|
||||||
|
ManaCost:1 U
|
||||||
|
Types:Creature Illusion
|
||||||
|
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."
|
||||||
|
PT:0/0
|
||||||
|
End
|
||||||
@@ -2769,7 +2769,8 @@ public class CardFactory_Creatures {
|
|||||||
else if (cardName.equals("Clone") || cardName.equals("Vesuvan Doppelganger")
|
else if (cardName.equals("Clone") || cardName.equals("Vesuvan Doppelganger")
|
||||||
|| cardName.equals("Quicksilver Gargantuan")
|
|| cardName.equals("Quicksilver Gargantuan")
|
||||||
|| cardName.equals("Jwari Shapeshifter")
|
|| cardName.equals("Jwari Shapeshifter")
|
||||||
|| cardName.equals("Phyrexian Metamorph")) {
|
|| cardName.equals("Phyrexian Metamorph")
|
||||||
|
|| cardName.equals("Phantasmal Image")) {
|
||||||
final CardFactoryInterface cfact = cf;
|
final CardFactoryInterface cfact = cf;
|
||||||
final Card[] copyTarget = new Card[1];
|
final Card[] copyTarget = new Card[1];
|
||||||
final Card[] cloned = new Card[1];
|
final Card[] cloned = new Card[1];
|
||||||
@@ -2817,6 +2818,7 @@ public class CardFactory_Creatures {
|
|||||||
cloned[0].setOwner(card.getController());
|
cloned[0].setOwner(card.getController());
|
||||||
cloned[0].addController(card.getController());
|
cloned[0].addController(card.getController());
|
||||||
if (cardName.equals("Phyrexian Metamorph")) cloned[0].addType("Artifact");
|
if (cardName.equals("Phyrexian Metamorph")) cloned[0].addType("Artifact");
|
||||||
|
if (cardName.equals("Phantasmal Image")) cloned[0].addType("Illusion");
|
||||||
cloned[0].setCloneOrigin(card);
|
cloned[0].setCloneOrigin(card);
|
||||||
cloned[0].addLeavesPlayCommand(leaves);
|
cloned[0].addLeavesPlayCommand(leaves);
|
||||||
cloned[0].setCloneLeavesPlayCommand(leaves);
|
cloned[0].setCloneLeavesPlayCommand(leaves);
|
||||||
@@ -2828,8 +2830,31 @@ public class CardFactory_Creatures {
|
|||||||
} else if (cardName.equals("Quicksilver Gargantuan")) {
|
} else if (cardName.equals("Quicksilver Gargantuan")) {
|
||||||
cloned[0].setBaseDefense(7);
|
cloned[0].setBaseDefense(7);
|
||||||
cloned[0].setBaseAttack(7);
|
cloned[0].setBaseAttack(7);
|
||||||
|
} else if (cardName.equals("Phantasmal Image")) {
|
||||||
|
StringBuilder trigScript = new StringBuilder("Mode$ BecomesTarget | ValidTarget$ Card.Self | TriggerZones$ Battlefield | Execute$ ");
|
||||||
|
StringBuilder svarName = new StringBuilder("TrigSac");
|
||||||
|
//Couple of hoops to jump through to make sure no svar is overwritten.
|
||||||
|
int iter = 0;
|
||||||
|
while(cloned[0].getSVar(svarName.toString()) != "")
|
||||||
|
{
|
||||||
|
iter++;
|
||||||
|
if(svarName.length() == 7)
|
||||||
|
{
|
||||||
|
svarName.append(iter);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
svarName.delete(8, svarName.length());
|
||||||
|
svarName.append(iter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
trigScript.append(svarName.toString());
|
||||||
|
trigScript.append(" | TriggerDescription$ When this creature becomes the target of a spell or ability, sacrifice it.");
|
||||||
|
cloned[0].addTrigger(forge.card.trigger.TriggerHandler.parseTrigger(trigScript.toString(),card,true));
|
||||||
|
cloned[0].setSVar(svarName.toString(), "AB$Sacrifice | Cost$ 0 | Defined$ Self");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Slight hack in case the cloner copies a card with triggers
|
//Slight hack in case the cloner copies a card with triggers
|
||||||
for (Trigger t : cloned[0].getTriggers()) {
|
for (Trigger t : cloned[0].getTriggers()) {
|
||||||
AllZone.getTriggerHandler().registerTrigger(t);
|
AllZone.getTriggerHandler().registerTrigger(t);
|
||||||
|
|||||||
Reference in New Issue
Block a user