mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Move handling of Imprint exclusively to ChangeZone AF. Add Mimic Vat
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/millikin.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_scrollkeeper.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/minamo_sightbender.txt svneol=native#text/plain
|
||||
|
||||
16
res/cardsfolder/m/mimic_vat.txt
Normal file
16
res/cardsfolder/m/mimic_vat.txt
Normal 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
|
||||
@@ -1606,7 +1606,7 @@ public class AbilityFactory {
|
||||
HashMap<String, String> params = AF.getMapParams();
|
||||
Card host;
|
||||
|
||||
if (!params.containsKey("RememberTargets") && !params.containsKey("Imprint")) {
|
||||
if (!params.containsKey("RememberTargets")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1615,9 +1615,6 @@ public class AbilityFactory {
|
||||
if (params.containsKey("ForgetOtherTargets")) {
|
||||
host.clearRemembered();
|
||||
}
|
||||
if (params.containsKey("Unimprint")) {
|
||||
host.clearImprinted();
|
||||
}
|
||||
|
||||
Target tgt = AF.getAbTgt();
|
||||
|
||||
@@ -1627,10 +1624,6 @@ public class AbilityFactory {
|
||||
host.addRemembered(o);
|
||||
}
|
||||
}
|
||||
if (params.containsKey("Imprint")) {
|
||||
ArrayList<Card> tgts = (tgt == null) ? new ArrayList<Card>() : tgt.getTargetCards();
|
||||
host.addImprinted(tgts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -622,6 +622,11 @@ public class AbilityFactory_ChangeZone {
|
||||
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;
|
||||
|
||||
String remember = params.get("RememberChanged");
|
||||
String imprint = params.get("Imprint");
|
||||
|
||||
if (params.containsKey("Unimprint")) {
|
||||
card.clearImprinted();
|
||||
}
|
||||
|
||||
for (int i = 0; i < changeNum; i++) {
|
||||
if (fetchList.size() == 0 || destination == null)
|
||||
@@ -657,7 +662,7 @@ public class AbilityFactory_ChangeZone {
|
||||
if (remember != null)
|
||||
card.addRemembered(movedCard);
|
||||
//for imprinted since this doesn't use Target
|
||||
if (params.containsKey("Imprint"))
|
||||
if (imprint != null)
|
||||
card.addImprinted(movedCard);
|
||||
|
||||
} else {
|
||||
@@ -712,6 +717,11 @@ public class AbilityFactory_ChangeZone {
|
||||
int changeNum = params.containsKey("ChangeNum") ? AbilityFactory.calculateAmount(card, params.get("ChangeNum"), sa) : 1;
|
||||
|
||||
String remember = params.get("RememberChanged");
|
||||
String imprint = params.get("Imprint");
|
||||
|
||||
if (params.containsKey("Unimprint")) {
|
||||
card.clearImprinted();
|
||||
}
|
||||
|
||||
for (int i = 0; i < changeNum; i++) {
|
||||
if (fetchList.size() == 0 || destination == null)
|
||||
@@ -773,7 +783,8 @@ public class AbilityFactory_ChangeZone {
|
||||
if (remember != null)
|
||||
card.addRemembered(newCard);
|
||||
//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)) {
|
||||
@@ -1352,6 +1363,11 @@ public class AbilityFactory_ChangeZone {
|
||||
}
|
||||
|
||||
String remember = params.get("RememberChanged");
|
||||
String imprint = params.get("Imprint");
|
||||
|
||||
if (params.containsKey("Unimprint")) {
|
||||
hostCard.clearImprinted();
|
||||
}
|
||||
|
||||
if (tgtCards.size() != 0) {
|
||||
for (Card tgtC : tgtCards) {
|
||||
@@ -1366,6 +1382,7 @@ public class AbilityFactory_ChangeZone {
|
||||
continue;
|
||||
}
|
||||
|
||||
Card movedCard = null;
|
||||
Player pl = player;
|
||||
if (!destination.equals("Battlefield"))
|
||||
pl = tgtC.getOwner();
|
||||
@@ -1374,7 +1391,7 @@ public class AbilityFactory_ChangeZone {
|
||||
// library position is zero indexed
|
||||
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
|
||||
tgtC.getOwner().shuffle();
|
||||
@@ -1391,19 +1408,20 @@ public class AbilityFactory_ChangeZone {
|
||||
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")) {
|
||||
AllZone.getCombat().addAttacker(tgtC);
|
||||
AllZone.getCombat().addUnblockedAttacker(tgtC);
|
||||
}
|
||||
} else {
|
||||
AllZone.getGameAction().moveTo(AllZone.getZone(destination, pl), tgtC);
|
||||
movedCard = AllZone.getGameAction().moveTo(AllZone.getZone(destination, pl), tgtC);
|
||||
}
|
||||
}
|
||||
if (remember != null)
|
||||
hostCard.addRemembered(tgtC);
|
||||
// May also need to add Imprint
|
||||
hostCard.addRemembered(movedCard);
|
||||
if (imprint != null)
|
||||
hostCard.addImprinted(movedCard);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user