Tested consume_spirit.txt with Announce with X that must be colored - works!

This commit is contained in:
Maxmtg
2013-04-03 19:12:55 +00:00
parent 7ffd8008d5
commit d4d19f4f65
2 changed files with 2 additions and 4 deletions

View File

@@ -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

View File

@@ -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");