*Added Marc's Gerrard's Verdict.

This commit is contained in:
Hellfish
2011-11-22 08:08:51 +00:00
parent b739912f3f
commit 618c6122d8
2 changed files with 5 additions and 92 deletions

View File

@@ -1150,97 +1150,6 @@ public class CardFactorySorceries {
spell.setBeforePayMana(runtime);
} // *************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Gerrard's Verdict")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 4734024742326763385L;
@Override
public boolean canPlayAI() {
final PlayerZone humanHand = AllZone.getHumanPlayer().getZone(Constant.Zone.Hand);
if (humanHand.size() >= 2) {
return true;
} else {
return false;
}
}
@Override
public void resolve() {
final Player player = card.getController();
if (player.isHuman()) {
this.humanResolve();
} else {
this.computerResolve();
}
}
public void humanResolve() {
final CardList list = AllZone.getComputerPlayer().getCardsIn(Zone.Hand);
list.shuffle();
if (list.size() == 0) {
return;
}
final Card c1 = list.get(0);
list.remove(c1);
c1.getController().discard(c1, null);
if (list.size() == 0) {
return;
}
final Card c2 = list.get(0);
list.remove(c2);
c2.getController().discard(c2, null);
if (c1.isLand()) {
AllZone.getHumanPlayer().gainLife(3, card);
}
if (c2.isLand()) {
AllZone.getHumanPlayer().gainLife(3, card);
}
} // resolve()
public void computerResolve() {
final CardList list = AllZone.getHumanPlayer().getCardsIn(Zone.Hand);
if (list.size() > 0) {
final Object o = GuiUtils.getChoiceOptional("First card to discard", list.toArray());
final Card c = (Card) o;
list.remove(c);
c.getController().discard(c, null);
if (c.isLand()) {
AllZone.getComputerPlayer().gainLife(3, card);
}
if (list.size() > 0) {
final Object o2 = GuiUtils.getChoiceOptional("Second card to discard", list.toArray());
final Card c2 = (Card) o2;
list.remove(c2);
c2.getController().discard(c2, null);
if (c2.isLand()) {
AllZone.getComputerPlayer().gainLife(3, card);
}
}
}
}
};
card.addSpellAbility(spell);
} // *************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Mind Funeral")) {
final Cost cost = new Cost("1 U B", cardName, false);