mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added the global rule change: "Players can't cycle cards.".
- Converted Stabilizer to script.
This commit is contained in:
@@ -51,6 +51,7 @@ public class StaticEffects {
|
||||
private boolean alwaysWither = false;
|
||||
private boolean noLegendRule = false;
|
||||
private boolean manapoolsDontEmpty = false;
|
||||
private boolean noCycling = false;
|
||||
|
||||
/**
|
||||
* clearStaticEffect. TODO Write javadoc for this method.
|
||||
@@ -60,6 +61,7 @@ public class StaticEffects {
|
||||
alwaysWither = false;
|
||||
noLegendRule = false;
|
||||
manapoolsDontEmpty = false;
|
||||
noCycling = false;
|
||||
|
||||
// remove all static effects
|
||||
for (int i = 0; i < this.staticEffects.size(); i++) {
|
||||
@@ -129,6 +131,21 @@ public class StaticEffects {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the noCycling
|
||||
*/
|
||||
public boolean isNoCycling() {
|
||||
return noCycling;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param noCycling0 the noCycling to set
|
||||
*/
|
||||
public void setNoCycling(boolean noCyc) {
|
||||
this.noCycling = noCyc;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* addStaticEffect. TODO Write javadoc for this method.
|
||||
*
|
||||
|
||||
@@ -105,7 +105,7 @@ public abstract class AbilityActivated extends SpellAbility implements java.io.S
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.isCycling() && Singletons.getModel().getGame().isCardInPlay("Stabilizer")) {
|
||||
if (this.isCycling() && Singletons.getModel().getGame().getStaticEffects().isNoCycling()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,8 @@ public class StaticAbilityContinuous {
|
||||
effects.setNoLegendRule(true);
|
||||
} else if (params.get("GlobalRule").equals("Mana pools don't empty as steps and phases end.")) {
|
||||
effects.setManapoolsDontEmpty(true);
|
||||
} else if (params.get("GlobalRule").equals("Players can't cycle cards.")) {
|
||||
effects.setNoCycling(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user