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:
@@ -1,7 +1,11 @@
|
||||
Name:Gerrard's Verdict
|
||||
ManaCost:W B
|
||||
Types:Sorcery
|
||||
Text:Target player discards two cards. You gain 3 life for each land card discarded this way.
|
||||
Text:no text
|
||||
A:SP$ Discard | Cost$ W B | ValidTgts$ Player | TgtPrompt$ Select target player | Mode$ TgtChoose | NumCards$ 2 | RememberDiscarded$ True | SubAbility$ DBGainLife1 | SpellDescription$ Target player discards two cards. You gain 3 life for each land card discarded this way.
|
||||
SVar:DBGainLife1:DB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | SubAbility$ DBCleanup
|
||||
SVar:X:Remembered$Valid Land/Times.3
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/gerrards_verdict.jpg
|
||||
SetInfo:APC|Uncommon|http://magiccards.info/scans/en/ap/102.jpg
|
||||
|
||||
@@ -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