BW spells
Posted: 24 Sep 2008, 22:41
In this topic I will add some black / white multicolored spells.
I'll start with Gerrard's Verdict:
I found it's impossible to have the computer discard any land cards (without setting the bool smoothManaCurve to false, thanks JPB!). But the AI can use this spell on you, and will gain 3 life per land card you discard.
In cards.txt:
I'll start with Gerrard's Verdict:
I found it's impossible to have the computer discard any land cards (without setting the bool smoothManaCurve to false, thanks JPB!). But the AI can use this spell on you, and will gain 3 life per land card you discard.
In cards.txt:
- Code: Select all
Gerrard's Verdict
W B
Sorcery
Target player discards two cards. You gain 3 life for each land card discarded this way.
- Code: Select all
//*************** START *********** START **************************
if(cardName.equals("Gerrard's Verdict"))
{
SpellAbility spell = new Spell(card)
{
public boolean canPlayAI()
{
PlayerZone humanHand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Human);
if (humanHand.size() >= 2)
return true;
else
return false;
}
public void resolve()
{
String player = card.getController();
if(player.equals(Constant.Player.Human))
humanResolve();
else
computerResolve();
}
public void humanResolve()
{
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
CardList list = new CardList(hand.getCards());
list.shuffle();
if (list.size()== 0)
return;
Card c1 = list.get(0);
list.remove(c1);
AllZone.Computer_Graveyard.add(c1);
AllZone.Computer_Hand.remove(c1);
if (list.size()== 0)
return;
Card c2 = list.get(0);
list.remove(c2);
AllZone.Computer_Graveyard.add(c2);
AllZone.Computer_Hand.remove(c2);
if (c1.getType().contains("Land")) {
PlayerLife life = AllZone.GameAction.getPlayerLife(Constant.Player.Human);
life.addLife(3);
}
if (c2.getType().contains("Land")) {
PlayerLife life = AllZone.GameAction.getPlayerLife(Constant.Player.Human);
life.addLife(3);
}
}//resolve()
public void computerResolve()
{
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Human);
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, Constant.Player.Human);
CardList list = new CardList(hand.getCards());
Object o = AllZone.Display.getChoiceOptional("First card to discard", list.toArray());
Card c = (Card)o;
list.remove(c);
hand.remove(c);
grave.add(c);
if(c.getType().contains("Land")) {
PlayerLife life = AllZone.GameAction.getPlayerLife(Constant.Player.Computer);
life.addLife(3);
}
Object o2 = AllZone.Display.getChoiceOptional("Second card to discard", list.toArray());
Card c2 = (Card)o2;
list.remove(c2);
hand.remove(c2);
grave.add(c2);
if(c2.getType().contains("Land")) {
PlayerLife life = AllZone.GameAction.getPlayerLife(Constant.Player.Computer);
life.addLife(3);
}
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************