Tolsimir Wolfblood
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Tolsimir Wolfblood
by DennisBergkamp » 22 Oct 2008, 03:01
In cards.txt:
- Code: Select all
Tolsimir Wolfblood
4 G W
Legendary Creature Elf Warrior
Other green creatures you control get +1/+1. Other white creatures you control get +1/+1.
3/4
- Code: Select all
//*************** START *********** START **************************
if(cardName.equals("Tolsimir Wolfblood"))
{
final SpellAbility a1 = new Ability_Tap(card)
{
public void resolve()
{
makeToken();
}
void makeToken()
{
Card c = new Card();
c.setName("Voja");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("W G");
c.setToken(true);
c.addType("Legendary");
c.addType("Creature");
c.addType("Wolf");
c.setAttack(2);
c.setDefense(2);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}//makeToken()
};//SpellAbility
card.addSpellAbility(a1);
a1.setDescription("T: Put a legendary 2/2 green and white Wolf creature token named Voja into play.");
a1.setStackDescription("Put a 2/2 white green Legendary Wolf creature token named Voja into play.");
a1.setBeforePayMana(new Input_PayManaCost(a1));
}//*************** END ************ END **************************
- Code: Select all
private static Command Tolsimir = new Command()
{
CardList gloriousAnthemList = new CardList();
public void execute()
{
CardList list = gloriousAnthemList;
Card c;
//reset all cards in list - aka "old" cards
for(int i = 0; i < list.size(); i++)
{
c = list.get(i);
if (CardUtil.getColors(c).contains(Constant.Color.Green) && !c.getName().equals("Tolsimir Wolfblood")) {
c.setAttack(c.getAttack() - 1);
c.setDefense(c.getDefense() - 1);
}
if (CardUtil.getColors(c).contains(Constant.Color.White) && !c.getName().equals("Tolsimir Wolfblood")) {
c.setAttack(c.getAttack() - 1);
c.setDefense(c.getDefense() - 1);
}
}
//add +1/+1 to cards
list.clear();
PlayerZone[] zone = getZone("Tolsimir Wolfblood");
//for each zone found add +1/+1 to each card
for(int outer = 0; outer < zone.length; outer++)
{
CardList creature = new CardList(zone[outer].getCards());
creature = creature.getType("Creature");
for(int i = 0; i < creature.size(); i++)
{
c = creature.get(i);
if (CardUtil.getColors(c).contains(Constant.Color.Green) && !c.getName().equals("Tolsimir Wolfblood")) {
c.setAttack(c.getAttack() + 1);
c.setDefense(c.getDefense() + 1);
}
if (CardUtil.getColors(c).contains(Constant.Color.White) && !c.getName().equals("Tolsimir Wolfblood")) {
c.setAttack(c.getAttack() + 1);
c.setDefense(c.getDefense() + 1);
}
gloriousAnthemList.add(c);
}//for inner
}//for outer
}//execute()
};//Tolsimir
- Code: Select all
Tolsimir.execute();
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
1 post
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 145 guests