From 222f92a46780b2a91ed3bb2b94ebbf2d3c80767a Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 13:48:28 +0000 Subject: [PATCH] convert Kiki-Jiki to Ability_Cost --- src/forge/CardFactory_Creatures.java | 38 +++++----------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 5a1a24b830c..59fb649911a 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -298,8 +298,9 @@ public class CardFactory_Creatures { //*************** START *********** START ************************** else if(cardName.equals("Kiki-Jiki, Mirror Breaker")) { final CardFactory cfact = cf; - - final SpellAbility ability = new Ability_Tap(card) { + Ability_Cost abCost = new Ability_Cost("T", cardName, true); + Target target = new Target("Select target nonlegendary creature you control.", new String[] {"Creature.nonLegendary+YouCtrl"}); + final Ability_Activated ability = new Ability_Activated(card, abCost, target) { private static final long serialVersionUID = -943706942500499644L; @Override @@ -313,14 +314,7 @@ public class CardFactory_Creatures { } CardList getCreature() { - CardList list = null; - if(card.getController().equals(AllZone.HumanPlayer)) { - list = new CardList(AllZone.Human_Battlefield.getCards()); - } else { - list = new CardList(AllZone.Computer_Battlefield.getCards()); - } - - list = list.getType("Creature"); + CardList list = AllZoneUtil.getCreaturesInPlay(card.getController()); list = list.filter(new CardListFilter() { public boolean addCard(Card c) { return (!c.getType().contains("Legendary")); @@ -420,31 +414,13 @@ public class CardFactory_Creatures { }//resolve() };//SpellAbility - Input runtime = new Input() { - private static final long serialVersionUID = 7171284831370490875L; - - @Override - public void showMessage() { - //get all non-legendary creatures you control - CardList list = new CardList(); - list.addAll(AllZone.Human_Battlefield.getCards()); - list = list.filter(new CardListFilter() { - public boolean addCard(Card c) { - return c.isCreature() && (!c.getType().contains("Legendary")); - } - }); - stopSetNext(CardFactoryUtil.input_targetSpecific(ability, list, - "Select target creature to copy that is not legendary.", true, false)); - } - };//Input ability.setStackDescription("Kiki-Jiki - copy card."); StringBuilder sb = new StringBuilder(); - sb.append("tap: Put a token into play that's a copy of target nonlegendary creature you control. "); - sb.append("That creature token has haste. Sacrifice it at end of turn."); + sb.append(abCost); + sb.append("Put a token that's a copy of target nonlegendary creature you control onto the battlefield. "); + sb.append("That token has haste. Sacrifice it at the beginning of the next end step."); ability.setDescription(sb.toString()); - - ability.setBeforePayMana(runtime); card.addSpellAbility(ability); }//*************** END ************ END **************************