From d4d19f4f652d7ffcc85a0f0bbdf1ca777950a88a Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Wed, 3 Apr 2013 19:12:55 +0000 Subject: [PATCH] Tested consume_spirit.txt with Announce with X that must be colored - works! --- res/cardsfolder/c/consume_spirit.txt | 2 +- src/main/java/forge/card/cost/CostPartMana.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/res/cardsfolder/c/consume_spirit.txt b/res/cardsfolder/c/consume_spirit.txt index a6b7b2cfc31..1aba348946c 100644 --- a/res/cardsfolder/c/consume_spirit.txt +++ b/res/cardsfolder/c/consume_spirit.txt @@ -1,7 +1,7 @@ Name:Consume Spirit ManaCost:X 1 B Types:Sorcery -A:SP$DealDamage | Cost$ X 1 B | XColor$ B | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ X | SubAbility$ DBGainLife | References$ X | SpellDescription$ Spend only black mana on X. Consume Spirit deals X damage to target creature or player and you gain X life. +A:SP$DealDamage | Cost$ X 1 B | XColor$ B | Announce$ X | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ X | SubAbility$ DBGainLife | References$ X | SpellDescription$ Spend only black mana on X. Consume Spirit deals X damage to target creature or player and you gain X life. SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ X | References$ X SVar:X:Count$xPaid SVar:RemAIDeck:True diff --git a/src/main/java/forge/card/cost/CostPartMana.java b/src/main/java/forge/card/cost/CostPartMana.java index e6d5717ee8d..f4422e3487c 100644 --- a/src/main/java/forge/card/cost/CostPartMana.java +++ b/src/main/java/forge/card/cost/CostPartMana.java @@ -118,9 +118,7 @@ public class CostPartMana extends CostPart { final Card source = ability.getSourceCard(); ManaCostBeingPaid toPay = new ManaCostBeingPaid(getManaToPay()); - if (this.getAmountOfX() > 0 && !ability.getSVar("X").equals("Count$xPaid")) { - // if X cost is a defined value, other than xPaid - + if (this.getAmountOfX() > 0 && !ability.getSVar("X").equals("Count$xPaid")) { // announce X will overwrite whatever was in card script // this currently only works for things about Targeted object int xCost = AbilityUtils.calculateAmount(source, "X", ability) * this.getAmountOfX(); byte xColor = MagicColor.fromName(ability.hasParam("XColor") ? ability.getParam("XColor") : "1");