Merge branch 'effectUntilCounterRemoved' into 'master'

Refactor: Effects with "For as long" it has CounterType

Closes #1271

See merge request core-developers/forge!2494
This commit is contained in:
Michael Kamensky
2020-02-07 04:06:25 +00:00
12 changed files with 93 additions and 62 deletions

View File

@@ -337,6 +337,23 @@ public abstract class SpellAbilityEffect {
final Trigger addedTrigger = card.addTrigger(parsedTrigger);
addedTrigger.setIntrinsic(true);
}
protected static void addForgetCounterTrigger(final Card card, final String counterType) {
String trig = "Mode$ CounterRemoved | TriggerZones$ Command | ValidCard$ Card.IsRemembered | CounterType$ " + counterType + " | NewCounterAmount$ 0 | Static$ True";
String forgetEffect = "DB$ Pump | ForgetObjects$ TriggeredCard";
String exileEffect = "DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile"
+ " | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0";
SpellAbility saForget = AbilityFactory.getAbility(forgetEffect, card);
AbilitySub saExile = (AbilitySub) AbilityFactory.getAbility(exileEffect, card);
saForget.setSubAbility(saExile);
final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, card, true);
parsedTrigger.setOverridingAbility(saForget);
final Trigger addedTrigger = card.addTrigger(parsedTrigger);
addedTrigger.setIntrinsic(true);
}
protected static void addLeaveBattlefieldReplacement(final Card card, final SpellAbility sa, final String zone) {
final Card host = sa.getHostCard();

View File

@@ -192,6 +192,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
}
if (obj instanceof Card) {
boolean counterAdded = false;
counterAmount = sa.usesTargeting() && sa.hasParam("DividedAsYouChoose") ? sa.getTargetRestrictions().getDividedValue(gameCard) : counterAmount;
if (!sa.usesTargeting() || gameCard.canBeTargetedBy(sa)) {
if (max != -1) {
@@ -246,15 +247,14 @@ public class CountersPutEffect extends SpellAbilityEffect {
continue;
}
}
if (rememberCards) {
card.addRemembered(gameCard);
}
final Zone zone = gameCard.getGame().getZoneOf(gameCard);
if (zone == null || zone.is(ZoneType.Battlefield) || zone.is(ZoneType.Stack)) {
if (etbcounter) {
gameCard.addEtbCounter(counterType, counterAmount, placer);
} else {
gameCard.addCounter(counterType, counterAmount, placer, true, table);
if (gameCard.addCounter(counterType, counterAmount, placer, true, table) > 0) {
counterAdded = true;
}
}
if (remember) {
final int value = gameCard.getTotalCountersToAdd();
@@ -285,9 +285,14 @@ public class CountersPutEffect extends SpellAbilityEffect {
if (etbcounter) {
gameCard.addEtbCounter(counterType, counterAmount, placer);
} else {
gameCard.addCounter(counterType, counterAmount, placer, false, table);
if (gameCard.addCounter(counterType, counterAmount, placer, false, table) > 0) {
counterAdded = true;
}
}
}
if (rememberCards && counterAdded) {
card.addRemembered(gameCard);
}
game.updateLastStateForCard(gameCard);
}
} else if (obj instanceof Player) {

View File

@@ -3,11 +3,15 @@ package forge.game.ability.effects;
import forge.GameCommand;
import forge.ImageKeys;
import forge.game.Game;
import forge.game.GameObject;
import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardLists;
import forge.game.card.CardPredicates;
import forge.game.card.CounterType;
import forge.game.player.Player;
import forge.game.replacement.ReplacementEffect;
import forge.game.replacement.ReplacementHandler;
@@ -20,8 +24,10 @@ import forge.game.zone.ZoneType;
import java.util.List;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import forge.util.TextUtil;
import forge.util.collect.FCollection;
public class EffectEffect extends SpellAbilityEffect {
@@ -44,7 +50,7 @@ public class EffectEffect extends SpellAbilityEffect {
String[] effectKeywords = null;
String[] effectStaticAbilities = null;
String[] effectReplacementEffects = null;
String effectRemembered = null;
FCollection<GameObject> rememberList = null;
String effectImprinted = null;
List<Player> effectOwner = null;
boolean imprintOnHost = false;
@@ -74,7 +80,20 @@ public class EffectEffect extends SpellAbilityEffect {
}
if (sa.hasParam("RememberObjects")) {
effectRemembered = sa.getParam("RememberObjects");
rememberList = new FCollection<>();
for (final String rem : sa.getParam("RememberObjects").split(",")) {
rememberList.addAll(AbilityUtils.getDefinedObjects(hostCard, rem, sa));
}
if (sa.hasParam("ForgetCounter")) {
CounterType cType = CounterType.valueOf(sa.getParam("ForgetCounter"));
rememberList = new FCollection<GameObject>(CardLists.filter(Iterables.filter(rememberList, Card.class), CardPredicates.hasCounter(cType)));
}
// don't create Effect if there is no remembered Objects
if (rememberList.isEmpty() && (sa.hasParam("ForgetOnMoved") || sa.hasParam("ExileOnMoved") || sa.hasParam("ForgetCounter"))) {
return;
}
}
if (sa.hasParam("ImprintCards")) {
@@ -183,17 +202,18 @@ public class EffectEffect extends SpellAbilityEffect {
}
// Set Remembered
if (effectRemembered != null) {
for (final String rem : effectRemembered.split(",")) {
for (final Object o : AbilityUtils.getDefinedObjects(hostCard, rem, sa)) {
eff.addRemembered(o);
}
if (rememberList != null) {
for (final Object o : rememberList) {
eff.addRemembered(o);
}
if (sa.hasParam("ForgetOnMoved")) {
addForgetOnMovedTrigger(eff, sa.getParam("ForgetOnMoved"));
} else if (sa.hasParam("ExileOnMoved")) {
addExileOnMovedTrigger(eff, sa.getParam("ExileOnMoved"));
}
if (sa.hasParam("ForgetCounter")) {
addForgetCounterTrigger(eff, sa.getParam("ForgetCounter"));
}
}
// Set Imprinted

View File

@@ -1,11 +1,10 @@
Name:Aquitect's Will
ManaCost:U
Types:Tribal Sorcery Merfolk
A:SP$ PutCounter | Cost$ U | ValidTgts$ Land | TgtPrompt$ Select target land | RememberTargets$ True | CounterType$ FLOOD | CounterNum$ 1 | SubAbility$ DBAnimate | SpellDescription$ Put a flood counter on target land. That land is an island in addition to its other types for as long as it has a flood counter on it. If you control a Merfolk, draw a card.
SVar:DBAnimate:DB$ Animate | Defined$ ParentTarget | staticAbilities$ AnimateIsland | Permanent$ True | SubAbility$ DBDraw
SVar:AnimateIsland:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self+counters_GE1_FLOOD | AddType$ Island
A:SP$ PutCounter | Cost$ U | ValidTgts$ Land | TgtPrompt$ Select target land | CounterType$ FLOOD | CounterNum$ 1 | SubAbility$ DBEffect | SpellDescription$ Put a flood counter on target land. That land is an island in addition to its other types for as long as it has a flood counter on it. If you control a Merfolk, draw a card.
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ FountainStatic | ForgetOnMoved$ Battlefield | ForgetCounter$ FLOOD | Duration$ Permanent | SubAbility$ DBDraw
SVar:FountainStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | AddType$ Island | Description$ That land is an island in addition to its other types for as long as it has a flood counter on it.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | ConditionPresent$ Merfolk.YouCtrl | ConditionCompare$ GE1 | ConditionDescription$ If you control a Merfolk,
AI:RemoveDeck:Random
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/aquitects_will.jpg
Oracle:Put a flood counter on target land. That land is an Island in addition to its other types for as long as it has a flood counter on it. If you control a Merfolk, draw a card.

View File

@@ -4,9 +4,8 @@ Types:Creature Bird Wizard
PT:3/1
K:Flying
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may put a feather counter on target creature. If you do, that creature has base power and toughness 3/1 and has flying for as long as it has a feather counter on it.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ FEATHER | CounterNum$ 1 | SubAbility$ DBAnimate
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | staticAbilities$ MimeomancerStatic | Permanent$ True
SVar:MimeomancerStatic:Mode$ Continuous | Affected$ Card.Self+counters_GE1_FEATHER | SetPower$ 3 | SetToughness$ 1 | AddKeyword$ Flying | Description$ CARDNAME is 3/1 and has flying for as long as it has a feather counter on it.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ FEATHER | CounterNum$ 1 | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ MimeomancerStatic | ForgetOnMoved$ Battlefield | ForgetCounter$ FEATHER | Duration$ Permanent
SVar:MimeomancerStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | SetPower$ 3 | SetToughness$ 1 | AddKeyword$ Flying | Description$ CARDNAME is 3/1 and has flying for as long as it has a feather counter on it.
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/aven_mimeomancer.jpg
Oracle:Flying\nAt the beginning of your upkeep, you may put a feather counter on target creature. If you do, that creature has base power and toughness 3/1 and has flying for as long as it has a feather counter on it.

View File

@@ -1,17 +1,18 @@
Name:Cyclopean Tomb
ManaCost:4
Types:Artifact
A:AB$ PutCounter | Cost$ 2 T | ValidTgts$ Land.nonSwamp | TgtPrompt$ Select target non-Swamp land | RememberTargets$ True | CounterType$ MIRE | CounterNum$ 1 | ActivationPhases$ Upkeep | SubAbility$ DBAnimate | SpellDescription$ Put a mire counter on target non-Swamp land. That land is a Swamp for as long as it has a mire counter on it. Activate this ability only during your upkeep.
SVar:DBAnimate:DB$ Animate | Defined$ ParentTarget | staticAbilities$ AnimateSwamp | Permanent$ True
SVar:AnimateSwamp:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self+counters_GE1_MIRE | AddType$ Swamp | RemoveLandTypes$ True | RemoveIntrinsicAbilities$ True
A:AB$ PutCounter | Cost$ 2 T | ValidTgts$ Land.nonSwamp | TgtPrompt$ Select target non-Swamp land | RememberCards$ True | CounterType$ MIRE | CounterNum$ 1 | ActivationPhases$ Upkeep | SubAbility$ DBEffect | SpellDescription$ Put a mire counter on target non-Swamp land. That land is a Swamp for as long as it has a mire counter on it. Activate this ability only during your upkeep.
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ TombStatic | ForgetOnMoved$ Battlefield | ForgetCounter$ MIRE | Duration$ Permanent
SVar:TombStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | AddType$ Swamp | RemoveLandTypes$ True | RemoveIntrinsicAbilities$ True | Description$ That land is a Swamp for as long as it has a mire counter on it
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, at the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with CARDNAME but that a mire counter has not been removed from with CARDNAME.
SVar:TrigEffect:DB$ Effect | ImprintCards$ Remembered | Triggers$ UpkeepRemove,TrigForget | SVars$ PumpForget,TrigRemove,DBRemoveCounter,DBForget | Duration$ Permanent
SVar:TrigEffect:DB$ Effect | RememberObjects$ RememberedCard | Triggers$ UpkeepRemove | ForgetOnMoved$ Battlefield | SVars$ TrigRemove,DBRemoveCounter,DBForget,DBClearChosen,DBExileSelf | Duration$ Permanent | SubAbility$ DBClearRemembered
SVar:UpkeepRemove:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigRemove | TriggerZones$ Command | TriggerDescription$ At the beginning of your upkeep, remove all mire counters from a land that a mire counter was put onto with Cyclopean Tomb but that a mire counter has not been removed from with Cyclopean Tomb.
SVar:TrigRemove:DB$ ChooseCard | Choices$ Card.IsImprinted | Mandatory$ True | SubAbility$ DBRemoveCounter
SVar:TrigRemove:DB$ ChooseCard | Choices$ Card.IsRemembered | Mandatory$ True | SubAbility$ DBRemoveCounter
SVar:DBRemoveCounter:DB$ RemoveCounter | CounterType$ MIRE | CounterNum$ All | Defined$ ChosenCard | SubAbility$ DBForget
SVar:DBForget:DB$ Pump | ForgetImprinted$ ChosenCard
SVar:TrigForget:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | TriggerZones$ Command | ValidCard$ Card.IsImprinted | Static$ True | Execute$ PumpForget
SVar:PumpForget:DB$ Pump | ForgetImprinted$ TriggeredCard
SVar:DBForget:DB$ Pump | ForgetObjects$ ChosenCard | SubAbility$ DBClearChosen
SVar:DBClearChosen:DB$ Cleanup | ClearChosenCard$ True | SubAbility$ DBExileSelf
SVar:DBExileSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0
SVar:DBClearRemembered:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All
AI:RemoveDeck:Random
SVar:Picture:http://www.wizards.com/global/images/magic/general/cyclopean_tomb.jpg

View File

@@ -2,14 +2,11 @@ Name:Dread Wight
ManaCost:3 B B
Types:Creature Zombie
PT:3/4
T:Mode$ AttackerBlocked | ValidCard$ Creature | ValidBlocker$ Card.Self | Execute$ DelTrigBlocked | TriggerDescription$ At end of combat, put a paralyzation counter on each creature blocking or blocked by CARDNAME and tap those creatures. Each of those creatures doesn't untap during its controller's untap step for as long as it has a paralyzation counter on it. Each of those creatures gains "{4}: Remove a paralyzation counter from this creature."
T:Mode$ Blocks | ValidCard$ Creature | ValidBlocked$ Card.Self | Execute$ DelTrigBlocker | Secondary$ True | TriggerDescription$ At end of combat, put a paralyzation counter on each creature blocking or blocked by CARDNAME and tap those creatures. Each of those creatures doesn't untap during its controller's untap step for as long as it has a paralyzation counter on it. Each of those creatures gains "{4}: Remove a paralyzation counter from this creature."
SVar:DelTrigBlocked:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Opponent | Execute$ TrigCounter | RememberObjects$ TriggeredAttacker | TriggerDescription$ At the end of combat, put a paralyzation counter on creature
SVar:DelTrigBlocker:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ You | Execute$ TrigCounter | RememberObjects$ TriggeredBlocker | TriggerDescription$ At the end of combat, put a paralyzation counter on creature
SVar:TrigCounter:DB$ PutCounter | CounterType$ PARALYZATION | CounterNum$ 1 | Defined$ DelayTriggerRemembered | SubAbility$ DBTap | SpellDescription$ Put paralyzation counter on creature
SVar:DBTap:DB$ Tap | Defined$ DelayTriggerRemembered | SpellDescription$ Tap creature | SubAbility$ DBAnimate
SVar:DBAnimate:DB$ Animate | Defined$ DelayTriggerRemembered | staticAbilities$ Static | Abilities$ ABRemoveCounter | Permanent$ True
T:Mode$ Phase | Phase$ EndCombat | Execute$ TrigCounter | TriggerDescription$ At end of combat, put a paralyzation counter on each creature blocking or blocked by CARDNAME and tap those creatures. Each of those creatures doesn't untap during its controller's untap step for as long as it has a paralyzation counter on it. Each of those creatures gains "{4}: Remove a paralyzation counter from this creature."
SVar:TrigCounter:DB$ PutCounterAll | CounterType$ PARALYZATION | CounterNum$ 1 | ValidCards$ Creature.blockedBySource,Creature.blockingSource | SubAbility$ DBTap
SVar:DBTap:DB$ TapAll | ValidCards$ Creature.blockedBySource,Creature.blockingSource | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Valid Creature.blockedBySource,Valid Creature.blockingSource | StaticAbilities$ DontUntap | Duration$ Permanent | ConditionPresent$ Creature.blockedBySource,Creature.blockingSource | SubAbility$ DBAnimate | ForgetOnMoved$ Battlefield | ForgetCounter$ PARALYZATION
SVar:DBAnimate:DB$ AnimateAll | ValidCards$ Creature.blockedBySource,Creature.blockingSource | Abilities$ ABRemoveCounter | Permanent$ True
SVar:ABRemoveCounter:AB$ RemoveCounter | Defined$ Self | Cost$ 4 | CounterType$ PARALYZATION | CounterNum$ 1 | SpellDescription$ Remove a paralyzation counter from this creature.
SVar:Static:Mode$ Continuous | Affected$ Card.Self+counters_GE1_PARALYZATION | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | AffectedZone$ Battlefield
SVar:Picture:http://www.wizards.com/global/images/magic/general/dread_wight.jpg
SVar:DontUntap:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Card.IsRemembered | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | Description$ Each of those creatures doesn't untap during its controller's untap step for as long as it has a paralyzation counter on it.
Oracle:At end of combat, put a paralyzation counter on each creature blocking or blocked by Dread Wight and tap those creatures. Each of those creatures doesn't untap during its controller's untap step for as long as it has a paralyzation counter on it. Each of those creatures gains "{4}: Remove a paralyzation counter from this creature."

View File

@@ -6,8 +6,7 @@ K:Trample
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, you may choose any number of target lands you control and put an awakening counter on each of them. Each of those lands is an 8/8 green Elemental creature for as long as it has an awakening counter on it. They're still lands.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Land.YouCtrl | OptionalDecider$ You | TargetMin$ 0 | TargetMax$ X | TgtPrompt$ Select lands you control | CounterType$ AWAKENING | CounterNum$ 1 | SubAbility$ DBEffect | References$ X
SVar:X:Count$Valid Land.YouCtrl
SVar:DBEffect:DB$ Effect | Name$ Awakening Effect | StaticAbilities$ KWAnimateAll | Duration$ Permanent | RememberObjects$ Targeted
SVar:KWAnimateAll:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+counters_GE1_AWAKENING | SetPower$ 8 | SetToughness$ 8 | AddType$ Creature & Elemental | SetColor$ Green | Description$ Each of those lands is an 8/8 green Elemental creature for as long as it has an awakening counter on it. They're still lands.
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ TangleStatic | ForgetOnMoved$ Battlefield | ForgetCounter$ AWAKENING | Duration$ Permanent
SVar:TangleStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | SetPower$ 8 | SetToughness$ 8 | AddType$ Creature & Elemental | RemoveCreatureTypes$ True | SetColor$ Green | Description$ Each of those lands is an 8/8 green Elemental creature for as long as it has an awakening counter on it. They're still lands.
SVar:MustBeBlocked:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/liege_of_the_tangle.jpg
Oracle:Trample\nWhenever Liege of the Tangle deals combat damage to a player, you may choose any number of target lands you control and put an awakening counter on each of them. Each of those lands is an 8/8 green Elemental creature for as long as it has an awakening counter on it. They're still lands.

View File

@@ -1,11 +1,10 @@
Name:Makeshift Mannequin
ManaCost:3 B
Types:Instant
A:SP$ ChangeZone | Cost$ 3 B | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature from your graveyard | Origin$ Graveyard | Destination$ Battlefield | RememberTargets$ True | SubAbility$ DBCounter | SpellDescription$ Return target creature card from your graveyard to the battlefield with a mannequin counter on it. For as long as that creature has a mannequin counter on it, it has "When this creature becomes the target of a spell or ability, sacrifice it."
SVar:DBCounter:DB$ PutCounter | CounterType$ MANNEQUIN | CounterNum$ 1 | Defined$ Remembered | SubAbility$ DBAnimate
SVar:DBAnimate:DB$ Animate | Triggers$ BecomesTarget | sVars$ MakeshiftSac | Defined$ Remembered | Permanent$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:BecomesTarget:Mode$ BecomesTarget | ValidTarget$ Card.Self+counters_GE1_MANNEQUIN | TriggerZones$ Battlefield | Execute$ MakeshiftSac | TriggerDescription$ When CARDNAME becomes the target of a spell or ability, sacrifice it.
A:SP$ ChangeZone | Cost$ 3 B | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature from your graveyard | Origin$ Graveyard | Destination$ Battlefield | WithCounters$ MANNEQUIN_1 | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Return target creature card from your graveyard to the battlefield with a mannequin counter on it. For as long as that creature has a mannequin counter on it, it has "When this creature becomes the target of a spell or ability, sacrifice it."
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ MannequinStatic | SVars$ MannequinBecomesTarget,MakeshiftSac | SubAbility$ DBCleanup | ForgetOnMoved$ Battlefield | ForgetCounter$ MANNEQUIN
SVar:MannequinStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | AddTrigger$ MannequinBecomesTarget | Description$ For as long as that creature has a mannequin counter on it, it has "When this creature becomes the target of a spell or ability, sacrifice it."
SVar:MannequinBecomesTarget:Mode$ BecomesTarget | ValidTarget$ Card.Self | TriggerZones$ Battlefield | Execute$ MakeshiftSac | TriggerDescription$ When CARDNAME becomes the target of a spell or ability, sacrifice it.
SVar:MakeshiftSac:DB$Sacrifice | Defined$ Self
SVar:Picture:http://www.wizards.com/global/images/magic/general/makeshift_mannequin.jpg
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Return target creature card from your graveyard to the battlefield with a mannequin counter on it. For as long as that creature has a mannequin counter on it, it has "When this creature becomes the target of a spell or ability, sacrifice it."

View File

@@ -4,12 +4,10 @@ Types:Legendary Creature Vampire
PT:3/3
K:Menace
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your end step, put a bounty counter on target creature an opponent controls. For as long as that creature has a bounty counter on it, it has "When this creature dies, each opponent draws a card and gains 2 life."
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | CounterType$ BOUNTY | CounterNum$ 1 | IsCurse$ True | SubAbility$ DBAnimate
#TODO: Ideally, this has to be implemented with a condition where, if counters are removed from the permanent, the trigger
#is removed even if the counters of the same type are later added via something else.
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | sVars$ MathasPayoffDraw,MathasPayoffLife,MathasDeath | Triggers$ MathasDeath | Permanent$ True
SVar:MathasDeath:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self+counters_GE1_BOUNTY | Execute$ MathasPayoffDraw | TriggerDescription$ When this creature dies, each opponent draws a card and gains 2 life.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | CounterType$ BOUNTY | CounterNum$ 1 | IsCurse$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ MathasStatic | SVars$ MathasDeath,MathasPayoffDraw,MathasPayoffLife | ForgetOnMoved$ Battlefield | ForgetCounter$ BOUNTY | Duration$ Permanent
SVar:MathasStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | AddTrigger$ MathasDeath | Description$ For as long as that creature has a bounty counter on it, it has "When this creature dies, each opponent draws a card and gains 2 life."
SVar:MathasDeath:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ MathasPayoffDraw | TriggerDescription$ When this creature dies, each opponent draws a card and gains 2 life.
SVar:MathasPayoffDraw:DB$ Draw | Defined$ Player.Opponent | NumCards$ 1 | SubAbility$ MathasPayoffLife
SVar:MathasPayoffLife:DB$ GainLife | Defined$ Player.Opponent | LifeAmount$ 2
SVar:Picture:http://www.wizards.com/global/images/magic/general/mathas_fiend_seeker.jpg
Oracle:Menace\nAt the beginning of your end step, put a bounty counter on target creature an opponent controls. For as long as that creature has a bounty counter on it, it has "When this creature dies, each opponent draws a card and gains 2 life."

View File

@@ -2,10 +2,9 @@ Name:Obsidian Fireheart
ManaCost:1 R R R
Types:Creature Elemental
PT:4/4
A:AB$ PutCounter | Cost$ 1 R R | IsCurse$ True | ValidTgts$ Land.counters_EQ0_BLAZE | TgtPrompt$ Select target Land without a Blaze Counter | CounterType$ BLAZE | CounterNum$ 1 | SubAbility$ DBAnimate | SpellDescription$ Put a blaze counter on target land without a blaze counter on it. For as long as that land has a blaze counter on it, it has "At the beginning of your upkeep, this land deals 1 damage to you." (The land continues to burn after Obsidian Fireheart has left the battlefield.)
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | staticAbilities$ ObsidianBlaze | sVars$ ObsidianBlazeTrig,ObsidianBlazeDmg | StackDescription$ None | Permanent$ True
SVar:ObsidianBlaze:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self+counters_GE1_BLAZE | AddTrigger$ ObsidianBlazeTrig
A:AB$ PutCounter | Cost$ 1 R R | IsCurse$ True | ValidTgts$ Land.counters_EQ0_BLAZE | TgtPrompt$ Select target Land without a Blaze Counter | CounterType$ BLAZE | CounterNum$ 1 | SubAbility$ DBEffect | SpellDescription$ Put a blaze counter on target land without a blaze counter on it. For as long as that land has a blaze counter on it, it has "At the beginning of your upkeep, this land deals 1 damage to you." (The land continues to burn after CARDNAME has left the battlefield.)
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ ObsidianStatic | SVars$ ObsidianBlazeTrig,ObsidianBlazeDmg | ForgetOnMoved$ Battlefield | ForgetCounter$ BLAZE | Duration$ Permanent
SVar:ObsidianStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | AddTrigger$ ObsidianBlazeTrig | Description$ For as long as that land has a blaze counter on it, it has "At the beginning of your upkeep, this land deals 1 damage to you."
SVar:ObsidianBlazeTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ObsidianBlazeDmg | TriggerDescription$ At the beginning of your upkeep, CARDNAME deals 1 damage to you.
SVar:ObsidianBlazeDmg:DB$ DealDamage | Defined$ You | NumDmg$ 1
SVar:Picture:http://www.wizards.com/global/images/magic/general/obsidian_fireheart.jpg
Oracle:{1}{R}{R}: Put a blaze counter on target land without a blaze counter on it. For as long as that land has a blaze counter on it, it has "At the beginning of your upkeep, this land deals 1 damage to you." (The land continues to burn after Obsidian Fireheart has left the battlefield.)

View File

@@ -2,12 +2,10 @@ Name:Quicksilver Fountain
ManaCost:3
Types:Artifact
T:Mode$ Phase | Phase$ Upkeep | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's upkeep, that player puts a flood counter on target non-Island land they control of their choice. That land is an Island for as long as it has a flood counter on it.
SVar:TrigPutCounter:DB$ PutCounter | TargetingPlayer$ TriggeredPlayer | ValidTgts$ Land.nonIsland+ActivePlayerCtrl | TgtPrompt$ Select target non-Island land you control | CounterType$ FLOOD | CounterNum$ 1 | SubAbility$ DBAnimate
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | staticAbilities$ STFlood | Permanent$ True
SVar:STFlood:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self+counters_GE1_FLOOD | AddType$ Island | RemoveLandTypes$ True | RemoveIntrinsicAbilities$ True
T:Mode$ Phase | Phase$ End of Turn | CheckSVar$ X | SVarCompare$ EQ0 | TriggerZones$ Battlefield | Execute$ TrigRemoveAll | References$ X | TriggerDescription$ At the beginning of each end step, if all lands on the battlefield are Islands, remove all flood counters from them.
SVar:TrigPutCounter:DB$ PutCounter | TargetingPlayer$ TriggeredPlayer | ValidTgts$ Land.nonIsland+ActivePlayerCtrl | TgtPrompt$ Select target non-Island land you control | CounterType$ FLOOD | CounterNum$ 1 | Placer$ TriggeredPlayer | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ FountainStatic | ForgetOnMoved$ Battlefield | ForgetCounter$ FLOOD | Duration$ Permanent
SVar:FountainStatic:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | AddType$ Island | RemoveLandTypes$ True | RemoveIntrinsicAbilities$ True | Description$ That land is an Island for as long as it has a flood counter on it.
T:Mode$ Phase | Phase$ End of Turn | IsPresent$ Land.nonIsland | PresentCompare$ EQ0 | TriggerZones$ Battlefield | Execute$ TrigRemoveAll | TriggerDescription$ At the beginning of each end step, if all lands on the battlefield are Islands, remove all flood counters from them.
SVar:TrigRemoveAll:DB$ RemoveCounterAll | ValidCards$ Land | CounterType$ FLOOD | AllCounters$ True
SVar:X:Count$Valid Land.nonIsland
AI:RemoveDeck:Random
SVar:Picture:http://www.wizards.com/global/images/magic/general/quicksilver_fountain.jpg
Oracle:At the beginning of each player's upkeep, that player puts a flood counter on target non-Island land they control of their choice. That land is an Island for as long as it has a flood counter on it.\nAt the beginning of each end step, if all lands on the battlefield are Islands, remove all flood counters from them.