mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Finish RestrictValid check early if cost is for effect
This commit is contained in:
@@ -312,8 +312,11 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restriction.startsWith("CostContainsX")) {
|
if (restriction.startsWith("CostContains")) {
|
||||||
if (sa.costHasManaX()) {
|
if (restriction.endsWith("X") && sa.costHasManaX()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (restriction.endsWith("C") && sa.getPayCosts().hasManaCost() && sa.getPayCosts().getCostMana().getManaToPay().getGenericCost() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@@ -338,6 +341,11 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the payment is for a resolving SA, currently no other restrictions would allow that
|
||||||
|
if (getSourceCard().getGame().getStack().getInstanceFromSpellAbility(sa.getRootAbility()) != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (sa.isValid(restriction, this.getSourceCard().getController(), this.getSourceCard(), null)) {
|
if (sa.isValid(restriction, this.getSourceCard().getController(), this.getSourceCard(), null)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ Name:Eldrazi Temple
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Eldrazi,Activated.Eldrazi+Colorless | SpellDescription$ Add {C}{C}. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi.
|
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Eldrazi+Colorless,Activated.Eldrazi+Colorless | SpellDescription$ Add {C}{C}. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi.
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
Oracle:{T}: Add {C}.\n{T}: Add {C}{C}. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi.
|
Oracle:{T}: Add {C}.\n{T}: Add {C}{C}. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi.
|
||||||
|
|||||||
Reference in New Issue
Block a user