mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Added the global rule change: "Players can't cycle cards.".
- Converted Stabilizer to script.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
Name:Stabilizer
|
||||
ManaCost:2
|
||||
Types:Artifact
|
||||
Text:Players can't cycle cards.
|
||||
Text:no text
|
||||
S:Mode$ Continuous | GlobalRule$ Players can't cycle cards. | Description$ Players can't cycle cards.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/stabilizer.jpg
|
||||
|
||||
@@ -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