mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Cyclone implemented. UnlessCost supports UnlessXColor to specify the color of mana which must be paid for X in an UnlessCost.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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
|
||||
|
||||
12
res/cardsfolder/c/cyclone.txt
Normal file
12
res/cardsfolder/c/cyclone.txt
Normal file
@@ -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
|
||||
@@ -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;
|
||||
@@ -1112,7 +1114,12 @@ public class AbilityUtils {
|
||||
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));
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user