- Added Snowfall

This commit is contained in:
swordshine
2014-06-01 08:37:09 +00:00
parent 0be2903bad
commit d5326d61c0
5 changed files with 30 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -12169,6 +12169,7 @@ forge-gui/res/cardsfolder/s/snow_devil.txt svneol=native#text/plain
forge-gui/res/cardsfolder/s/snow_fortress.txt svneol=native#text/plain
forge-gui/res/cardsfolder/s/snow_hound.txt svneol=native#text/plain
forge-gui/res/cardsfolder/s/snowblind.txt -text
forge-gui/res/cardsfolder/s/snowfall.txt -text
forge-gui/res/cardsfolder/s/snuff_out.txt svneol=native#text/plain
forge-gui/res/cardsfolder/s/soar.txt -text
forge-gui/res/cardsfolder/s/soaring_hope.txt svneol=native#text/plain

View File

@@ -164,6 +164,7 @@ public class Upkeep extends Phase {
c.addCounter(CounterType.AGE, 1, true);
String cost = CardFactoryUtil.multiplyCost(k[1], c.getCounters(CounterType.AGE));
final Cost upkeepCost = new Cost(cost, true);
this.setCumulativeupkeep(true);
boolean isPaid = controller.getController().payManaOptional(c, upkeepCost, this, sb.toString(), ManaPaymentPurpose.CumulativeUpkeep);
final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("CumulativeUpkeepPaid", (Boolean) isPaid);

View File

@@ -285,6 +285,14 @@ public class AbilityManaPart implements java.io.Serializable {
return !sa.isSpell();
}
if (restriction.equals("CumulativeUpkeep")) {
if (sa.isCumulativeupkeep()) {
return true;
} else {
continue;
}
}
if (restriction.startsWith("CostContainsX")) {
if (sa.isXCost()) {
return true;

View File

@@ -90,6 +90,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private boolean delve = false;
private boolean offering = false;
private boolean morphup = false;
private boolean cumulativeupkeep = false;
private int totalManaSpent = 0;
/** The pay costs. */
@@ -1728,6 +1729,14 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
this.madness = madness;
}
public boolean isCumulativeupkeep() {
return cumulativeupkeep;
}
public void setCumulativeupkeep(boolean cumulativeupkeep) {
this.cumulativeupkeep = cumulativeupkeep;
}
// Return whether this spell tracks what color mana is spent to cast it for the sake of the effect
public boolean tracksManaSpent() {
if (this.hostCard == null || this.hostCard.getRules() == null) { return false; }

View File

@@ -0,0 +1,11 @@
Name:Snowfall
ManaCost:2 U
Types:Enchantment
K:Cumulative upkeep:U
T:Mode$ TapsForMana | ValidCard$ Island | Execute$ TrigMana | Static$ True | OptionalDecider$ TriggeredCardController | TriggerDescription$ Whenever an Island is tapped for mana, its controller may add {U} to his or her mana pool. If that Island is snow, its controller may add {U}{U} to his or her mana pool instead. Spend this mana only to pay cumulative upkeep costs. (in addition to the mana the land produces)
SVar:TrigMana:DB$ Mana | Produced$ U | Amount$ 1 | Defined$ TriggeredCardController | RestrictValid$ CumulativeUpkeep | ConditionDefined$ TriggeredCard | ConditionPresent$ Land.Snow | ConditionCompare$ EQ0 | SubAbility$ DBMana
SVar:DBMana:DB$ Mana | Produced$ U | Amount$ 2 | Defined$ TriggeredCardController | RestrictValid$ CumulativeUpkeep | ConditionDefined$ TriggeredCard | ConditionPresent$ Land.Snow | ConditionCompare$ GE1
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/snowfall.jpg
Oracle:Cumulative upkeep {U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)\nWhenever an Island is tapped for mana, its controller may add {U} to his or her mana pool. If that Island is snow, its controller may add {U}{U} to his or her mana pool instead. Spend this mana only to pay cumulative upkeep costs. (in addition to the mana the land produces)