mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Added Earwig Squad and Latchkey Faerie
This commit is contained in:
@@ -3123,6 +3123,7 @@ public class CardFactoryUtil {
|
||||
altCostSA.setRestrictions(restriction);
|
||||
altCostSA.setDescription(sb.toString());
|
||||
altCostSA.setBasicSpell(false);
|
||||
altCostSA.setAltCost(true);
|
||||
|
||||
return altCostSA;
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ public abstract class SpellAbility implements ISpellAbility {
|
||||
private boolean undoable;
|
||||
|
||||
private boolean isCopied = false;
|
||||
private boolean isAltCost = false;
|
||||
|
||||
public final AbilityManaPart getManaPart() {
|
||||
return manaPart;
|
||||
@@ -1756,5 +1757,23 @@ public abstract class SpellAbility implements ISpellAbility {
|
||||
public boolean isXCost() {
|
||||
CostPartMana cm = payCosts != null ? getPayCosts().getCostMana() : null;
|
||||
return cm != null && cm.getAmountOfX() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isAltCost the isAltCost to set
|
||||
*/
|
||||
public void setAltCost(boolean isAltCost) {
|
||||
this.isAltCost = isAltCost;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isAltCost
|
||||
*/
|
||||
public boolean isAltCost() {
|
||||
// only used in prowl, cannot distinguish the alt cost type currently
|
||||
// TODO : support the altcost type
|
||||
return isAltCost;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -74,6 +74,12 @@ public class TriggerSpellAbilityCast extends Trigger {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getMapParams().containsKey("AltCostSpellAbility")) {
|
||||
if (!spellAbility.isAltCost()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getMapParams().containsKey("ValidControllingPlayer")) {
|
||||
if (!matchesValid(cast.getController(), this.getMapParams().get("ValidControllingPlayer").split(","),
|
||||
|
||||
Reference in New Issue
Block a user