mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
*Added Marc's Gerrard's Verdict.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user