mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Added Snowfall
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user