mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- An accurate script of Ashling, the Extinguisher Avatar
- Karn's Ultimate can be used in Variants
This commit is contained in:
@@ -2,7 +2,6 @@ Name:Ashling, the Extinguisher Avatar
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Vanguard
|
Types:Vanguard
|
||||||
HandLifeModifier:+1/-3
|
HandLifeModifier:+1/-3
|
||||||
A:AB$ DestroyAll | ActivationZone$ Command | Cost$ 5 | ValidCards$ Permanent.nonLand | PlayerTurn$ True | SubAbility$ DBRemoveAB | SpellDescription$ Destroy all nonland permanents. Activate this ability only once and only during your turn.
|
A:AB$ DestroyAll | ActivationZone$ Command | Cost$ 5 | ValidCards$ Permanent.nonLand | PlayerTurn$ True | GameActivationLimit$ 1 | SpellDescription$ Destroy all nonland permanents. Activate this ability only once and only during your turn.
|
||||||
SVar:DBRemoveAB:DB$ Animate | RemoveAllAbilities$ True | Permanent$ True
|
|
||||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/ashling_the_extinguisher_avatar.jpg
|
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/ashling_the_extinguisher_avatar.jpg
|
||||||
Oracle:Hand +1, life -3\n{5}: Destroy all nonland permanents. Activate this ability only once and only during your turn.
|
Oracle:Hand +1, life -3\n{5}: Destroy all nonland permanents. Activate this ability only once and only during your turn.
|
||||||
@@ -76,6 +76,7 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
|||||||
player.setPoisonCounters(0, sa.getSourceCard());
|
player.setPoisonCounters(0, sa.getSourceCard());
|
||||||
player.setNumLandsPlayed(0);
|
player.setNumLandsPlayed(0);
|
||||||
GameNew.putCardsOnBattlefield(player, psc.getCardsOnBattlefield(player));
|
GameNew.putCardsOnBattlefield(player, psc.getCardsOnBattlefield(player));
|
||||||
|
GameNew.initVariantsZones(player, psc);
|
||||||
|
|
||||||
List<Card> newLibrary = playerLibraries.get(player);
|
List<Card> newLibrary = playerLibraries.get(player);
|
||||||
for (Card c : newLibrary) {
|
for (Card c : newLibrary) {
|
||||||
|
|||||||
@@ -219,6 +219,10 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((this.getGameActivationLimit() != -1) && (this.getNumberGameActivations() >= this.getGameActivationLimit())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getPhases().size() > 0) {
|
if (this.getPhases().size() > 0) {
|
||||||
boolean isPhase = false;
|
boolean isPhase = false;
|
||||||
final PhaseType currPhase = game.getPhaseHandler().getPhase();
|
final PhaseType currPhase = game.getPhaseHandler().getPhase();
|
||||||
|
|||||||
@@ -125,6 +125,10 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
|||||||
this.setLimitToCheck(params.get("ActivationLimit"));
|
this.setLimitToCheck(params.get("ActivationLimit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("GameActivationLimit")) {
|
||||||
|
this.setGameLimitToCheck(params.get("GameActivationLimit"));
|
||||||
|
}
|
||||||
|
|
||||||
if (params.containsKey("ActivationNumberSacrifice")) {
|
if (params.containsKey("ActivationNumberSacrifice")) {
|
||||||
this.setActivationNumberSacrifice(Integer.parseInt(params.get("ActivationNumberSacrifice")));
|
this.setActivationNumberSacrifice(Integer.parseInt(params.get("ActivationNumberSacrifice")));
|
||||||
}
|
}
|
||||||
@@ -331,6 +335,16 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.getGameLimitToCheck() != null) {
|
||||||
|
String limit = this.getGameLimitToCheck();
|
||||||
|
int gameActivationLimit = AbilityUtils.calculateAmount(c, limit, sa);
|
||||||
|
this.setGameActivationLimit(gameActivationLimit);
|
||||||
|
|
||||||
|
if ((this.getGameActivationLimit() != -1) && (this.getNumberGameActivations() >= this.getGameActivationLimit())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getCardsInHand() != -1) {
|
if (this.getCardsInHand() != -1) {
|
||||||
if (activator.getCardsIn(ZoneType.Hand).size() != this.getCardsInHand()) {
|
if (activator.getCardsIn(ZoneType.Hand).size() != this.getCardsInHand()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ public class SpellAbilityVariables {
|
|||||||
this.opponentTurn = sav.isOpponentTurn();
|
this.opponentTurn = sav.isOpponentTurn();
|
||||||
this.playerTurn = sav.isPlayerTurn();
|
this.playerTurn = sav.isPlayerTurn();
|
||||||
this.activationLimit = sav.getActivationLimit();
|
this.activationLimit = sav.getActivationLimit();
|
||||||
|
this.gameActivationLimit = sav.getGameActivationLimit();
|
||||||
this.numberTurnActivations = sav.getNumberTurnActivations();
|
this.numberTurnActivations = sav.getNumberTurnActivations();
|
||||||
|
this.numberGameActivations = sav.getNumberGameActivations();
|
||||||
this.activationNumberSacrifice = sav.getActivationNumberSacrifice();
|
this.activationNumberSacrifice = sav.getActivationNumberSacrifice();
|
||||||
this.cardsInHand = sav.getCardsInHand();
|
this.cardsInHand = sav.getCardsInHand();
|
||||||
this.chosenColors = sav.getColorToCheck();
|
this.chosenColors = sav.getColorToCheck();
|
||||||
@@ -114,12 +116,21 @@ public class SpellAbilityVariables {
|
|||||||
/** The activation limit. */
|
/** The activation limit. */
|
||||||
private int activationLimit = -1;
|
private int activationLimit = -1;
|
||||||
|
|
||||||
|
/** The game activation limit. */
|
||||||
|
private int gameActivationLimit = -1;
|
||||||
|
|
||||||
/** The limitToCheck to check. */
|
/** The limitToCheck to check. */
|
||||||
private String limitToCheck = null;
|
private String limitToCheck = null;
|
||||||
|
|
||||||
|
/** The gameLimitToCheck to check. */
|
||||||
|
private String gameLimitToCheck = null;
|
||||||
|
|
||||||
/** The number turn activations. */
|
/** The number turn activations. */
|
||||||
private int numberTurnActivations = 0;
|
private int numberTurnActivations = 0;
|
||||||
|
|
||||||
|
/** The number game activations. */
|
||||||
|
private int numberGameActivations = 0;
|
||||||
|
|
||||||
/** The activation number sacrifice. */
|
/** The activation number sacrifice. */
|
||||||
private int activationNumberSacrifice = -1;
|
private int activationNumberSacrifice = -1;
|
||||||
|
|
||||||
@@ -346,6 +357,18 @@ public class SpellAbilityVariables {
|
|||||||
this.activationLimit = limit;
|
this.activationLimit = limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Setter for the field <code>gameActivationLimit</code>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param limit
|
||||||
|
* a int.
|
||||||
|
*/
|
||||||
|
public final void setGameActivationLimit(final int limit) {
|
||||||
|
this.gameActivationLimit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* abilityActivated.
|
* abilityActivated.
|
||||||
@@ -353,6 +376,7 @@ public class SpellAbilityVariables {
|
|||||||
*/
|
*/
|
||||||
public final void abilityActivated() {
|
public final void abilityActivated() {
|
||||||
this.numberTurnActivations++;
|
this.numberTurnActivations++;
|
||||||
|
this.numberGameActivations++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -366,6 +390,17 @@ public class SpellAbilityVariables {
|
|||||||
return this.numberTurnActivations;
|
return this.numberTurnActivations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Getter for the field <code>numberTurnActivations</code>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @return a int.
|
||||||
|
*/
|
||||||
|
public final int getNumberGameActivations() {
|
||||||
|
return this.numberGameActivations;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* resetTurnActivations.
|
* resetTurnActivations.
|
||||||
@@ -619,6 +654,15 @@ public class SpellAbilityVariables {
|
|||||||
return this.activationLimit;
|
return this.activationLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the activation limit.
|
||||||
|
*
|
||||||
|
* @return the activationLimit
|
||||||
|
*/
|
||||||
|
public final int getGameActivationLimit() {
|
||||||
|
return this.gameActivationLimit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Setter for the field <code>limitToCheck</code>.
|
* Setter for the field <code>limitToCheck</code>.
|
||||||
@@ -631,6 +675,18 @@ public class SpellAbilityVariables {
|
|||||||
this.limitToCheck = limit;
|
this.limitToCheck = limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Setter for the field <code>GamelimitToCheck</code>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param limit
|
||||||
|
* a {@link java.lang.String} object.
|
||||||
|
*/
|
||||||
|
public final void setGameLimitToCheck(final String limit) {
|
||||||
|
this.gameLimitToCheck = limit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Getter for the field <code>limitToCheck</code>.
|
* Getter for the field <code>limitToCheck</code>.
|
||||||
@@ -643,6 +699,18 @@ public class SpellAbilityVariables {
|
|||||||
return this.limitToCheck;
|
return this.limitToCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Getter for the field <code>getGameLimitToCheck</code>.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @return the getGameLimitToCheck
|
||||||
|
* a {@link java.lang.String} object.
|
||||||
|
*/
|
||||||
|
public final String getGameLimitToCheck() {
|
||||||
|
return this.gameLimitToCheck;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is threshold.
|
* Checks if is threshold.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class GameNew {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initVariantsZones(final Player player, final RegisteredPlayer psc) {
|
public static void initVariantsZones(final Player player, final RegisteredPlayer psc) {
|
||||||
PlayerZone com = player.getZone(ZoneType.Command);
|
PlayerZone com = player.getZone(ZoneType.Command);
|
||||||
|
|
||||||
// Mainly for avatar, but might find something else here
|
// Mainly for avatar, but might find something else here
|
||||||
|
|||||||
Reference in New Issue
Block a user