- Added Earwig Squad and Latchkey Faerie

This commit is contained in:
swordshine
2013-04-12 00:47:03 +00:00
parent 184e3469ca
commit 382de9bffd
6 changed files with 66 additions and 1 deletions

View File

@@ -3123,6 +3123,7 @@ public class CardFactoryUtil {
altCostSA.setRestrictions(restriction);
altCostSA.setDescription(sb.toString());
altCostSA.setBasicSpell(false);
altCostSA.setAltCost(true);
return altCostSA;
}

View File

@@ -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;
}
}

View File

@@ -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(","),