mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
cleanup meetsManaRestrictions
This commit is contained in:
@@ -221,6 +221,8 @@ public class ForgeScript {
|
|||||||
return sa.isCycling();
|
return sa.isCycling();
|
||||||
} else if (property.equals("Dash")) {
|
} else if (property.equals("Dash")) {
|
||||||
return sa.isDash();
|
return sa.isDash();
|
||||||
|
} else if (property.equals("Disturb")) {
|
||||||
|
return sa.isDisturb();
|
||||||
} else if (property.equals("Flashback")) {
|
} else if (property.equals("Flashback")) {
|
||||||
return sa.isFlashBackAbility();
|
return sa.isFlashBackAbility();
|
||||||
} else if (property.equals("Jumpstart")) {
|
} else if (property.equals("Jumpstart")) {
|
||||||
@@ -235,6 +237,10 @@ public class ForgeScript {
|
|||||||
return sa.isAftermath();
|
return sa.isAftermath();
|
||||||
} else if (property.equals("MorphUp")) {
|
} else if (property.equals("MorphUp")) {
|
||||||
return sa.isMorphUp();
|
return sa.isMorphUp();
|
||||||
|
} else if (property.equals("ManifestUp")) {
|
||||||
|
return sa.isManifestUp();
|
||||||
|
} else if (property.equals("isCastFaceDown")) {
|
||||||
|
return sa.isCastFaceDown();
|
||||||
} else if (property.equals("Modular")) {
|
} else if (property.equals("Modular")) {
|
||||||
return sa.hasParam("Modular");
|
return sa.hasParam("Modular");
|
||||||
} else if (property.equals("Equip")) {
|
} else if (property.equals("Equip")) {
|
||||||
@@ -264,6 +270,8 @@ public class ForgeScript {
|
|||||||
if (sa.getChapter() == sa.getHostCard().getCounters(CounterEnumType.LORE)) {
|
if (sa.getChapter() == sa.getHostCard().getCounters(CounterEnumType.LORE)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else if (property.equals("CumulativeUpkeep")) {
|
||||||
|
return sa.isCumulativeUpkeep();
|
||||||
} else if (property.equals("LastChapter")) {
|
} else if (property.equals("LastChapter")) {
|
||||||
return sa.isLastChapter();
|
return sa.isLastChapter();
|
||||||
} else if (property.startsWith("ManaSpent")) {
|
} else if (property.startsWith("ManaSpent")) {
|
||||||
|
|||||||
@@ -7053,6 +7053,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
|
|
||||||
if (sa.isCastFaceDown()) {
|
if (sa.isCastFaceDown()) {
|
||||||
turnFaceDown(true);
|
turnFaceDown(true);
|
||||||
|
CardFactoryUtil.setFaceDownState(this, sa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ public class CardFactoryUtil {
|
|||||||
if (!hostCard.isFaceDown()) {
|
if (!hostCard.isFaceDown()) {
|
||||||
hostCard.setOriginalStateAsFaceDown();
|
hostCard.setOriginalStateAsFaceDown();
|
||||||
}
|
}
|
||||||
CardFactoryUtil.setFaceDownState(hostCard, this);
|
|
||||||
final Game game = hostCard.getGame();
|
final Game game = hostCard.getGame();
|
||||||
|
|
||||||
CardZoneTable table = new CardZoneTable(game.copyLastStateBattlefield(), game.copyLastStateBattlefield());
|
CardZoneTable table = new CardZoneTable(game.copyLastStateBattlefield(), game.copyLastStateBattlefield());
|
||||||
@@ -4058,6 +4057,7 @@ public class CardFactoryUtil {
|
|||||||
faceDown.setType(new CardType(Arrays.asList(sa.getParam("FaceDownSetType").split(" & ")), false));
|
faceDown.setType(new CardType(Arrays.asList(sa.getParam("FaceDownSetType").split(" & ")), false));
|
||||||
}
|
}
|
||||||
if (sa.hasParam("FaceDownKeyword")) {
|
if (sa.hasParam("FaceDownKeyword")) {
|
||||||
|
faceDown.setIntrinsicKeywords(Lists.newArrayList(), false);
|
||||||
faceDown.addIntrinsicKeywords(Arrays.asList(sa.getParam("FaceDownKeyword").split(" & ")));
|
faceDown.addIntrinsicKeywords(Arrays.asList(sa.getParam("FaceDownKeyword").split(" & ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -366,17 +366,6 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
|
|
||||||
// Loop over restrictions
|
// Loop over restrictions
|
||||||
for (String restriction : restrictions.split(",")) {
|
for (String restriction : restrictions.split(",")) {
|
||||||
if (restriction.equals("nonSpell")) {
|
|
||||||
return !sa.isSpell();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restriction.equals("CumulativeUpkeep")) {
|
|
||||||
if (sa.isCumulativeupkeep()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restriction.startsWith("CostContains")) {
|
if (restriction.startsWith("CostContains")) {
|
||||||
if (restriction.endsWith("X") && sa.costHasManaX()) {
|
if (restriction.endsWith("X") && sa.costHasManaX()) {
|
||||||
return true;
|
return true;
|
||||||
@@ -387,21 +376,6 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restriction.equals("Disturb")) {
|
|
||||||
if (sa.isDisturb()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restriction.equals("MorphOrManifest")) {
|
|
||||||
if ((sa.isSpell() && sa.getHostCard().isCreature() && sa.isCastFaceDown())
|
|
||||||
|| sa.isManifestUp() || sa.isMorphUp()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
//handled in meetsManaShardRestrictions
|
//handled in meetsManaShardRestrictions
|
||||||
if (restriction.equals("CantPayGenericCosts")) {
|
if (restriction.equals("CantPayGenericCosts")) {
|
||||||
return true;
|
return true;
|
||||||
@@ -422,10 +396,6 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restriction.equals("CantCastNonArtifactSpells")) {
|
|
||||||
return !sa.isSpell() || sa.getHostCard().isArtifact();
|
|
||||||
}
|
|
||||||
|
|
||||||
// the payment is for a resolving SA, currently no other restrictions would allow that
|
// the payment is for a resolving SA, currently no other restrictions would allow that
|
||||||
if (getSourceCard().getGame().getStack().getInstanceMatchingSpellAbilityID(sa.getRootAbility()) != null) {
|
if (getSourceCard().getGame().getStack().getInstanceMatchingSpellAbilityID(sa.getRootAbility()) != null) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -557,7 +557,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
return this.hasParam("Ninjutsu");
|
return this.hasParam("Ninjutsu");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCumulativeupkeep() {
|
public boolean isCumulativeUpkeep() {
|
||||||
return hasParam("CumulativeUpkeep");
|
return hasParam("CumulativeUpkeep");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ Name:Adarkar Unicorn
|
|||||||
ManaCost:1 W W
|
ManaCost:1 W W
|
||||||
Types:Creature Unicorn
|
Types:Creature Unicorn
|
||||||
PT:2/2
|
PT:2/2
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C U | RestrictValid$ CumulativeUpkeep | SpellDescription$ Add {C}{U}. Spend this mana only to pay cumulative upkeep costs.
|
A:AB$ Mana | Cost$ T | Produced$ C U | RestrictValid$ Trigger.CumulativeUpkeep | SpellDescription$ Add {C}{U}. Spend this mana only to pay cumulative upkeep costs.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ U | RestrictValid$ CumulativeUpkeep | SpellDescription$ Add {U}. Spend this mana only to pay cumulative upkeep costs.
|
A:AB$ Mana | Cost$ T | Produced$ U | RestrictValid$ Trigger.CumulativeUpkeep | SpellDescription$ Add {U}. Spend this mana only to pay cumulative upkeep costs.
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
Oracle:{T}: Add {U} or {C}{U}. Spend this mana only to pay cumulative upkeep costs.
|
Oracle:{T}: Add {U} or {C}{U}. Spend this mana only to pay cumulative upkeep costs.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:2 G U
|
|||||||
Types:Creature Human Artificer
|
Types:Creature Human Artificer
|
||||||
PT:3/4
|
PT:3/4
|
||||||
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddAbility$ AnyMana | Description$ Creatures you control have "{T}: add {C}. This mana can't be spent to cast a nonartifact spell."
|
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddAbility$ AnyMana | Description$ Creatures you control have "{T}: add {C}. This mana can't be spent to cast a nonartifact spell."
|
||||||
SVar:AnyMana:AB$ Mana | Cost$ T | Produced$ C | Amount$ 1 | RestrictValid$ CantCastNonArtifactSpells | SpellDescription$ add {C}. This mana can't be spent to cast a nonartifact spell.
|
SVar:AnyMana:AB$ Mana | Cost$ T | Produced$ C | Amount$ 1 | RestrictValid$ !Spell.!Artifact | SpellDescription$ add {C}. This mana can't be spent to cast a nonartifact spell.
|
||||||
T:Mode$ SpellCast | ValidCard$ Artifact.cmcGE6 | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ DBDraw | TriggerDescription$ Whenever you cast an artifact spell with mana value 6 or greater, draw a card.
|
T:Mode$ SpellCast | ValidCard$ Artifact.cmcGE6 | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ DBDraw | TriggerDescription$ Whenever you cast an artifact spell with mana value 6 or greater, draw a card.
|
||||||
SVar:DBDraw:DB$ Draw
|
SVar:DBDraw:DB$ Draw
|
||||||
DeckNeeds:Type$Artifact
|
DeckNeeds:Type$Artifact
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Legendary Artifact Creature Robot
|
|||||||
PT:3/4
|
PT:3/4
|
||||||
K:More Than Meets the Eye:3 U
|
K:More Than Meets the Eye:3 U
|
||||||
K:Flying
|
K:Flying
|
||||||
A:AB$ Mana | Cost$ RemoveAnyCounter<X1+/P1P1/Artifact.YouCtrl/among artifacts you control> | XMin$ 1 | ValidTgts$ Player | Produced$ C | Amount$ X | AmountDesc$ for each counter removed | RestrictValid$ CantCastNonArtifactSpells | SubAbility$ DBConvert | SpellDescription$ Target player adds that much {C}. This mana can't be spent to cast nonartifact spells.
|
A:AB$ Mana | Cost$ RemoveAnyCounter<X1+/P1P1/Artifact.YouCtrl/among artifacts you control> | XMin$ 1 | ValidTgts$ Player | Produced$ C | Amount$ X | AmountDesc$ for each counter removed | RestrictValid$ !Spell.!Artifact | SubAbility$ DBConvert | SpellDescription$ Target player adds that much {C}. This mana can't be spent to cast nonartifact spells.
|
||||||
SVar:DBConvert:DB$ SetState | Mode$ Transform | StackDescription$ SpellDescription | SpellDescription$ Convert NICKNAME.
|
SVar:DBConvert:DB$ SetState | Mode$ Transform | StackDescription$ SpellDescription | SpellDescription$ Convert NICKNAME.
|
||||||
SVar:X:Count$xPaid
|
SVar:X:Count$xPaid
|
||||||
AlternateMode:DoubleFaced
|
AlternateMode:DoubleFaced
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Legendary Artifact Creature Golem
|
|||||||
PT:*/*
|
PT:*/*
|
||||||
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the greatest mana value among artifacts you control.
|
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the greatest mana value among artifacts you control.
|
||||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ ArtifactMana | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, add {C} for each artifact you control. This mana can't be spent to cast nonartifact spells. Until end of turn, you don't lose this mana as steps and phases end.
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ ArtifactMana | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, add {C} for each artifact you control. This mana can't be spent to cast nonartifact spells. Until end of turn, you don't lose this mana as steps and phases end.
|
||||||
SVar:ArtifactMana:DB$ Mana | Produced$ C | Amount$ Y | PersistentMana$ True | RestrictValid$ CantCastNonArtifactSpells
|
SVar:ArtifactMana:DB$ Mana | Produced$ C | Amount$ Y | PersistentMana$ True | RestrictValid$ !Spell.!Artifact
|
||||||
SVar:X:Count$Valid Artifact.YouCtrl$GreatestCMC
|
SVar:X:Count$Valid Artifact.YouCtrl$GreatestCMC
|
||||||
SVar:Y:Count$Valid Artifact.YouCtrl
|
SVar:Y:Count$Valid Artifact.YouCtrl
|
||||||
SVar:BuffedBy:Artifact
|
SVar:BuffedBy:Artifact
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ ManaCost:2 U
|
|||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
K:Cumulative upkeep:U
|
K:Cumulative upkeep:U
|
||||||
T:Mode$ TapsForMana | ValidCard$ Island | Execute$ TrigMana | Static$ True | TriggerZones$ Battlefield | OptionalDecider$ TriggeredCardController | TriggerDescription$ Whenever an Island is tapped for mana, its controller may add an additional {U}. If that Island is snow, its controller may add an additional {U}{U} instead. Spend this mana only to pay cumulative upkeep costs.
|
T:Mode$ TapsForMana | ValidCard$ Island | Execute$ TrigMana | Static$ True | TriggerZones$ Battlefield | OptionalDecider$ TriggeredCardController | TriggerDescription$ Whenever an Island is tapped for mana, its controller may add an additional {U}. If that Island is snow, its controller may add an additional {U}{U} instead. Spend this mana only to pay cumulative upkeep costs.
|
||||||
SVar:TrigMana:DB$ Mana | Produced$ U | Amount$ 1 | Defined$ TriggeredCardController | RestrictValid$ CumulativeUpkeep | ConditionDefined$ TriggeredCard | ConditionPresent$ Land.Snow | ConditionCompare$ EQ0 | SubAbility$ DBMana
|
SVar:TrigMana:DB$ Mana | Produced$ U | Amount$ 1 | Defined$ TriggeredCardController | RestrictValid$ Trigger.CumulativeUpkeep | ConditionDefined$ TriggeredCard | ConditionPresent$ Land.Snow | ConditionCompare$ EQ0 | SubAbility$ DBMana
|
||||||
SVar:DBMana:DB$ Mana | Produced$ U | Amount$ 2 | Defined$ TriggeredCardController | RestrictValid$ CumulativeUpkeep | ConditionDefined$ TriggeredCard | ConditionPresent$ Land.Snow | ConditionCompare$ GE1
|
SVar:DBMana:DB$ Mana | Produced$ U | Amount$ 2 | Defined$ TriggeredCardController | RestrictValid$ Trigger.CumulativeUpkeep | ConditionDefined$ TriggeredCard | ConditionPresent$ Land.Snow | ConditionCompare$ GE1
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
Oracle:Cumulative upkeep {U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)\nWhenever an Island is tapped for mana, its controller may add an additional {U}. If that Island is snow, its controller may add an additional {U}{U} instead. Spend this mana only to pay cumulative upkeep costs.
|
Oracle:Cumulative upkeep {U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)\nWhenever an Island is tapped for mana, its controller may add an additional {U}. If that Island is snow, its controller may add an additional {U}{U} instead. Spend this mana only to pay cumulative upkeep costs.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
|
|||||||
SVar:TrigCharm:DB$ Charm | Choices$ DBDraw,DBPump
|
SVar:TrigCharm:DB$ Charm | Choices$ DBDraw,DBPump
|
||||||
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 2 | SpellDescription$ Draw two cards.
|
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 2 | SpellDescription$ Draw two cards.
|
||||||
SVar:DBPump:DB$ Pump | IsCurse$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -5 | NumDef$ -5 | SpellDescription$ Target creature gets -5/-5 until end of turn.
|
SVar:DBPump:DB$ Pump | IsCurse$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -5 | NumDef$ -5 | SpellDescription$ Target creature gets -5/-5 until end of turn.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ CantCastNonArtifactSpells | SpellDescription$ Add {C}{C}. This mana can't be spent to cast nonartifact spells.
|
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ !Spell.!Artifact | SpellDescription$ Add {C}{C}. This mana can't be spent to cast nonartifact spells.
|
||||||
DeckHints:Name$Urza, Lord Protector
|
DeckHints:Name$Urza, Lord Protector
|
||||||
MeldPair:Urza, Lord Protector
|
MeldPair:Urza, Lord Protector
|
||||||
AlternateMode:Meld
|
AlternateMode:Meld
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ Name:Thran Turbine
|
|||||||
ManaCost:1
|
ManaCost:1
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ DBMana | TriggerDescription$ At the beginning of your upkeep, you may add {C}{C}. You can't spend this mana to cast spells.
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ DBMana | TriggerDescription$ At the beginning of your upkeep, you may add {C}{C}. You can't spend this mana to cast spells.
|
||||||
SVar:DBMana:DB$ Mana | Amount$ 2 | Produced$ C | RestrictValid$ nonSpell
|
SVar:DBMana:DB$ Mana | Amount$ 2 | Produced$ C | RestrictValid$ !Spell
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
Oracle:At the beginning of your upkeep, you may add {C}{C}. You can't spend this mana to cast spells.
|
Oracle:At the beginning of your upkeep, you may add {C}{C}. You can't spend this mana to cast spells.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Unblinking Observer
|
|||||||
ManaCost:1 U
|
ManaCost:1 U
|
||||||
Types:Creature Homunculus
|
Types:Creature Homunculus
|
||||||
PT:2/1
|
PT:2/1
|
||||||
A:AB$ Mana | Cost$ T | Produced$ U | RestrictValid$ Disturb,Spell.Instant,Spell.Sorcery | SpellDescription$ Add {U}. Spend this mana only to pay a disturb cost or cast an instant or sorcery spell.
|
A:AB$ Mana | Cost$ T | Produced$ U | RestrictValid$ Spell.Disturb,Spell.Instant,Spell.Sorcery | SpellDescription$ Add {U}. Spend this mana only to pay a disturb cost or cast an instant or sorcery spell.
|
||||||
DeckNeeds:Type$Instant|Sorcery
|
DeckNeeds:Type$Instant|Sorcery
|
||||||
DeckHints:Keyword$Disturb
|
DeckHints:Keyword$Disturb
|
||||||
Oracle:{T}: Add {U}. Spend this mana only to pay a disturb cost or cast an instant or sorcery spell.
|
Oracle:{T}: Add {U}. Spend this mana only to pay a disturb cost or cast an instant or sorcery spell.
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ Name:Powerstone token
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Artifact Powerstone
|
Types:Artifact Powerstone
|
||||||
Colors:colorless
|
Colors:colorless
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | RestrictValid$ CantCastNonArtifactSpells | SpellDescription$ Add {C}. This mana can't be spent to cast a nonartifact spell.
|
A:AB$ Mana | Cost$ T | Produced$ C | RestrictValid$ !Spell.!Artifact | SpellDescription$ Add {C}. This mana can't be spent to cast a nonartifact spell.
|
||||||
Oracle:{T}: Add {C}. This mana can't be spent to cast a nonartifact spell.
|
Oracle:{T}: Add {C}. This mana can't be spent to cast a nonartifact spell.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user