Move handling of Imprint exclusively to ChangeZone AF. Add Mimic Vat

This commit is contained in:
ArsenalNut
2011-08-12 23:14:58 +00:00
parent 633ee9a097
commit e6032d1825
4 changed files with 44 additions and 16 deletions

1
.gitattributes vendored
View File

@@ -4721,6 +4721,7 @@ res/cardsfolder/m/mikokoro_center_of_the_sea.txt svneol=native#text/plain
res/cardsfolder/m/militant_monk.txt svneol=native#text/plain res/cardsfolder/m/militant_monk.txt svneol=native#text/plain
res/cardsfolder/m/millikin.txt svneol=native#text/plain res/cardsfolder/m/millikin.txt svneol=native#text/plain
res/cardsfolder/m/millstone.txt svneol=native#text/plain res/cardsfolder/m/millstone.txt svneol=native#text/plain
res/cardsfolder/m/mimic_vat.txt -text
res/cardsfolder/m/minamo_school_at_waters_edge.txt svneol=native#text/plain res/cardsfolder/m/minamo_school_at_waters_edge.txt svneol=native#text/plain
res/cardsfolder/m/minamo_scrollkeeper.txt svneol=native#text/plain res/cardsfolder/m/minamo_scrollkeeper.txt svneol=native#text/plain
res/cardsfolder/m/minamo_sightbender.txt svneol=native#text/plain res/cardsfolder/m/minamo_sightbender.txt svneol=native#text/plain

View File

@@ -0,0 +1,16 @@
Name:Mimic Vat
ManaCost:3
Types:Artifact
Text:no text
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken | Origin$ Battlefield | Destination$ Graveyard | OptionalDecider$ You | Execute$ TrigReturn | TriggerDescription$ Imprint - Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with CARDNAME to its owner's graveyard.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Origin$ Exile | Unimprint$ True | Destination$ Graveyard | Defined$ Remembered | ChangeNum$ 1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True | SubAbility$ DBExile
SVar:DBExile:DB$ChangeZone | Cost$ 0 | Imprint$ True | Origin$ Graveyard | Destination$ Exile | Defined$ TriggeredCard | RememberChanged$ True | ChangeNum$ 1
A:AB$CopyPermanent | Cost$ 3 T | Defined$ Imprinted | SubAbility$ DBPump | SpellDescription$ Put a token onto the battlefield that's a copy of the exiled card. It gains haste. Exile it at the beginning of the next end step.
SVar:DBPump:DB$ Pump | Cost$ 0 | Defined$ Clones | KW$ Haste | Permanent$ True | SubAbility$ DBPump2
SVar:DBPump2:DB$ Pump | Cost$ 0 | Defined$ Clones | KW$ HIDDEN At the beginning of the end step, exile CARDNAME.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mimic_vat.jpg
SetInfo:SOM|Rare|http://magiccards.info/scans/en/som/175.jpg
End

View File

@@ -1606,7 +1606,7 @@ public class AbilityFactory {
HashMap<String, String> params = AF.getMapParams(); HashMap<String, String> params = AF.getMapParams();
Card host; Card host;
if (!params.containsKey("RememberTargets") && !params.containsKey("Imprint")) { if (!params.containsKey("RememberTargets")) {
return; return;
} }
@@ -1615,9 +1615,6 @@ public class AbilityFactory {
if (params.containsKey("ForgetOtherTargets")) { if (params.containsKey("ForgetOtherTargets")) {
host.clearRemembered(); host.clearRemembered();
} }
if (params.containsKey("Unimprint")) {
host.clearImprinted();
}
Target tgt = AF.getAbTgt(); Target tgt = AF.getAbTgt();
@@ -1627,10 +1624,6 @@ public class AbilityFactory {
host.addRemembered(o); host.addRemembered(o);
} }
} }
if (params.containsKey("Imprint")) {
ArrayList<Card> tgts = (tgt == null) ? new ArrayList<Card>() : tgt.getTargetCards();
host.addImprinted(tgts);
}
} }
/** /**

View File

@@ -622,6 +622,11 @@ public class AbilityFactory_ChangeZone {
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1; int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;
String remember = params.get("RememberChanged"); String remember = params.get("RememberChanged");
String imprint = params.get("Imprint");
if (params.containsKey("Unimprint")) {
card.clearImprinted();
}
for (int i = 0; i < changeNum; i++) { for (int i = 0; i < changeNum; i++) {
if (fetchList.size() == 0 || destination == null) if (fetchList.size() == 0 || destination == null)
@@ -657,7 +662,7 @@ public class AbilityFactory_ChangeZone {
if (remember != null) if (remember != null)
card.addRemembered(movedCard); card.addRemembered(movedCard);
//for imprinted since this doesn't use Target //for imprinted since this doesn't use Target
if (params.containsKey("Imprint")) if (imprint != null)
card.addImprinted(movedCard); card.addImprinted(movedCard);
} else { } else {
@@ -712,6 +717,11 @@ public class AbilityFactory_ChangeZone {
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1; int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;
String remember = params.get("RememberChanged"); String remember = params.get("RememberChanged");
String imprint = params.get("Imprint");
if (params.containsKey("Unimprint")) {
card.clearImprinted();
}
for (int i = 0; i < changeNum; i++) { for (int i = 0; i < changeNum; i++) {
if (fetchList.size() == 0 || destination == null) if (fetchList.size() == 0 || destination == null)
@@ -773,7 +783,8 @@ public class AbilityFactory_ChangeZone {
if (remember != null) if (remember != null)
card.addRemembered(newCard); card.addRemembered(newCard);
//for imprinted since this doesn't use Target //for imprinted since this doesn't use Target
if (params.containsKey("Imprint")) card.addImprinted(newCard); if (imprint != null)
card.addImprinted(newCard);
} }
if (!"Battlefield".equals(destination) && !"Card".equals(type)) { if (!"Battlefield".equals(destination) && !"Card".equals(type)) {
@@ -1352,6 +1363,11 @@ public class AbilityFactory_ChangeZone {
} }
String remember = params.get("RememberChanged"); String remember = params.get("RememberChanged");
String imprint = params.get("Imprint");
if (params.containsKey("Unimprint")) {
hostCard.clearImprinted();
}
if (tgtCards.size() != 0) { if (tgtCards.size() != 0) {
for (Card tgtC : tgtCards) { for (Card tgtC : tgtCards) {
@@ -1366,6 +1382,7 @@ public class AbilityFactory_ChangeZone {
continue; continue;
} }
Card movedCard = null;
Player pl = player; Player pl = player;
if (!destination.equals("Battlefield")) if (!destination.equals("Battlefield"))
pl = tgtC.getOwner(); pl = tgtC.getOwner();
@@ -1374,7 +1391,7 @@ public class AbilityFactory_ChangeZone {
// library position is zero indexed // library position is zero indexed
int libraryPosition = params.containsKey("LibraryPosition") ? Integer.parseInt(params.get("LibraryPosition")) : 0; int libraryPosition = params.containsKey("LibraryPosition") ? Integer.parseInt(params.get("LibraryPosition")) : 0;
AllZone.getGameAction().moveToLibrary(tgtC, libraryPosition); movedCard = AllZone.getGameAction().moveToLibrary(tgtC, libraryPosition);
if (params.containsKey("Shuffle")) // for things like Gaea's Blessing if (params.containsKey("Shuffle")) // for things like Gaea's Blessing
tgtC.getOwner().shuffle(); tgtC.getOwner().shuffle();
@@ -1391,19 +1408,20 @@ public class AbilityFactory_ChangeZone {
continue; continue;
} }
AllZone.getGameAction().moveTo(AllZone.getZone(destination, tgtC.getController()), tgtC); movedCard = AllZone.getGameAction().moveTo(AllZone.getZone(destination, tgtC.getController()), tgtC);
if (params.containsKey("Ninjutsu") || params.containsKey("Attacking")) { if (params.containsKey("Ninjutsu") || params.containsKey("Attacking")) {
AllZone.getCombat().addAttacker(tgtC); AllZone.getCombat().addAttacker(tgtC);
AllZone.getCombat().addUnblockedAttacker(tgtC); AllZone.getCombat().addUnblockedAttacker(tgtC);
} }
} else { } else {
AllZone.getGameAction().moveTo(AllZone.getZone(destination, pl), tgtC); movedCard = AllZone.getGameAction().moveTo(AllZone.getZone(destination, pl), tgtC);
} }
} }
if (remember != null) if (remember != null)
hostCard.addRemembered(tgtC); hostCard.addRemembered(movedCard);
// May also need to add Imprint if (imprint != null)
hostCard.addImprinted(movedCard);
} }
} }
} }