mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58: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
|
Name:Stabilizer
|
||||||
ManaCost:2
|
ManaCost:2
|
||||||
Types:Artifact
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/stabilizer.jpg
|
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 alwaysWither = false;
|
||||||
private boolean noLegendRule = false;
|
private boolean noLegendRule = false;
|
||||||
private boolean manapoolsDontEmpty = false;
|
private boolean manapoolsDontEmpty = false;
|
||||||
|
private boolean noCycling = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clearStaticEffect. TODO Write javadoc for this method.
|
* clearStaticEffect. TODO Write javadoc for this method.
|
||||||
@@ -60,6 +61,7 @@ public class StaticEffects {
|
|||||||
alwaysWither = false;
|
alwaysWither = false;
|
||||||
noLegendRule = false;
|
noLegendRule = false;
|
||||||
manapoolsDontEmpty = false;
|
manapoolsDontEmpty = false;
|
||||||
|
noCycling = false;
|
||||||
|
|
||||||
// remove all static effects
|
// remove all static effects
|
||||||
for (int i = 0; i < this.staticEffects.size(); i++) {
|
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.
|
* addStaticEffect. TODO Write javadoc for this method.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public abstract class AbilityActivated extends SpellAbility implements java.io.S
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isCycling() && Singletons.getModel().getGame().isCardInPlay("Stabilizer")) {
|
if (this.isCycling() && Singletons.getModel().getGame().getStaticEffects().isNoCycling()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ public class StaticAbilityContinuous {
|
|||||||
effects.setNoLegendRule(true);
|
effects.setNoLegendRule(true);
|
||||||
} else if (params.get("GlobalRule").equals("Mana pools don't empty as steps and phases end.")) {
|
} else if (params.get("GlobalRule").equals("Mana pools don't empty as steps and phases end.")) {
|
||||||
effects.setManapoolsDontEmpty(true);
|
effects.setManapoolsDontEmpty(true);
|
||||||
|
} else if (params.get("GlobalRule").equals("Players can't cycle cards.")) {
|
||||||
|
effects.setNoCycling(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user