diff --git a/.gitattributes b/.gitattributes index 1cf98de14e9..069e14a6b1a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10341,6 +10341,7 @@ res/cardsfolder/t/the_fallen.txt -text res/cardsfolder/t/the_hive.txt svneol=native#text/plain res/cardsfolder/t/the_iron_guardian_stirs.txt -text res/cardsfolder/t/the_lady_of_the_mountain.txt svneol=native#text/plain +res/cardsfolder/t/the_mimeoplasm.txt -text res/cardsfolder/t/the_pieces_are_coming_together.txt -text res/cardsfolder/t/the_rack.txt svneol=native#text/plain res/cardsfolder/t/the_tabernacle_at_pendrell_vale.txt svneol=native#text/plain diff --git a/res/cardsfolder/t/the_mimeoplasm.txt b/res/cardsfolder/t/the_mimeoplasm.txt new file mode 100644 index 00000000000..06bdaaf28de --- /dev/null +++ b/res/cardsfolder/t/the_mimeoplasm.txt @@ -0,0 +1,21 @@ +Name:The Mimeoplasm +ManaCost:2 G U B +Types:Legendary Creature Ooze +Text:no text +PT:0/0 +K:ETBReplacement:Copy:MimeoExileTwo:Optional +# Make SVars for granting abilities and triggers on clones distinct to avoid SVars getting overwritten when cloning a clone +SVar:MimeoExileTwo:DB$ ChangeZone | ConditionCheckSVar$ MimeoInYard | ConditionSVarCompare$ GE2 | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card.Creature | ChangeNum$ 2 | Hidden$ True | Mandatory$ True | RememberChanged$ True | SubAbility$ MimeoChoose | SpellDescription$ As CARDNAME enters the battlefield, you may exile two creature cards from graveyards. If you do, it enters the battlefield as a copy of one of those cards with a number of additional +1/+1 counters on it equal to the power of the other card. +SVar:MimeoChoose:DB$ ChooseCard | ConditionCheckSVar$ MimeoNumRemembered | ConditionSVarCompare$ EQ2 | Defined$ You | Amount$ 1 | Mandatory$ True | AILogic$ Clone | ChoiceTitle$ Choose creature to copy | Choices$ Creature.IsRemembered | ChoiceZone$ Exile | ForgetChosen$ True | SubAbility$ MimeoAddCounters +# Order matters here, put counters first so clone doesn't have to add SVars +SVar:MimeoAddCounters:DB$ PutCounter | Defined$ Self | ConditionCheckSVar$ MimeoNumRemembered | ConditionSVarCompare$ EQ1 | CounterType$ P1P1 | CounterNum$ MimeoX | SubAbility$ MimeoCopyChosen +SVar:MimeoCopyChosen:DB$ Clone | Defined$ ChosenCard | ConditionCheckSVar$ MimeoNumRemembered | ConditionSVarCompare$ EQ1 +SVar:MimeoInYard:Count$TypeInAllYards.Creature +SVar:MimeoNumRemembered:Remembered$Amount +SVar:MimeoX:Remembered$CardPower +SVar:NeedsToPlayVar:MimeoInYard GE2 +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/the_mimeoplasm.jpg +SetInfo:COM|Mythic|http://magiccards.info/scans/en/cmd/210.jpg +Oracle:As The Mimeoplasm enters the battlefield, you may exile two creature cards from graveyards. If you do, it enters the battlefield as a copy of one of those cards with a number of additional +1/+1 counters on it equal to the power of the other card. +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactory.java b/src/main/java/forge/card/abilityfactory/AbilityFactory.java index ff3c6beccc6..89ca89fe279 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactory.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactory.java @@ -889,6 +889,10 @@ public class AbilityFactory { for (final Card cl : CardUtil.getThisTurnEntered(destination, origin, validFilter, hostCard)) { cards.add(cl); } + } else if (defined.equals("ChosenCard")) { + for (final Card chosen : hostCard.getChosenCard()) { + cards.add(Singletons.getModel().getGame().getCardState(chosen)); + } } else { List list = null; if (defined.startsWith("Sacrificed")) { diff --git a/src/main/java/forge/card/abilityfactory/effects/ChooseCardEffect.java b/src/main/java/forge/card/abilityfactory/effects/ChooseCardEffect.java index ffe3efbbe6b..394ec3d45af 100644 --- a/src/main/java/forge/card/abilityfactory/effects/ChooseCardEffect.java +++ b/src/main/java/forge/card/abilityfactory/effects/ChooseCardEffect.java @@ -77,7 +77,12 @@ public class ChooseCardEffect extends SpellEffect { for (int i = 0; i < validAmount; i++) { if (p.isHuman()) { final String choiceTitle = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : "Choose a card "; - final Card o = GuiChoose.oneOrNone(choiceTitle, choices); + Card o; + if (sa.hasParam("Mandatory")) { + o = GuiChoose.one(choiceTitle, choices); + } else { + o = GuiChoose.oneOrNone(choiceTitle, choices); + } if (o != null) { chosen.add(o); choices.remove(o); @@ -117,6 +122,11 @@ public class ChooseCardEffect extends SpellEffect { host.addRemembered(rem); } } + if (sa.hasParam("ForgetChosen")) { + for (final Card rem : chosen) { + host.removeRemembered(rem); + } + } } } }