It is currently 25 Apr 2024, 21:52
   
Text Size

Reminisce

Post MTG Forge Related Programming Questions Here

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

Reminisce

Postby zerker2000 » 08 Jul 2009, 23:50

Gando complained about me using four Timetwister -s, so I decided to spend five minutes on an unrestricted card that works well enough in that deck:
Code: Select all
    //*************** START *********** START **************************
    if(cardName.equals("Reminisce"))
    {
      final SpellAbility spell = new Spell(card)
      {
      private static final long serialVersionUID = 505983020365091226L;
      
      public void resolve()
        {
          String player = getTargetPlayer();
          // Move graveyard into library
          PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
          PlayerZone library = AllZone.getZone(Constant.Zone.Library, player);
          Card[] g = grave.getCards();
          for (int i = 0; i < g.length; i++)
          {
            grave.remove(g[i]);
            library.add(g[i],0);
          }
          // Shuffle library
          AllZone.GameAction.shuffle(player);;
        }

        public boolean canPlayAI()//97% of the time shuffling your grave into your library is a good thing
        {
           setTargetPlayer(Constant.Player.Computer);
           return true;
        }

      };//SpellAbility
      spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
      card.clearSpellAbility();
      card.addSpellAbility(spell);
    }//*************** END ************ END **************************
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Return to Developer's Corner

Who is online

Users browsing this forum: Bryanamilk and 79 guests


Who is online

In total there are 80 users online :: 1 registered, 0 hidden and 79 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: Bryanamilk and 79 guests

Login Form