Added ChosenCard to defined card types.

Added ForgetChosen parameter to ChooseCardEffect to remove chosen card from host card remembered object list.
Added Mandatory parameter to ChooseCardEffect.
Added The Mimeoplasm.
This commit is contained in:
ArsenalNut
2013-01-03 16:15:04 +00:00
parent 27a0f313a0
commit fe8a521a62
4 changed files with 37 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -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

View File

@@ -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

View File

@@ -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<Card> list = null;
if (defined.startsWith("Sacrificed")) {

View File

@@ -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);
}
}
}
}
}