It is currently 10 May 2025, 15:40
   
Text Size

Fix for Kiki-Jiki, Mirror Breaker

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Fix for Kiki-Jiki, Mirror Breaker

Postby jpb » 18 Jan 2009, 08:43

Kiki-Jiki, Mirror Breaker would allow you to select the opponent's creatures and did not allow you to copy tokens. Now you should only be able to target your own creatures and can target tokens. Also an additional check is made to ensure that you control the target creature when the ability resolves. This is just incase the opponent steals the creature while the ability is on the stack.

Code: Select all
    //*************** START *********** START **************************
    if(cardName.equals("Kiki-Jiki, Mirror Breaker"))
    {
      final SpellAbility ability = new Ability_Tap(card)
      {
        public boolean canPlayAI() {return getCreature().size() != 0;}
        public void chooseTargetAI()
        {
          setTargetCard(getCreature().get(0));
        }
        CardList getCreature()
        {
          CardList list = null;
          if(card.getController().equals(Constant.Player.Human)){
             list = new CardList(AllZone.Human_Play.getCards());
          }
          else{
             list = new CardList(AllZone.Computer_Play.getCards());
          }

          list = list.getType("Creature");
          list = list.filter(new CardListFilter()
          {
            public boolean addCard(Card c)
            {
              return (!c.getType().contains("Legendary"));
            }
          });
          CardListUtil.sortAttack(list);
          return list;
        }//getCreature()
        public void resolve()
        {
          if(AllZone.GameAction.isCardInPlay(getTargetCard()) && getTargetCard().getController().equals(card.getController()))
          {
            //copy creature and put it into play
            Card copy = getCard(getTargetCard().getName(), card.getController());
            copy.setToken(true);
            copy.addKeyword("Token");
            copy.addKeyword("Haste");

            PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
            play.add(copy);

            //have to do this since getTargetCard() might change
            //if Kiki-Jiki somehow gets untapped again
            final Card[] target = new Card[1];
            target[0] = copy;
            Command atEOT = new Command()
            {
              public void execute()
              {
                //technically your opponent could steal the token
                //and the token shouldn't be sacrificed
                if(AllZone.GameAction.isCardInPlay(target[0]))
                  AllZone.GameAction.sacrifice(target[0]); //maybe do a setSacrificeAtEOT, but probably not.
              }
            };//Command
            AllZone.EndOfTurn.addAt(atEOT);
          }//is card in play?
        }//resolve()
      };//SpellAbility

      Input runtime = new Input()
      {
        public void showMessage()
        {
          //get all non-legendary creatures you control
          CardList list = new CardList();
          list.addAll(AllZone.Human_Play.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."));
        }
      };//Input
      ability.setStackDescription("Kiki-Jiki - copy card.");
      ability.setDescription("tap: Put a token into play that's a copy of target nonlegendary creature you control. That creature token has haste. Sacrifice it at end of turn.");
      ability.setBeforePayMana(runtime);
      card.addSpellAbility(ability);
    }//*************** END ************ END **************************
jpb
 
Posts: 132
Joined: 05 Sep 2008, 13:12
Has thanked: 0 time
Been thanked: 0 time

Return to Forge

Who is online

Users browsing this forum: No registered users and 66 guests


Who is online

In total there are 66 users online :: 0 registered, 0 hidden and 66 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 66 guests

Login Form