diff --git a/.gitattributes b/.gitattributes index ee1d2ca7ad4..2d11291e4c3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2261,6 +2261,7 @@ res/cardsfolder/c/cut_the_earthly_bond.txt svneol=native#text/plain res/cardsfolder/c/cut_the_tethers.txt -text res/cardsfolder/c/cutthroat_il_dal.txt svneol=native#text/plain res/cardsfolder/c/cyclical_evolution.txt svneol=native#text/plain +res/cardsfolder/c/cyclone.txt -text res/cardsfolder/c/cyclonic_rift.txt -text res/cardsfolder/c/cyclopean_giant.txt svneol=native#text/plain res/cardsfolder/c/cyclopean_mummy.txt svneol=native#text/plain diff --git a/res/cardsfolder/c/cyclone.txt b/res/cardsfolder/c/cyclone.txt new file mode 100644 index 00000000000..b2ec83e54e2 --- /dev/null +++ b/res/cardsfolder/c/cyclone.txt @@ -0,0 +1,12 @@ +Name:Cyclone +ManaCost:2 G G +Types:Enchantment +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a wind counter on CARDNAME, then sacrifice CARDNAME unless you pay G for each wind counter on it. If you pay, CARDNAME deals damage equal to the number of wind counters on it to each creature and each player. +SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ WIND | CounterNum$ 1 | SubAbility$ SacSelf +SVar:SacSelf:DB$ Sacrifice | Defined$ Card.Self | UnlessCost$ X | UnlessXColor$ G | UnlessPayer$ You | UnlessResolveSubs$ WhenPaid | SubAbility$ DBDamageAll | References$ X +SVar:DBDamageAll:DB$ DamageAll | NumDmg$ X | ValidCards$ Creature | ValidPlayers$ Each | References$ X +SVar:X:Count$CardCounters.WIND +SVar:Picture:http://www.wizards.com/global/images/magic/general/cyclone.jpg +Oracle:At the beginning of your upkeep, put a wind counter on Cyclone, then sacrifice Cyclone unless you pay {G} for each wind counter on it. If you pay, Cyclone deals damage equal to the number of wind counters on it to each creature and each player. +SetInfo:CHR Rare +SetInfo:ARN Uncommon diff --git a/src/main/java/forge/card/ability/AbilityUtils.java b/src/main/java/forge/card/ability/AbilityUtils.java index 7a2d04468a4..289c85e5817 100644 --- a/src/main/java/forge/card/ability/AbilityUtils.java +++ b/src/main/java/forge/card/ability/AbilityUtils.java @@ -5,6 +5,8 @@ import java.util.Arrays; import java.util.List; +import forge.card.MagicColor; +import forge.card.mana.ManaCostShard; import org.apache.commons.lang3.StringUtils; import forge.Card; @@ -1111,8 +1113,13 @@ public class AbilityUtils { newCost.decreaseColorlessMana(2); unlessCost = newCost.toString(); } else if( !StringUtils.isBlank(sa.getSVar(unlessCost)) || !StringUtils.isBlank(source.getSVar(unlessCost))) { - // check for X costs (stored in SVars - unlessCost = Integer.toString(calculateAmount(source, sa.getParam("UnlessCost").replace(" ", ""), sa)); + // check for X costs (stored in SVars + int xCost = calculateAmount(source, sa.getParam("UnlessCost").replace(" ", ""), sa); + //Check for XColor + ManaCostBeingPaid toPay = new ManaCostBeingPaid("0"); + byte xColor = MagicColor.fromName(sa.hasParam("UnlessXColor") ? sa.getParam("UnlessXColor") : "1"); + toPay.increaseShard(ManaCostShard.valueOf(xColor), xCost); + unlessCost = toPay.toString(); } final Cost cost = new Cost(unlessCost, true);