Improve anchor word handling (#5673)

* Support for Nowhere to Run
This commit is contained in:
tool4ever
2024-07-22 20:07:36 +00:00
committed by GitHub
parent 9a7bd1a9d7
commit 76efa1be0d
26 changed files with 85 additions and 63 deletions

View File

@@ -101,7 +101,7 @@ public enum SpellApiToAi {
.put(ApiType.GainLife, LifeGainAi.class)
.put(ApiType.GainOwnership, CannotPlayAi.class)
.put(ApiType.GameDrawn, CannotPlayAi.class)
.put(ApiType.GenericChoice, ChooseGenericEffectAi.class)
.put(ApiType.GenericChoice, ChooseGenericAi.class)
.put(ApiType.Goad, GoadAi.class)
.put(ApiType.Heist, AlwaysPlayAi.class)
.put(ApiType.Haunt, HauntAi.class)
@@ -112,7 +112,7 @@ public enum SpellApiToAi {
.put(ApiType.LosePerpetual, AlwaysPlayAi.class)
.put(ApiType.LosesGame, GameLossAi.class)
.put(ApiType.MakeCard, AlwaysPlayAi.class)
.put(ApiType.Mana, ManaEffectAi.class)
.put(ApiType.Mana, ManaAi.class)
.put(ApiType.ManaReflected, CannotPlayAi.class)
.put(ApiType.Manifest, ManifestAi.class)
.put(ApiType.Meld, MeldAi.class)

View File

@@ -21,7 +21,7 @@ import java.util.List;
import java.util.Map;
public class ChooseGenericEffectAi extends SpellAbilityAi {
public class ChooseGenericAi extends SpellAbilityAi {
@Override
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {

View File

@@ -33,7 +33,7 @@ import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.Aggregates;
public class ManaEffectAi extends SpellAbilityAi {
public class ManaAi extends SpellAbilityAi {
/*
* (non-Javadoc)

View File

@@ -135,7 +135,7 @@ public class PermanentCreatureAi extends PermanentAi {
boolean hasETBTrigger = card.hasETBTrigger(true);
boolean hasAmbushAI = card.hasSVar("AmbushAI");
boolean defOnlyAmbushAI = hasAmbushAI && "BlockOnly".equals(card.getSVar("AmbushAI"));
boolean loseFloatMana = ai.getManaPool().totalMana() > 0 && !ManaEffectAi.canRampPool(ai, card);
boolean loseFloatMana = ai.getManaPool().totalMana() > 0 && !ManaAi.canRampPool(ai, card);
boolean willDiscardNow = isOwnEOT && !ai.isUnlimitedHandSize() && ai.getCardsIn(ZoneType.Hand).size() > ai.getMaxHandSize();
boolean willDieNow = combat != null && ComputerUtilCombat.lifeInSeriousDanger(ai, combat);
boolean wantToCastInMain1 = ph.is(PhaseType.MAIN1, ai) && ComputerUtil.castPermanentInMain1(ai, sa);

View File

@@ -271,6 +271,8 @@ public class ForgeScript {
return sa.isKeyword(Keyword.DAYBOUND);
} else if (property.equals("Nightbound")) {
return sa.isKeyword(Keyword.NIGHTBOUND);
} else if (property.equals("Ward")) {
return sa.isKeyword(Keyword.WARD);
} else if (property.equals("CumulativeUpkeep")) {
return sa.isCumulativeUpkeep();
} else if (property.equals("ChapterNotLore")) {

View File

@@ -3939,8 +3939,8 @@ public class CardFactoryUtil {
descAdded = true;
}
}
if (mapParams.containsKey("AddReplacementEffects")) {
for (String s : mapParams.get("AddReplacementEffects").split(" & ")) {
if (mapParams.containsKey("AddReplacementEffect")) {
for (String s : mapParams.get("AddReplacementEffect").split(" & ")) {
if (descAdded) {
desc.append("\r\n");
}

View File

@@ -138,6 +138,10 @@ public class CardProperty {
if (source.hasChosenCard(card)) {
return false;
}
} else if (property.startsWith("ChosenMode")) {
if (!card.getChosenMode().equals(property.substring(10))) {
return false;
}
} else if (property.equals("ChosenSector")) {
if (!source.getChosenSector().equals(card.getSector())) {
return false;

View File

@@ -148,10 +148,10 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
if (hasParam("RemoveAllAbilities") || hasParam("GainsAbilitiesOf")
|| hasParam("GainsAbilitiesOfDefined") || hasParam("GainsTriggerAbsOf")
|| hasParam("AddKeyword") || hasParam("AddAbility")
|| hasParam("AddTrigger") || hasParam("RemoveTriggers")
|| hasParam("RemoveKeyword") || hasParam("AddReplacementEffects")
|| hasParam("AddTrigger") || hasParam("AddReplacementEffect")
|| hasParam("AddStaticAbility") || hasParam("AddSVar")
|| hasParam("CantHaveKeyword") || hasParam("ShareRememberedKeywords")) {
|| hasParam("CantHaveKeyword") || hasParam("ShareRememberedKeywords")
|| hasParam("RemoveKeyword")) {
layers.add(StaticAbilityLayer.ABILITIES);
}

View File

@@ -350,8 +350,8 @@ public final class StaticAbilityContinuous {
addAbilities = sVars;
}
if (params.containsKey("AddReplacementEffects")) {
final String[] sVars = params.get("AddReplacementEffects").split(" & ");
if (params.containsKey("AddReplacementEffect")) {
final String[] sVars = params.get("AddReplacementEffect").split(" & ");
for (int i = 0; i < sVars.length; i++) {
sVars[i] = AbilityUtils.getSVar(stAb, sVars[i]);
}

View File

@@ -2,12 +2,14 @@ Name:Battle of Hoover Dam
ManaCost:3 W
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ NCR,Legion | Defined$ You | SetChosenMode$ True | AILogic$ Legion | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose NCR or Legion.,,,• NCR — At the beginning of your end step, return target creature card with mana value 3 or less from your graveyard to the battlefield with a finality counter on it.,,,• Legion — Whenever a creature you control dies, put two +1/+1 counters on target creature you control.
SVar:NCR:DB$ Animate | Defined$ Self | Triggers$ NCRTrigger | Duration$ Permanent | SpellDescription$ NCR
SVar:NCRTrigger:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ NCR — At the beginning of your end step, return target creature card with mana value 3 or less from your graveyard to the battlefield with a finality counter on it.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ NCR,Legion | Defined$ You | SetChosenMode$ True | AILogic$ Legion | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose NCR or Legion.
SVar:NCR:DB$ Pump | SpellDescription$ NCR
SVar:Legion:DB$ Pump | SpellDescription$ Legion
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeNCR | AddTrigger$ NCRTrigger | Description$ • NCR — At the beginning of your end step, return target creature card with mana value 3 or less from your graveyard to the battlefield with a finality counter on it.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeLegion | AddTrigger$ LegionTrigger | Description$ • Legion — Whenever a creature you control dies, put two +1/+1 counters on target creature you control.
SVar:NCRTrigger:Mode$ Phase | Phase$ End of Turn | Secondary$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ NCR — At the beginning of your end step, return target creature card with mana value 3 or less from your graveyard to the battlefield with a finality counter on it.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | WithCountersType$ FINALITY | ValidTgts$ Creature.cmcLE3+YouCtrl | TgtPrompt$ Select target creature card with mana value 3 in your graveyard
SVar:Legion:DB$ Animate | Defined$ Self | Triggers$ LegionTrigger | Duration$ Permanent | SpellDescription$ Legion
SVar:LegionTrigger:Mode$ ChangesZone | ValidCard$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Legion — Whenever a creature you control dies, put two +1/+1 counters on target creature you control.
SVar:LegionTrigger:Mode$ ChangesZone | Secondary$ True | ValidCard$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Legion — Whenever a creature you control dies, put two +1/+1 counters on target creature you control.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ P1P1 | CounterNum$ 2
DeckHas:Ability$Counters|Graveyard
Oracle:As Battle of Hoover Dam enters the battlefield, choose NCR or Legion.\n• NCR — At the beginning of your end step, return target creature card with mana value 3 or less from your graveyard to the battlefield with a finality counter on it.\n• Legion — Whenever a creature you control dies, put two +1/+1 counters on target creature you control.

View File

@@ -5,7 +5,7 @@ K:Enchant creature
A:SP$ Attach | ValidTgts$ Creature | AILogic$ Curse
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature.
SVar:TrigTap:DB$ Tap | Defined$ Enchanted
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddReplacementEffects$ DBUntap | Description$ Enchanted creature has "If this creature would untap during your untap step, remove a +1/+1 counter from it instead. If you do, untap it." (Otherwise, it doesn't untap.)
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddReplacementEffect$ DBUntap | Description$ Enchanted creature has "If this creature would untap during your untap step, remove a +1/+1 counter from it instead. If you do, untap it." (Otherwise, it doesn't untap.)
SVar:DBUntap:Event$ Untap | ActiveZones$ Battlefield | ValidCard$ Card.Self | ReplaceWith$ RepRemoveCounter | UntapStep$ True | Description$ If this creature would untap during your untap step, remove a +1/+1 counter from it instead. If you do, untap it. (Otherwise, it doesn't untap.)
SVar:RepRemoveCounter:DB$ RemoveCounter | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | RememberRemoved$ True | SubAbility$ Untap
SVar:Untap:DB$ Untap | Defined$ Self | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | SubAbility$ DBCleanup

View File

@@ -2,12 +2,14 @@ Name:Citadel Siege
ManaCost:2 W W
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Dragons | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.,,,• Khans — At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.,,,• Dragons — At the beginning of combat on each opponent's turn, tap target creature that player controls.
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Duration$ Permanent | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ BeginCombat | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Boost | TriggerDescription$ At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Dragons | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.
SVar:Khans:DB$ Pump | SpellDescription$ Khans
SVar:Dragons:DB$ Pump | SpellDescription$ Dragons
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeKhans | AddTrigger$ KhansTrigger | Description$ • Khans — At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeDragons | AddTrigger$ DragonsTrigger | Description$ • Dragons — At the beginning of combat on each opponent's turn, tap target creature that player controls.
SVar:KhansTrigger:Mode$ Phase | Phase$ BeginCombat | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Boost | Secondary$ True | TriggerDescription$ At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.
SVar:Boost:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ P1P1 | CounterNum$ 2
SVar:Dragons:DB$ Animate | Defined$ Self | Triggers$ DragonsTrigger | Duration$ Permanent | SpellDescription$ Dragons
SVar:DragonsTrigger:Mode$ Phase | Phase$ BeginCombat | TriggerZones$ Battlefield | ValidPlayer$ Opponent | Execute$ TapCreature | TriggerDescription$ At the beginning of combat on each opponent's turn, tap target creature that player controls.
SVar:DragonsTrigger:Mode$ Phase | Phase$ BeginCombat | TriggerZones$ Battlefield | ValidPlayer$ Opponent | Execute$ TapCreature | Secondary$ True | TriggerDescription$ At the beginning of combat on each opponent's turn, tap target creature that player controls.
SVar:TapCreature:DB$ Tap | ValidTgts$ Creature.ActivePlayerCtrl | TgtPrompt$ Choose target creature the active player controls.
DeckHas:Ability$Counters
Oracle:As Citadel Siege enters the battlefield, choose Khans or Dragons.\n• Khans — At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.\n• Dragons — At the beginning of combat on each opponent's turn, tap target creature that player controls.

View File

@@ -2,11 +2,13 @@ Name:Frontier Siege
ManaCost:3 G
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Khans | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.,,,• Khans — At the beginning of each of your main phases, add {G}{G}.,,,• Dragons — Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Duration$ Permanent | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Main1,Main2 | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ ManaGain | TriggerDescription$ At the beginning of each of your main phases, add {G}{G}.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Khans | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.
SVar:Khans:DB$ Pump | SpellDescription$ Khans
SVar:Dragons:DB$ Pump | SpellDescription$ Dragons
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeKhans | AddTrigger$ KhansTrigger | Description$ • Khans — At the beginning of each of your main phases, add {G}{G}.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeDragons | AddTrigger$ DragonsTrigger | Description$ • Dragons — Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.
SVar:KhansTrigger:Mode$ Phase | Phase$ Main1,Main2 | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ ManaGain | Secondary$ True | TriggerDescription$ At the beginning of each of your main phases, add {G}{G}.
SVar:ManaGain:DB$ Mana | Produced$ G G
SVar:Dragons:DB$ Animate | Defined$ Self | Triggers$ DragonsTrigger | Duration$ Permanent | SpellDescription$ Dragons
SVar:DragonsTrigger:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl+withFlying | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ AirFight | TriggerDescription$ Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.
SVar:DragonsTrigger:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl+withFlying | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ AirFight | Secondary$ True | TriggerDescription$ Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.
SVar:AirFight:DB$ Fight | Defined$ TriggeredCardLKICopy | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Choose target creature you don't control
Oracle:As Frontier Siege enters the battlefield, choose Khans or Dragons.\n• Khans — At the beginning of each of your main phases, add {G}{G}.\n• Dragons — Whenever a creature with flying enters the battlefield under your control, you may have it fight target creature you don't control.

View File

@@ -4,8 +4,8 @@ Types:Creature Human Cleric
PT:0/3
K:Level up:2 W
SVar:maxLevel:5
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 1 | SetToughness$ 4 | AddReplacementEffects$ RDamage1 | IsPresent$ Card.Self+counters_GE1_LEVEL+counters_LE4_LEVEL | Description$ LEVEL 1-4 1/4 If a source would deal damage to you or a creature you control, prevent 1 of that damage.
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 2 | SetToughness$ 5 | AddReplacementEffects$ RDamage2 | IsPresent$ Card.Self+counters_GE5_LEVEL | Description$ LEVEL 5+ 2/5 If a source would deal damage to you or a creature you control, prevent 2 of that damage.
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 1 | SetToughness$ 4 | AddReplacementEffect$ RDamage1 | IsPresent$ Card.Self+counters_GE1_LEVEL+counters_LE4_LEVEL | Description$ LEVEL 1-4 1/4 If a source would deal damage to you or a creature you control, prevent 1 of that damage.
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 2 | SetToughness$ 5 | AddReplacementEffect$ RDamage2 | IsPresent$ Card.Self+counters_GE5_LEVEL | Description$ LEVEL 5+ 2/5 If a source would deal damage to you or a creature you control, prevent 2 of that damage.
SVar:RDamage1:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You,Creature.YouCtrl | ReplaceWith$ DBReplace1 | PreventionEffect$ True | Secondary$ True | Description$ If a source would deal damage to you or a creature you control, prevent 1 of that damage.
SVar:DBReplace1:DB$ ReplaceDamage | Amount$ 1
SVar:RDamage2:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ You,Creature.YouCtrl | ReplaceWith$ DBReplace2 | PreventionEffect$ True | Secondary$ True | Description$ If a source would deal damage to you or a creature you control, prevent 2 of that damage.

View File

@@ -1,7 +1,7 @@
Name:Master Chef
ManaCost:2 G
Types:Legendary Enchantment Background
S:Mode$ Continuous | Affected$ Creature.IsCommander+YouOwn | AddReplacementEffects$ This & Other | Description$ Commander creatures you own have "This creature enters the battlefield with an additional +1/+1 counter on it" and "Other creatures you control enter with an additional +1/+1 counter on them."
S:Mode$ Continuous | Affected$ Creature.IsCommander+YouOwn | AddReplacementEffect$ This & Other | Description$ Commander creatures you own have "This creature enters the battlefield with an additional +1/+1 counter on it" and "Other creatures you control enter with an additional +1/+1 counter on them."
SVar:This:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$ ExtraCounter | ReplacementResult$ Updated | Description$ This creature enters the battlefield with an additional +1/+1 counter on it.
SVar:Other:Event$ Moved | ValidCard$ Creature.Other+YouCtrl | ActiveZones$ Battlefield | Destination$ Battlefield | ReplaceWith$ ExtraCounter | ReplacementResult$ Updated | Description$ Other creatures you control enter with an additional +1/+1 counter on them.
SVar:ExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1

View File

@@ -2,12 +2,14 @@ Name:Mirrodin Besieged
ManaCost:2 U
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Mirran,Phyrexian | Defined$ You | SetChosenMode$ True | AILogic$ Mirran | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Mirran or Phyrexian.,,,• Mirran — Whenever you cast an artifact spell, create a 1/1 colorless Myr artifact creature token.,,,• Phyrexian — At the beginning of your end step, draw a card, then discard a card. Then if there are fifteen or more artifact cards in your graveyard, target opponent loses the game.
SVar:Mirran:DB$ Animate | Defined$ Self | Triggers$ MirranTrigger | Duration$ Permanent | SpellDescription$ Mirran
SVar:MirranTrigger:Mode$ SpellCast | ValidCard$ Artifact | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Whenever you cast an artifact spell, create a 1/1 colorless Myr artifact creature token.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Mirran,Phyrexian | Defined$ You | SetChosenMode$ True | AILogic$ Mirran | ShowChoice$ ExceptSelf | LockInText$ True | SpellDescription$ As CARDNAME enters the battlefield, choose Mirran or Phyrexian.
SVar:Mirran:DB$ Pump | SpellDescription$ Mirran
SVar:Phyrexian:DB$ Pump | SpellDescription$ Phyrexian
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeMirran | AddTrigger$ MirranTrigger | Description$ • Mirran — Whenever you cast an artifact spell, create a 1/1 colorless Myr artifact creature token.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModePhyrexian | AddTrigger$ TrigEnd | LockInText$ True | Description$ • Phyrexian — At the beginning of your end step, draw a card, then discard a card. Then if there are fifteen or more artifact cards in your graveyard, target opponent loses the game.
SVar:MirranTrigger:Mode$ SpellCast | ValidCard$ Artifact | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Whenever you cast an artifact spell, create a 1/1 colorless Myr artifact creature token.
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_1_1_a_myr | TokenOwner$ You
SVar:Phyrexian:DB$ Animate | Defined$ Self | Triggers$ TrigEnd | Duration$ Permanent | SpellDescription$ Phyrexian
SVar:TrigEnd:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Filter | TriggerDescription$ At the beginning of your end step, draw a card, then discard a card. Then if there are fifteen or more artifact cards in your graveyard, target opponent loses the game.
SVar:TrigEnd:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Filter | Secondary$ True | TriggerDescription$ At the beginning of your end step, draw a card, then discard a card. Then if there are fifteen or more artifact cards in your graveyard, target opponent loses the game.
SVar:Filter:DB$ Draw | Defined$ You | NumCards$ 1 | SubAbility$ DBDiscard
SVar:DBDiscard:DB$ Discard | Defined$ You | Mode$ TgtChoose | NumCards$ 1 | SubAbility$ DBLose
SVar:DBLose:DB$ LosesGame | ValidTgts$ Opponent | ConditionCheckSVar$ CheckGraveyard | ConditionSVarCompare$ GE15

View File

@@ -2,11 +2,13 @@ Name:Monastery Siege
ManaCost:2 U
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Khans | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.,,,• Khans — At the beginning of your draw step, draw an additional card, then discard a card.,,,• Dragons — Spells your opponents cast that target you or a permanent you control cost {2} more to cast.
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Duration$ Permanent | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Draw | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Filter | TriggerDescription$ At the beginning of your draw step, draw an additional card, then discard a card.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Khans | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.
SVar:Khans:DB$ Pump | SpellDescription$ Khans
SVar:Dragons:DB$ Pump | SpellDescription$ Dragons
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeKhans | AddTrigger$ KhansTrigger | Description$ • Khans — At the beginning of your draw step, draw an additional card, then discard a card.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeDragons | AddStaticAbility$ DragonsST | Description$ • Dragons — Spells your opponents cast that target you or a permanent you control cost {2} more to cast.
SVar:KhansTrigger:Mode$ Phase | Phase$ Draw | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ Filter | Secondary$ True | TriggerDescription$ At the beginning of your draw step, draw an additional card, then discard a card.
SVar:Filter:DB$ Draw | Defined$ You | NumCards$ 1 | SubAbility$ DBDiscard
SVar:DBDiscard:DB$ Discard | Defined$ You | Mode$ TgtChoose | NumCards$ 1
SVar:Dragons:DB$ Animate | Defined$ Self | staticAbilities$ DragonsST | Duration$ Permanent | SpellDescription$ Dragons
SVar:DragonsST:Mode$ RaiseCost | ValidTarget$ You,Card.YouCtrl+inZoneBattlefield | Activator$ Opponent | Type$ Spell | Amount$ 2 | Description$ Spells your opponents cast that target you or a permanent you control cost {2} more to cast.
SVar:DragonsST:Mode$ RaiseCost | ValidTarget$ You,Card.YouCtrl+inZoneBattlefield | Activator$ Opponent | Type$ Spell | Amount$ 2 | Secondary$ True | Description$ Spells your opponents cast that target you or a permanent you control cost {2} more to cast.
Oracle:As Monastery Siege enters the battlefield, choose Khans or Dragons.\n• Khans — At the beginning of your draw step, draw an additional card, then discard a card.\n• Dragons — Spells your opponents cast that target you or a permanent you control cost {2} more to cast.

View File

@@ -2,6 +2,6 @@ Name:Opal Titan
ManaCost:2 W W
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ Opponent | Execute$ TrigAnimate | IsPresent$ Card.Self+Enchantment | TriggerZones$ Battlefield | TriggerDescription$ When an opponent casts a creature spell, if CARDNAME is an enchantment, CARDNAME becomes a 4/4 Giant creature with protection from each of that spell's colors.
SVar:TrigAnimate:DB$ Animate | Defined$ Self | Types$ Creature,Giant | Power$ 4 | Toughness$ 4 | RemoveCardTypes$ True | RemoveCreatureTypes$ True | Duration$ Permanent | SubAbility$ DBProtection | Duration$ Permanent
SVar:TrigAnimate:DB$ Animate | Defined$ Self | Types$ Creature,Giant | Power$ 4 | Toughness$ 4 | RemoveCardTypes$ True | RemoveCreatureTypes$ True | Duration$ Permanent | SubAbility$ DBProtection
SVar:DBProtection:DB$ Protection | Gains$ Defined TriggeredCard | Duration$ Permanent
Oracle:When an opponent casts a creature spell, if Opal Titan is an enchantment, Opal Titan becomes a 4/4 Giant creature with protection from each of that spell's colors.

View File

@@ -2,14 +2,16 @@ Name:Outpost Siege
ManaCost:3 R
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Khans | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.,,,• Khans — At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.,,,• Dragons — Whenever a creature you control leaves the battlefield, CARDNAME deals 1 damage to any target.
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Duration$ Permanent | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ PseudoDraw | TriggerDescription$ At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Khans | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.
SVar:Khans:DB$ Pump | SpellDescription$ Khans
SVar:Dragons:DB$ Pump | SpellDescription$ Dragons
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeKhans | AddTrigger$ KhansTrigger | Description$ • Khans — At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeDragons | AddTrigger$ DragonsTrigger | Description$ • Dragons — Whenever a creature you control leaves the battlefield, CARDNAME deals 1 damage to any target.
SVar:KhansTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ PseudoDraw | Secondary$ True | TriggerDescription$ At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.
SVar:PseudoDraw:DB$ Dig | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Dragons:DB$ Animate | Defined$ Self | Triggers$ DragonsTrigger | Duration$ Permanent | SpellDescription$ Dragons
SVar:DragonsTrigger:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ SmallBurnination | TriggerDescription$ Whenever a creature you control leaves the battlefield, CARDNAME deals 1 damage to any target.
SVar:DragonsTrigger:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ SmallBurnination | Secondary$ True | TriggerDescription$ Whenever a creature you control leaves the battlefield, CARDNAME deals 1 damage to any target.
SVar:SmallBurnination:DB$ DealDamage | ValidTgts$ Any | NumDmg$ 1
Oracle:As Outpost Siege enters the battlefield, choose Khans or Dragons.\n• Khans — At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.\n• Dragons — Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to any target.

View File

@@ -2,12 +2,14 @@ Name:Palace Siege
ManaCost:3 B B
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Dragons | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.,,,• Khans — At the beginning of your upkeep, return target creature card from your graveyard to your hand.,,,• Dragons — At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
SVar:Khans:DB$ Animate | Defined$ Self | Triggers$ KhansTrigger | Duration$ Permanent | SpellDescription$ Khans
SVar:KhansTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ RaiseDead | TriggerDescription$ At the beginning of your upkeep, return target creature card from your graveyard to your hand.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Khans,Dragons | Defined$ You | SetChosenMode$ True | AILogic$ Dragons | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Khans or Dragons.
SVar:Khans:DB$ Pump | SpellDescription$ Khans
SVar:Dragons:DB$ Pump | SpellDescription$ Dragons
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeKhans | AddTrigger$ KhansTrigger | Description$ • Khans — At the beginning of your upkeep, return target creature card from your graveyard to your hand.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeDragons | AddTrigger$ DragonsTrigger | Description$ • Dragons — At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
SVar:KhansTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ RaiseDead | Secondary$ True | TriggerDescription$ At the beginning of your upkeep, return target creature card from your graveyard to your hand.
SVar:RaiseDead:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl
SVar:Dragons:DB$ Animate | Defined$ Self | Triggers$ DragonsTrigger | Duration$ Permanent | SpellDescription$ Dragons
SVar:DragonsTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ SyphonLife | TriggerDescription$ At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
SVar:DragonsTrigger:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ SyphonLife | Secondary$ True | TriggerDescription$ At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
SVar:SyphonLife:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ 2 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 2
DeckHas:Ability$LifeGain|Graveyard

View File

@@ -3,7 +3,7 @@ ManaCost:3 W W
Types:Creature Sliver
PT:3/3
S:Mode$ Continuous | Affected$ Creature.Sliver | AddKeyword$ Flying | Description$ All Sliver creatures have flying.
S:Mode$ Continuous | Affected$ Card.Sliver | AddReplacementEffects$ PulmonicMoveToLibrary | AddSVar$ PulmonicSliverRep | Description$ All Slivers have "If this permanent would be put into a graveyard, you may put it on top of its owner's library instead."
S:Mode$ Continuous | Affected$ Card.Sliver | AddReplacementEffect$ PulmonicMoveToLibrary | AddSVar$ PulmonicSliverRep | Description$ All Slivers have "If this permanent would be put into a graveyard, you may put it on top of its owner's library instead."
SVar:PulmonicMoveToLibrary:Event$ Moved | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | ReplaceWith$ PulmonicSliverRep | Optional$ True | Description$ If CARDNAME would die, you may put it on the top of its owner's library instead.
SVar:PulmonicSliverRep:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Library | LibraryPosition$ 0 | Defined$ ReplacedCard
SVar:PlayMain1:TRUE

View File

@@ -1,7 +1,7 @@
Name:Scion of Halaster
ManaCost:1 B
Types:Legendary Enchantment Background
S:Mode$ Continuous | Affected$ Creature.IsCommander+YouOwn | AddReplacementEffects$ Draw | Description$ Commander creatures you own have "The first time you would draw a card each turn, instead look at the top two cards of your library. Put one of them into your graveyard and the other back on top of your library. Then draw a card."
S:Mode$ Continuous | Affected$ Creature.IsCommander+YouOwn | AddReplacementEffect$ Draw | Description$ Commander creatures you own have "The first time you would draw a card each turn, instead look at the top two cards of your library. Put one of them into your graveyard and the other back on top of your library. Then draw a card."
SVar:Draw:Event$ Draw | ValidPlayer$ You | ReplaceWith$ DBDig | CheckSVar$ X | SVarCompare$ EQ0 | Description$ The first time you would draw a card each turn, instead look at the top two cards of your library. Put one of them into your graveyard and the other back on top of your library. Then draw a card.
SVar:DBDig:DB$ Dig | DigNum$ 2 | DestinationZone$ Graveyard | NoReveal$ True | LibraryPosition2$ 0 | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | SubAbility$ Reset

View File

@@ -2,14 +2,16 @@ Name:Struggle for Project Purity
ManaCost:3 U
Types:Enchantment
K:ETBReplacement:Other:SiegeChoice
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Brotherhood,Enclave | Defined$ You | SetChosenMode$ True | AILogic$ Brotherhood | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Brotherhood or Enclave.,,,• Brotherhood — At the beginning of your upkeep, each opponent draws a card. You draw a card for each card drawn this way.• Enclave — Whenever a player attacks you with one or more creatures, that player gets twice that many rad counters.
SVar:Brotherhood:DB$ Animate | Defined$ Self | Triggers$ BrotherhoodTrig | Duration$ Permanent | SpellDescription$ Brotherhood
SVar:BrotherhoodTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Brotherhood — At the beginning of your upkeep, each opponent draws a card. You draw a card for each card drawn this way.
SVar:SiegeChoice:DB$ GenericChoice | Choices$ Brotherhood,Enclave | Defined$ You | SetChosenMode$ True | AILogic$ Brotherhood | ShowChoice$ ExceptSelf | SpellDescription$ As CARDNAME enters the battlefield, choose Brotherhood or Enclave.
SVar:Brotherhood:DB$ Pump | SpellDescription$ Brotherhood
SVar:Enclave:DB$ Pump | SpellDescription$ Enclare
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeBrotherhood | AddTrigger$ BrotherhoodTrigger | Description$ • Brotherhood — At the beginning of your upkeep, each opponent draws a card. You draw a card for each card drawn this way.
S:Mode$ Continuous | Affected$ Card.Self+ChosenModeEnclave | AddTrigger$ EnclaveTrigger | Description$ • Enclave — Whenever a player attacks you with one or more creatures, that player gets twice that many rad counters.
SVar:BrotherhoodTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | Secondary$ True | TriggerDescription$ Brotherhood — At the beginning of your upkeep, each opponent draws a card. You draw a card for each card drawn this way.
SVar:TrigDraw:DB$ Draw | Defined$ Opponent | NumCards$ 1 | RememberDrawn$ True | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ Remembered$Amount | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Enclave:DB$ Animate | Defined$ Self | Triggers$ EnclaveTrig | Duration$ Permanent | SpellDescription$ Enclave
SVar:EnclaveTrig:Mode$ AttackersDeclaredOneTarget | AttackedTarget$ You | AttackingPlayer$ Player | Execute$ TrigRadiation | TriggerZones$ Battlefield | TriggerDescription$ Enclave — Whenever a player attacks you with one or more creatures, that player gets twice that many rad counters.
SVar:EnclaveTrig:Mode$ AttackersDeclaredOneTarget | AttackedTarget$ You | AttackingPlayer$ Player | Execute$ TrigRadiation | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ Enclave — Whenever a player attacks you with one or more creatures, that player gets twice that many rad counters.
SVar:TrigRadiation:DB$ Radiation | Defined$ TriggeredAttackingPlayer | Num$ X
SVar:X:TriggerObjectsAttackers$Amount/Times.2
Oracle:As Struggle for Project Purity enters the battlefield, choose Brotherhood or Enclave.\n• Brotherhood — At the beginning of your upkeep, each opponent draws a card. You draw a card for each card drawn this way.\n• Enclave — Whenever a player attacks you with one or more creatures, that player gets twice that many rad counters.

View File

@@ -5,7 +5,7 @@ T:Mode$ SpellCast | ValidCard$ Card.nonCreature | ValidActivatingPlayer$ You | T
SVar:TrigDiscard:AB$ Draw | Cost$ Discard<1/Card>
K:Class:2:2 R:AddStaticAbility$ SReduceCost
SVar:SReduceCost:Mode$ ReduceCost | ValidCard$ Card.nonCreature | Type$ Spell | Activator$ You | Amount$ 1 | Secondary$ True | Description$ Noncreature spells you cast cost {1} less to cast.
K:Class:3:2 R:AddReplacementEffects$ DoubleDamage
K:Class:3:2 R:AddReplacementEffect$ DoubleDamage
SVar:DoubleDamage:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card.YouCtrl,Emblem.YouCtrl | ValidTarget$ Permanent.OppCtrl,Opponent | IsCombat$ False | ReplaceWith$ DmgPlus2 | Description$ If a source you control would deal noncombat damage to an opponent or a permanent an opponent controls, it deals that much damage plus 2 instead.
SVar:DmgPlus2:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ X
SVar:X:ReplaceCount$DamageAmount/Plus.2

View File

@@ -6,10 +6,10 @@ SVar:TrigPeek:DB$ PeekAndReveal | PeekAmount$ 1 | RevealValid$ Land | RevealOpti
SVar:DBToken:DB$ Token | TokenAmount$ 1 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 | TokenScript$ u_1_1_fish | TokenOwner$ You | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
K:Class:2:G U:AddReplacementEffects$ SharkCatch
K:Class:2:G U:AddReplacementEffect$ SharkCatch
SVar:SharkCatch:Event$ CreateToken | ActiveZones$ Battlefield | ValidPlayer$ You | ValidToken$ Fish | ReplaceWith$ TokenReplace1 | Description$ If you would create a Fish token, create a 3/3 blue Shark creature token instead.
SVar:TokenReplace1:DB$ ReplaceToken | Type$ ReplaceToken | ValidCard$ Fish | TokenScript$ u_3_3_shark
K:Class:3:2 G U:AddReplacementEffects$ OctopusCatch
K:Class:3:2 G U:AddReplacementEffect$ OctopusCatch
SVar:OctopusCatch:Event$ CreateToken | ActiveZones$ Battlefield | ValidPlayer$ You | ValidToken$ Shark | ReplaceWith$ TokenReplace2 | Description$ If you would create a Shark token, create an 8/8 blue Octopus creature token instead.
SVar:TokenReplace2:DB$ ReplaceToken | Type$ ReplaceToken | ValidCard$ Shark | TokenScript$ u_8_8_octopus
Oracle:(Gain the next level as a sorcery to add its ability.)\nAt the beginning of your upkeep, look at the top card of your library. You may reveal it if it's a land card. Create a 1/1 blue Fish creature token if you revealed it this way. Then draw a card.\n{G}{U}: Level 2\nIf you would create a Fish token, create a 3/3 blue Shark creature token instead.\n{2}{G}{U}: Level 3\nIf you would create a Shark token, create an 8/8 blue Octopus creature token instead.

View File

@@ -5,7 +5,7 @@ T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefiel
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select another target creature you control | CounterType$ P1P1 | CounterNum$ 1
K:Class:2:G:AddStaticAbility$ WardForCounters
SVar:WardForCounters:Mode$ Continuous | Affected$ Permanent.YouCtrl+HasCounters | AddKeyword$ Ward:1 | Description$ Permanents you control with counters on them have ward {1}.
K:Class:3:3 G:AddReplacementEffects$ DoubleCounters
K:Class:3:3 G:AddReplacementEffect$ DoubleCounters
SVar:DoubleCounters:Event$ AddCounter | ActiveZones$ Battlefield | ValidSource$ You | ValidObject$ Permanent.inZoneBattlefield,Player | ReplaceWith$ AddTwiceCounters | Description$ If you would put one or more counters on a permanent or player, put twice that many of each of those kinds of counters on that permanent or player instead.
SVar:AddTwiceCounters:DB$ ReplaceCounter | ChooseCounter$ True | Amount$ X
SVar:X:ReplaceCount$CounterNum/Twice