- 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

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

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

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; }