From ada0948fb302087d36aeec3c83620b0a11861669 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 25 Sep 2015 17:56:46 +0000 Subject: [PATCH] - Fixed ExiledMoveToGrave cost for optional triggers. - Fixed script of Ulamog's Reclaimer. --- forge-gui/res/cardsfolder/u/ulamogs_despoiler.txt | 2 +- forge-gui/res/cardsfolder/u/ulamogs_reclaimer.txt | 3 +-- .../src/main/java/forge/player/HumanCostDecision.java | 10 +++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/forge-gui/res/cardsfolder/u/ulamogs_despoiler.txt b/forge-gui/res/cardsfolder/u/ulamogs_despoiler.txt index 8a557c9c1f3..184ca143e4c 100644 --- a/forge-gui/res/cardsfolder/u/ulamogs_despoiler.txt +++ b/forge-gui/res/cardsfolder/u/ulamogs_despoiler.txt @@ -3,6 +3,6 @@ ManaCost:6 Types:Creature Eldrazi Processor PT:5/5 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounters | TriggerDescription$ As CARDNAME enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, CARDNAME enters the battlefield with four +1/+1 counters on it. -SVar:TrigPutCounters:AB$PutCounter | Cost$ ExiledMoveToGrave<2/Card.OppOwn/card an opponent owns> | Defined$ Self | CounterType$ P1P1 | CounterNum$ 4 +SVar:TrigPutCounters:AB$ PutCounter | Cost$ ExiledMoveToGrave<2/Card.OppOwn/card an opponent owns> | Defined$ Self | CounterType$ P1P1 | CounterNum$ 4 SVar:Picture:http://www.wizards.com/global/images/magic/general/ulamogs_despoiler.jpg Oracle:As Ulamog's Despoiler enters the battlefield, you may put two cards your opponents own from exile into their owners' graveyards. If you do, Ulamog's Despoiler enters the battlefield with four +1/+1 counters on it. diff --git a/forge-gui/res/cardsfolder/u/ulamogs_reclaimer.txt b/forge-gui/res/cardsfolder/u/ulamogs_reclaimer.txt index b4633e7d480..a46f45891f5 100644 --- a/forge-gui/res/cardsfolder/u/ulamogs_reclaimer.txt +++ b/forge-gui/res/cardsfolder/u/ulamogs_reclaimer.txt @@ -4,7 +4,6 @@ Types:Creature Eldrazi Processor PT:2/5 K:Devoid T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target instant or sorcery card from your graveyard to your hand. -SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Origin$ Exile | Destination$ Graveyard | ValidTgts$ Card.OppOwn | SubAbility$ DBChangeZone -SVar:DBChangeZone:DB$ ChangeZone | ValidTgts$ Instant.YouOwn,Sorcery.YouOwn | TgtPrompt$ Select target instant or sorcery | Origin$ Graveyard | Destination$ Hand +SVar:TrigChangeZone:AB$ ChangeZone | Cost$ ExiledMoveToGrave<1/Card.OppOwn/card an opponent owns> | ValidTgts$ Instant.YouOwn,Sorcery.YouOwn | TgtPrompt$ Select target instant or sorcery | Origin$ Graveyard | Destination$ Hand SVar:Picture:http://www.wizards.com/global/images/magic/general/ulamogs_reclaimer.jpg Oracle:Devoid (This card has no color.)\nWhen Ulamog's Reclaimer enters the battlefield, you may put a card an opponent owns from exile into that player's graveyard. If you do, return target instant or sorcery card from your graveyard to your hand. diff --git a/forge-gui/src/main/java/forge/player/HumanCostDecision.java b/forge-gui/src/main/java/forge/player/HumanCostDecision.java index 1f22195feda..9ab752813b1 100644 --- a/forge-gui/src/main/java/forge/player/HumanCostDecision.java +++ b/forge-gui/src/main/java/forge/player/HumanCostDecision.java @@ -453,7 +453,15 @@ public class HumanCostDecision extends CostDecisionMakerBase { if (list.size() < c) { return null; } - final CardCollection choice = controller.getGame().getCardList(controller.getGui().many("Choose an exiled card to put into graveyard", "To graveyard", c, CardView.getCollection(list), CardView.get(source))); + Integer min = c; + if (ability.isOptionalTrigger()) { + min = 0; + } + final CardCollection choice = controller.getGame().getCardList(controller.getGui().many("Choose an exiled card to put into graveyard", "To graveyard", min, c, CardView.getCollection(list), CardView.get(source))); + + if (choice == null || choice.size() < c) { + return null; + } return PaymentDecision.card(choice); }