mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-13 17:27:46 +00:00
Merge branch 'restrictvalid' into 'master'
Finish RestrictValid check early if cost is for effect Closes #2116 See merge request core-developers/forge!6413
This commit is contained in:
@@ -312,8 +312,11 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (restriction.startsWith("CostContainsX")) {
|
||||
if (sa.costHasManaX()) {
|
||||
if (restriction.startsWith("CostContains")) {
|
||||
if (restriction.endsWith("X") && sa.costHasManaX()) {
|
||||
return true;
|
||||
}
|
||||
if (restriction.endsWith("C") && sa.getPayCosts().hasManaCost() && sa.getPayCosts().getCostMana().getManaToPay().getShardCount(ManaCostShard.COLORLESS) > 0) {
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
@@ -338,6 +341,11 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
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)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:no cost
|
||||
Types:Land
|
||||
K:CARDNAME enters the battlefield tapped.
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | RestrictValid$ Spell.Cleric,Spell.Rogue,Spell.Warrior,Spell.Wizard,Activated.Cleric,Activated.Rogue,Activated.Warrior,Activated.Wizard | SpellDescription$ Add one mana of any color. Spend this mana only to cast a Cleric, Rogue, Warrior, or Wizard spell or to activate an ability of a Cleric, Rogue, Warrior, or Wizard.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | RestrictValid$ Spell.Cleric,Spell.Rogue,Spell.Warrior,Spell.Wizard,Activated.Cleric+inZoneBattlefield,Activated.Rogue+inZoneBattlefield,Activated.Warrior+inZoneBattlefield,Activated.Wizard+inZoneBattlefield | SpellDescription$ Add one mana of any color. Spend this mana only to cast a Cleric, Rogue, Warrior, or Wizard spell or to activate an ability of a Cleric, Rogue, Warrior, or Wizard.
|
||||
DeckHas:Ability$Party
|
||||
DeckHints:Type$Cleric|Rogue|Warrior|Wizard
|
||||
Oracle:Base Camp enters the battlefield tapped.\n{T}: Add {C}.\n{T}: Add one mana of any color. Spend this mana only to cast a Cleric, Rogue, Warrior, or Wizard spell or to activate an ability of a Cleric, Rogue, Warrior, or Wizard.
|
||||
|
||||
@@ -4,5 +4,5 @@ Types:Land
|
||||
K:ETBReplacement:Other:LandTapped
|
||||
SVar:LandTapped:DB$ Tap | Defined$ Self | ETB$ True | ConditionPresent$ Forest.YouCtrl | ConditionCompare$ EQ0 | SpellDescription$ CARDNAME enters the battlefield tapped unless you control a Forest.
|
||||
A:AB$ Mana | Cost$ T | Produced$ G | SpellDescription$ Add {G}.
|
||||
A:AB$ Mana | Cost$ 2 G G T | Produced$ G | Amount$ 6 | RestrictValid$ Spell.Creature,Activated.Creature | SpellDescription$ Add six {G}. Spend this mana only to cast creature spells or activate abilities of creatures.
|
||||
A:AB$ Mana | Cost$ 2 G G T | Produced$ G | Amount$ 6 | RestrictValid$ Spell.Creature,Activated.Creature+inZoneBattlefield | SpellDescription$ Add six {G}. Spend this mana only to cast creature spells or activate abilities of creatures.
|
||||
Oracle:Castle Garenbrig enters the battlefield tapped unless you control a Forest.\n{T}: Add {G}.\n{2}{G}{G}, {T}: Add six {G}. Spend this mana only to cast creature spells or activate abilities of creatures.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:no cost
|
||||
Types:Land
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||
A:AB$ PutCounter | Cost$ 1 T | CounterType$ STORAGE | CounterNum$ 1 | SpellDescription$ Put a storage counter on CARDNAME.
|
||||
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ Combo Any | Amount$ X | RestrictValid$ Spell.Dragon,Activated.Dragon | CostDesc$ {T}, Remove X storage counters from CARDNAME: | SpellDescription$ Add X mana in any combination of colors. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
|
||||
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ Combo Any | Amount$ X | RestrictValid$ Spell.Dragon,Activated.Dragon+inZoneBattlefield | CostDesc$ {T}, Remove X storage counters from CARDNAME: | SpellDescription$ Add X mana in any combination of colors. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
|
||||
SVar:X:Count$xPaid
|
||||
AI:RemoveDeck:All
|
||||
Oracle:{T}: Add {C}.\n{1}, {T}: Put a storage counter on Crucible of the Spirit Dragon.\n{T}, Remove X storage counters from Crucible of the Spirit Dragon: Add X mana in any combination of colors. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
|
||||
|
||||
@@ -3,6 +3,6 @@ ManaCost:2 U
|
||||
Types:Creature Eldrazi Drone
|
||||
PT:2/3
|
||||
K:Devoid
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 1 | RestrictValid$ Spell.Colorless,Activated.Permanent+Colorless,CostContainsC | SpellDescription$ Add {C}. Spend this mana only to cast a colorless spell, activate an ability of a colorless permanent, or pay a cost that contains {C}. ({C} represents colorless mana.)
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 1 | RestrictValid$ Spell.Colorless,Activated.Permanent+Colorless+inZoneBattlefield,CostContainsC | SpellDescription$ Add {C}. Spend this mana only to cast a colorless spell, activate an ability of a colorless permanent, or pay a cost that contains {C}. ({C} represents colorless mana.)
|
||||
DeckHas:Ability$Mana.Colorless
|
||||
Oracle:Devoid (This card has no color.)\n{T}: Add {C}. Spend this mana only to cast a colorless spell, activate an ability of a colorless permanent, or pay a cost that contains {C}. ({C} represents colorless mana.)
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Dalakos, Crafter of Wonders
|
||||
ManaCost:1 U R
|
||||
Types:Legendary Creature Merfolk Artificer
|
||||
PT:2/4
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
S:Mode$ Continuous | Affected$ Creature.YouCtrl+equipped | AddKeyword$ Flying & Haste | Description$ Equipped creatures you control have flying and haste.
|
||||
SVar:NonStackingEffect:True
|
||||
SVar:PlayMain1:TRUE
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Dustin, Gadget Genius
|
||||
ManaCost:2 W U
|
||||
Types:Legendary Creature Human
|
||||
PT:2/3
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
K:Friends forever
|
||||
DeckNeeds:Type$Artifact
|
||||
Oracle:{T}: Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.\nFriends forever (You can have two commanders if both have friends forever.)
|
||||
|
||||
@@ -2,6 +2,6 @@ Name:Eldrazi Temple
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
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+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi.
|
||||
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.
|
||||
|
||||
@@ -4,6 +4,6 @@ Types:Creature Vedalken Artificer
|
||||
PT:1/3
|
||||
S:Mode$ Continuous | Affected$ Creature.Blue+Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Other blue creatures you control get +1/+1.
|
||||
A:AB$ Animate | Cost$ U | ValidTgts$ Creature.Artifact | TgtPrompt$ Select target artifact creature | Colors$ Blue | OverwriteColors$ True | SpellDescription$ Target artifact creature becomes blue until end of turn.
|
||||
A:AB$ Mana | Cost$ tapXType<1/Creature.Blue> | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ tapXType<1/Creature.Blue> | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:Other blue creatures you control get +1/+1.\n{U}: Target artifact creature becomes blue until end of turn.\nTap an untapped blue creature you control: Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Myr Reservoir
|
||||
ManaCost:3
|
||||
Types:Artifact
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Myr,Activated.Myr | SpellDescription$ Add {C}{C}. Spend this mana only to cast Myr spells or activate abilities of Myr.
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Myr,Activated.Myr+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to cast Myr spells or activate abilities of Myr.
|
||||
A:AB$ ChangeZone | Cost$ 3 T | TgtPrompt$ Choose target Myr card in your graveyard | ValidTgts$ Card.Myr+YouCtrl | Origin$ Graveyard | Destination$ Hand | SpellDescription$ Return target Myr card from your graveyard to your hand.
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:{T}: Add {C}{C}. Spend this mana only to cast Myr spells or activate abilities of Myr.\n{3}, {T}: Return target Myr card from your graveyard to your hand.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Orb of Dragonkind
|
||||
ManaCost:1 R
|
||||
Types:Artifact
|
||||
A:AB$ Mana | Cost$ 1 T | Produced$ Combo Any | Amount$ 2 | RestrictValid$ Spell.Dragon,Activated.Dragon | SpellDescription$ Add two mana in any combination of colors. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
|
||||
A:AB$ Mana | Cost$ 1 T | Produced$ Combo Any | Amount$ 2 | RestrictValid$ Spell.Dragon,Activated.Dragon+inZoneBattlefield | SpellDescription$ Add two mana in any combination of colors. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
|
||||
A:AB$ Dig | Cost$ R T Sac<1/CARDNAME> | DigNum$ 7 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Dragon | RestRandomOrder$ True | SpellDescription$ Look at the top seven cards of your library. You may reveal a Dragon card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
SVar:BuffedBy:Dragon
|
||||
DeckHints:Type$Dragon
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Artifact Land
|
||||
K:CARDNAME enters the battlefield tapped.
|
||||
K:Modular:1
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | RestrictValid$ Spell.Artifact,Activated.Artifact | SpellDescription$ Add one mana of any color. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | RestrictValid$ Spell.Artifact,Activated.Artifact+inZoneBattlefield | SpellDescription$ Add one mana of any color. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
DeckHints:Type$Artifact
|
||||
DeckHas:Ability$Counters
|
||||
Oracle:Power Depot enters the battlefield tapped.\n{T}: Add {C}.\n{T}: Add one mana of any color. Spend this mana only to cast artifact spells or activate abilities of artifacts.\nModular 1
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Primal Beyond
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | RestrictValid$ Spell.Elemental,Activated.Elemental | SpellDescription$ Add one mana of any color. Spend this mana only to cast an Elemental spell or activate an ability of an Elemental.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | RestrictValid$ Spell.Elemental,Activated.Elemental+inZoneBattlefield | SpellDescription$ Add one mana of any color. Spend this mana only to cast an Elemental spell or activate an ability of an Elemental.
|
||||
K:ETBReplacement:Other:DBTap
|
||||
SVar:DBTap:DB$ Tap | ETB$ True | Defined$ Self | UnlessCost$ Reveal<1/Elemental> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. | SpellDescription$ As CARDNAME enters the battlefield, you may reveal an Elemental card from your hand. If you don't, CARDNAME enters the battlefield tapped.
|
||||
AI:RemoveDeck:Random
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Renowned Weaponsmith
|
||||
ManaCost:1 U
|
||||
Types:Creature Human Artificer
|
||||
PT:1/3
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ ChangeZone | Cost$ U T | Origin$ Library | Destination$ Hand | ChangeType$ Card.namedHeart-Piercer Bow,Card.namedVial of Dragonfire | ChangeNum$ 1 | StackDescription$ SpellDescription | SpellDescription$ Search your library for a card named Heart-Piercer Bow or Vial of Dragonfire, put it into your hand, then shuffle.
|
||||
DeckHints:Name$Heart-Piercer Bow|Vial of Dragonfire
|
||||
AI:RemoveDeck:Random
|
||||
|
||||
@@ -2,6 +2,6 @@ Name:Smokebraider
|
||||
ManaCost:1 R
|
||||
Types:Creature Elemental Shaman
|
||||
PT:1/1
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo Any | Amount$ 2 | RestrictValid$ Spell.Elemental,Activated.Elemental | AILogic$ MostProminentInComputerHand | SpellDescription$ Add two mana in any combination of colors. Spend this mana only to cast Elemental spells or activate abilities of Elementals.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo Any | Amount$ 2 | RestrictValid$ Spell.Elemental,Activated.Elemental+inZoneBattlefield | AILogic$ MostProminentInComputerHand | SpellDescription$ Add two mana in any combination of colors. Spend this mana only to cast Elemental spells or activate abilities of Elementals.
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:{T}: Add two mana in any combination of colors. Spend this mana only to cast Elemental spells or activate abilities of Elementals.
|
||||
|
||||
@@ -2,6 +2,6 @@ Name:Soldevi Machinist
|
||||
ManaCost:1 U
|
||||
Types:Creature Human Wizard Artificer
|
||||
PT:1/1
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Activated.Artifact | SpellDescription$ Add {C}{C}. Spend this mana only to activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ Activated.Artifact+inZoneBattlefield | SpellDescription$ Add {C}{C}. Spend this mana only to activate abilities of artifacts.
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:{T}: Add {C}{C}. Spend this mana only to activate abilities of artifacts.
|
||||
|
||||
@@ -2,5 +2,5 @@ Name:Vedalken Engineer
|
||||
ManaCost:1 U
|
||||
Types:Creature Vedalken Artificer
|
||||
PT:1/1
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact | SpellDescription$ Add two mana of any one color. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 2 | RestrictValid$ Spell.Artifact,Activated.Artifact+inZoneBattlefield | SpellDescription$ Add two mana of any one color. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
Oracle:{T}: Add two mana of any one color. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||
|
||||
Reference in New Issue
Block a user