mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Refactor damage can't be prevented effect
This commit is contained in:
@@ -39,7 +39,6 @@ import forge.game.replacement.ReplacementType;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.TargetRestrictions;
|
||||
import forge.game.staticability.StaticAbility;
|
||||
import forge.game.trigger.TriggerType;
|
||||
import forge.game.zone.ZoneType;
|
||||
|
||||
public abstract class GameEntity extends GameObject implements IIdentifiable {
|
||||
@@ -67,31 +66,28 @@ public abstract class GameEntity extends GameObject implements IIdentifiable {
|
||||
|
||||
public final int addDamage(final int damage, final Card source, boolean isCombat, boolean noPrevention,
|
||||
final CardDamageMap damageMap, final CardDamageMap preventMap, GameEntityCounterTable counterTable, final SpellAbility cause) {
|
||||
if (noPrevention) {
|
||||
return addDamageWithoutPrevention(damage, source, damageMap, preventMap, counterTable, cause);
|
||||
} else if (isCombat) {
|
||||
return addCombatDamage(damage, source, damageMap, preventMap, counterTable);
|
||||
int damageToDo = replaceDamage(damage, source, isCombat, !noPrevention, damageMap, preventMap, counterTable, cause);
|
||||
if (damageToDo <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (isCombat) {
|
||||
source.getDamageHistory().registerCombatDamage(this);
|
||||
return addCombatDamageBase(damageToDo, source, damageMap, counterTable);
|
||||
} else {
|
||||
return addDamage(damage, source, damageMap, preventMap, counterTable, cause);
|
||||
return addDamageAfterPrevention(damageToDo, source, false, damageMap, counterTable);
|
||||
}
|
||||
}
|
||||
|
||||
public int addDamage(final int damage, final Card source, final CardDamageMap damageMap,
|
||||
final CardDamageMap preventMap, GameEntityCounterTable counterTable, final SpellAbility cause) {
|
||||
int damageToDo = damage;
|
||||
|
||||
damageToDo = replaceDamage(damageToDo, source, false, true, damageMap, preventMap, counterTable, cause);
|
||||
damageToDo = preventDamage(damageToDo, source, false, preventMap, cause);
|
||||
int damageToDo = replaceDamage(damage, source, false, true, damageMap, preventMap, counterTable, cause);
|
||||
|
||||
return addDamageAfterPrevention(damageToDo, source, false, damageMap, counterTable);
|
||||
}
|
||||
|
||||
public final int addCombatDamage(final int damage, final Card source, final CardDamageMap damageMap,
|
||||
final CardDamageMap preventMap, GameEntityCounterTable counterTable) {
|
||||
int damageToDo = damage;
|
||||
|
||||
damageToDo = replaceDamage(damageToDo, source, true, true, damageMap, preventMap, counterTable, null);
|
||||
damageToDo = preventDamage(damageToDo, source, true, preventMap, null);
|
||||
int damageToDo = replaceDamage(damage, source, true, true, damageMap, preventMap, counterTable, null);
|
||||
|
||||
if (damageToDo > 0) {
|
||||
source.getDamageHistory().registerCombatDamage(this);
|
||||
@@ -104,14 +100,14 @@ public abstract class GameEntity extends GameObject implements IIdentifiable {
|
||||
return addDamageAfterPrevention(damage, source, true, damageMap, counterTable);
|
||||
}
|
||||
|
||||
public int addDamageWithoutPrevention(final int damage, final Card source, final CardDamageMap damageMap,
|
||||
final CardDamageMap preventMap, GameEntityCounterTable counterTable, final SpellAbility cause) {
|
||||
int damageToDo = replaceDamage(damage, source, false, false, damageMap, preventMap, counterTable, cause);
|
||||
return addDamageAfterPrevention(damageToDo, source, false, damageMap, counterTable);
|
||||
public int replaceDamage(final int damage, final Card source, final boolean isCombat, boolean prevention,
|
||||
final CardDamageMap damageMap, final CardDamageMap preventMap, GameEntityCounterTable counterTable, final SpellAbility cause) {
|
||||
if (!source.canDamagePrevented(isCombat)) {
|
||||
prevention = false;
|
||||
}
|
||||
|
||||
public int replaceDamage(final int damage, final Card source, final boolean isCombat, final boolean prevention,
|
||||
final CardDamageMap damageMap, final CardDamageMap preventMap, GameEntityCounterTable counterTable, final SpellAbility cause) {
|
||||
int restDamage = damage;
|
||||
|
||||
// Replacement effects
|
||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
|
||||
repParams.put(AbilityKey.DamageSource, source);
|
||||
@@ -127,22 +123,24 @@ public abstract class GameEntity extends GameObject implements IIdentifiable {
|
||||
|
||||
switch (getGame().getReplacementHandler().run(ReplacementType.DamageDone, repParams)) {
|
||||
case NotReplaced:
|
||||
return damage;
|
||||
break;
|
||||
case Updated:
|
||||
int newDamage = (int) repParams.get(AbilityKey.DamageAmount);
|
||||
GameEntity newTarget = (GameEntity) repParams.get(AbilityKey.Affected);
|
||||
// check if this is still the affected card or player
|
||||
if (this.equals(newTarget)) {
|
||||
return newDamage;
|
||||
restDamage = newDamage;
|
||||
} else {
|
||||
if (prevention) {
|
||||
newDamage = newTarget.preventDamage(newDamage, source, isCombat, preventMap, cause);
|
||||
}
|
||||
newDamage = newTarget.replaceDamage(newDamage, source, isCombat, prevention, damageMap, preventMap, counterTable, cause);
|
||||
newTarget.addDamageAfterPrevention(newDamage, source, isCombat, damageMap, counterTable);
|
||||
restDamage = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
restDamage = 0;
|
||||
}
|
||||
|
||||
return restDamage;
|
||||
}
|
||||
|
||||
// This function handles damage after replacement and prevention effects are applied
|
||||
@@ -156,54 +154,6 @@ public abstract class GameEntity extends GameObject implements IIdentifiable {
|
||||
// not change the game state)
|
||||
public abstract int staticReplaceDamage(final int damage, final Card source, final boolean isCombat);
|
||||
|
||||
public final int preventDamage(
|
||||
final int damage, final Card source, final boolean isCombat, CardDamageMap preventMap,
|
||||
final SpellAbility cause) {
|
||||
if (!source.canDamagePrevented(isCombat)) {
|
||||
return damage;
|
||||
}
|
||||
|
||||
int restDamage = damage;
|
||||
|
||||
// first try to replace the damage
|
||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
|
||||
repParams.put(AbilityKey.DamageSource, source);
|
||||
repParams.put(AbilityKey.DamageAmount, damage);
|
||||
repParams.put(AbilityKey.IsCombat, isCombat);
|
||||
repParams.put(AbilityKey.Prevention, true);
|
||||
repParams.put(AbilityKey.PreventMap, preventMap);
|
||||
if (cause != null) {
|
||||
repParams.put(AbilityKey.Cause, cause);
|
||||
}
|
||||
|
||||
switch (getGame().getReplacementHandler().run(ReplacementType.DamageDone, repParams)) {
|
||||
case NotReplaced:
|
||||
restDamage = damage;
|
||||
break;
|
||||
case Updated:
|
||||
restDamage = (int) repParams.get(AbilityKey.DamageAmount);
|
||||
break;
|
||||
default:
|
||||
restDamage = 0;
|
||||
}
|
||||
|
||||
// if damage is greater than restDamage, damage was prevented
|
||||
if (damage > restDamage) {
|
||||
int prevent = damage - restDamage;
|
||||
preventMap.put(source, this, damage - restDamage);
|
||||
|
||||
final Map<AbilityKey, Object> runParams = AbilityKey.newMap();
|
||||
runParams.put(AbilityKey.DamageTarget, this);
|
||||
runParams.put(AbilityKey.DamageAmount, prevent);
|
||||
runParams.put(AbilityKey.DamageSource, source);
|
||||
runParams.put(AbilityKey.IsCombatDamage, isCombat);
|
||||
|
||||
getGame().getTriggerHandler().runTrigger(TriggerType.DamagePrevented, runParams, false);
|
||||
}
|
||||
|
||||
return restDamage;
|
||||
}
|
||||
|
||||
public int getPreventNextDamageTotalShields() {
|
||||
return getGame().getReplacementHandler().getTotalPreventionShieldAmount(this);
|
||||
}
|
||||
|
||||
@@ -5,16 +5,24 @@ import java.util.Map;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
import forge.game.GameLogEntryType;
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardDamageMap;
|
||||
import forge.game.replacement.ReplacementResult;
|
||||
import forge.game.replacement.ReplacementType;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.util.TextUtil;
|
||||
|
||||
/**
|
||||
* This class handles two kinds of prevention effect:
|
||||
* - Prevent next X damages. Those will use `Amount$ <SVar>`, and the `<SVar>` will have form `Number$ X`.
|
||||
* That SVar will be updated after each prevention "shield" used up.
|
||||
* - Prevent X damages. Those will use `Amount$ N` or `Amount$ <SVar>`, where the `<SVar>` will have form other than
|
||||
* `Number$ X`. These "shields" are not used up so won't be updated. */
|
||||
public class ReplaceDamageEffect extends SpellAbilityEffect {
|
||||
|
||||
@Override
|
||||
@@ -27,33 +35,44 @@ public class ReplaceDamageEffect extends SpellAbilityEffect {
|
||||
return;
|
||||
}
|
||||
|
||||
final ReplacementType event = sa.getReplacementEffect().getMode();
|
||||
|
||||
String varValue = sa.getParamOrDefault("Amount", "1");
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<AbilityKey, Object> originalParams = (Map<AbilityKey, Object>) sa.getReplacingObject(AbilityKey.OriginalParams);
|
||||
Map<AbilityKey, Object> params = AbilityKey.newMap(originalParams);
|
||||
|
||||
Integer dmg = (Integer) sa.getReplacingObject(AbilityKey.DamageAmount);
|
||||
|
||||
String varValue = sa.getParamOrDefault("Amount", "1");
|
||||
int prevent = AbilityUtils.calculateAmount(card, varValue, sa);
|
||||
|
||||
// Currently it does reduce damage by amount, need second mode for Setting Damage
|
||||
|
||||
if (prevent > 0) {
|
||||
int n = Math.min(dmg, prevent);
|
||||
dmg -= n;
|
||||
prevent -= n;
|
||||
|
||||
if (!StringUtils.isNumeric(varValue) && card.getSVar(varValue).startsWith("Number$")) {
|
||||
if (card.getType().hasStringType("Effect") && prevent <= 0) {
|
||||
game.getAction().exile(card, null);
|
||||
} else if (!StringUtils.isNumeric(varValue) && card.getSVar(varValue).startsWith("Number$")) {
|
||||
} else {
|
||||
card.setSVar(varValue, "Number$" + prevent);
|
||||
card.updateAbilityTextForView();
|
||||
}
|
||||
// Set PreventedDamage SVar for PreventionSubAbility
|
||||
}
|
||||
// Set PreventedDamage SVar
|
||||
card.setSVar("PreventedDamage", "Number$" + n);
|
||||
|
||||
// Set prevent map entry
|
||||
CardDamageMap preventMap = (CardDamageMap) originalParams.get(AbilityKey.PreventMap);
|
||||
Card source = (Card) sa.getReplacingObject(AbilityKey.Source);
|
||||
GameEntity target = (GameEntity) sa.getReplacingObject(AbilityKey.Target);
|
||||
preventMap.put(source, target, n);
|
||||
|
||||
// Following codes are commented out since DamagePrevented trigger is currently not used by any Card.
|
||||
// final Map<AbilityKey, Object> runParams = AbilityKey.newMap();
|
||||
// runParams.put(AbilityKey.DamageTarget, target);
|
||||
// runParams.put(AbilityKey.DamageAmount, dmg);
|
||||
// runParams.put(AbilityKey.DamageSource, source);
|
||||
// runParams.put(AbilityKey.IsCombatDamage, originalParams.get(AbilityKey.IsCombat));
|
||||
// game.getTriggerHandler().runTrigger(TriggerType.DamagePrevented, runParams, false);
|
||||
}
|
||||
|
||||
// no damage for original target anymore
|
||||
@@ -71,6 +90,7 @@ public class ReplaceDamageEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
//try to call replacementHandler with new Params
|
||||
final ReplacementType event = sa.getReplacementEffect().getMode();
|
||||
ReplacementResult result = game.getReplacementHandler().run(event, params);
|
||||
switch (result) {
|
||||
case NotReplaced:
|
||||
|
||||
@@ -2228,9 +2228,7 @@ public class CardFactoryUtil {
|
||||
return re;
|
||||
}
|
||||
|
||||
// Create damage prevention replacement effect for protection keyword
|
||||
private static ReplacementEffect createProtectionReplacement(final CardState card, final String kw, final boolean intrinsic) {
|
||||
Card host = card.getCard();
|
||||
public static String getProtectionReplacementValidSource(final String kw) {
|
||||
String validSource = "Card.";
|
||||
|
||||
if (kw.startsWith("Protection:")) {
|
||||
@@ -2259,8 +2257,10 @@ public class CardFactoryUtil {
|
||||
validSource += "RedSource";
|
||||
} else if (protectType.equals("green")) {
|
||||
validSource += "GreenSource";
|
||||
} else if (protectType.equals("colorless")) {
|
||||
validSource += "ColorlessSource";
|
||||
} else if (protectType.equals("all colors")) {
|
||||
validSource += "nonColorless";
|
||||
validSource += "nonColorlessSource";
|
||||
} else if (protectType.equals("everything")) {
|
||||
validSource = "";
|
||||
} else if (protectType.startsWith("opponent of ")) {
|
||||
@@ -2271,14 +2271,7 @@ public class CardFactoryUtil {
|
||||
}
|
||||
}
|
||||
|
||||
String rep = "Event$ DamageDone | Prevent$ True | ActiveZones$ Battlefield | ValidTarget$ Card.Self";
|
||||
if (!validSource.isEmpty()) {
|
||||
rep += " | ValidSource$ " + validSource;
|
||||
}
|
||||
rep += " | Secondary$ True | TiedToKeyword$ " + kw + " | Description$ " + kw;
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(rep, host, intrinsic, card);
|
||||
return re;
|
||||
return validSource;
|
||||
}
|
||||
|
||||
public static ReplacementEffect makeEtbCounter(final String kw, final CardState card, final boolean intrinsic)
|
||||
@@ -3969,7 +3962,15 @@ public class CardFactoryUtil {
|
||||
}
|
||||
}
|
||||
else if (keyword.startsWith("Protection")) {
|
||||
ReplacementEffect re = createProtectionReplacement(card, keyword, intrinsic);
|
||||
String validSource = getProtectionReplacementValidSource(keyword);
|
||||
|
||||
String rep = "Event$ DamageDone | Prevent$ True | ActiveZones$ Battlefield | ValidTarget$ Card.Self";
|
||||
if (!validSource.isEmpty()) {
|
||||
rep += " | ValidSource$ " + validSource;
|
||||
}
|
||||
rep += " | Secondary$ True | TiedToKeyword$ " + keyword + " | Description$ " + keyword;
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(rep, host, intrinsic, card);
|
||||
inst.addReplacement(re);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package forge.game.player;
|
||||
|
||||
import forge.card.CardType;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardFactoryUtil;
|
||||
import forge.game.keyword.KeywordInterface;
|
||||
import forge.game.replacement.ReplacementEffect;
|
||||
import forge.game.replacement.ReplacementHandler;
|
||||
@@ -46,41 +46,7 @@ public class PlayerFactoryUtil {
|
||||
String effect = null;
|
||||
|
||||
if (keyword.startsWith("Protection")) {
|
||||
String validSource = "Card.";
|
||||
if (keyword.startsWith("Protection:")) {
|
||||
final String[] kws = keyword.split(":");
|
||||
String characteristic = kws[1];
|
||||
if (characteristic.startsWith("Player")) {
|
||||
validSource += "ControlledBy " + characteristic;
|
||||
} else {
|
||||
if (characteristic.endsWith("White") || characteristic.endsWith("Blue")
|
||||
|| characteristic.endsWith("Black") || characteristic.endsWith("Red")
|
||||
|| characteristic.endsWith("Green") || characteristic.endsWith("Colorless")
|
||||
|| characteristic.endsWith("MonoColor") || characteristic.endsWith("MultiColor")) {
|
||||
characteristic += "Source";
|
||||
}
|
||||
validSource = characteristic;
|
||||
}
|
||||
} else if (keyword.startsWith("Protection from ")) {
|
||||
String protectType = keyword.substring("Protection from ".length());
|
||||
if (protectType.equals("white")) {
|
||||
validSource += "WhiteSource";
|
||||
} else if (protectType.equals("blue")) {
|
||||
validSource += "BlueSource";
|
||||
} else if (protectType.equals("black")) {
|
||||
validSource += "BlackSource";
|
||||
} else if (protectType.equals("red")) {
|
||||
validSource += "RedSource";
|
||||
} else if (protectType.equals("green")) {
|
||||
validSource += "GreenSource";
|
||||
} else if (protectType.equals("all colors")) {
|
||||
validSource += "nonColorless";
|
||||
} else if (protectType.equals("everything")) {
|
||||
validSource = "";
|
||||
} else {
|
||||
validSource = CardType.getSingularType(protectType);
|
||||
}
|
||||
}
|
||||
String validSource = CardFactoryUtil.getProtectionReplacementValidSource(keyword);
|
||||
|
||||
effect = "Event$ DamageDone | Prevent$ True | ActiveZones$ Command | ValidTarget$ You";
|
||||
if (!validSource.isEmpty()) {
|
||||
|
||||
@@ -51,9 +51,6 @@ public class ReplaceDamage extends ReplacementEffect {
|
||||
public boolean canReplace(Map<AbilityKey, Object> runParams) {
|
||||
final Game game = getHostCard().getGame();
|
||||
|
||||
if (!(runParams.containsKey(AbilityKey.Prevention) == (hasParam("PreventionEffect") || hasParam("Prevent")))) {
|
||||
return false;
|
||||
}
|
||||
if (((Integer) runParams.get(AbilityKey.DamageAmount)) == 0) {
|
||||
// If no actual damage is dealt, there is nothing to replace
|
||||
return false;
|
||||
|
||||
@@ -38,6 +38,7 @@ import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.ApiType;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollection;
|
||||
import forge.game.card.CardDamageMap;
|
||||
import forge.game.card.CardState;
|
||||
import forge.game.card.CardTraitChanges;
|
||||
import forge.game.card.CardUtil;
|
||||
@@ -280,6 +281,23 @@ public class ReplacementHandler {
|
||||
return res;
|
||||
}
|
||||
|
||||
private void putPreventMapEntry(final Map<AbilityKey, Object> runParams) {
|
||||
// Set prevent map entry
|
||||
CardDamageMap preventMap = (CardDamageMap) runParams.get(AbilityKey.PreventMap);
|
||||
Card source = (Card) runParams.get(AbilityKey.DamageSource);
|
||||
GameEntity target = (GameEntity) runParams.get(AbilityKey.Affected);
|
||||
Integer damage = (Integer) runParams.get(AbilityKey.DamageAmount);
|
||||
preventMap.put(source, target, damage);
|
||||
|
||||
// Following codes are commented out since DamagePrevented trigger is currently not used by any Card.
|
||||
// final Map<AbilityKey, Object> trigParams = AbilityKey.newMap();
|
||||
// trigParams.put(AbilityKey.DamageTarget, target);
|
||||
// trigParams.put(AbilityKey.DamageAmount, damage);
|
||||
// trigParams.put(AbilityKey.DamageSource, source);
|
||||
// trigParams.put(AbilityKey.IsCombatDamage, runParams.get(AbilityKey.IsCombat));
|
||||
// game.getTriggerHandler().runTrigger(TriggerType.DamagePrevented, trigParams, false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Runs a single replacement effect.
|
||||
@@ -349,10 +367,14 @@ public class ReplacementHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("Prevent")) {
|
||||
if (mapParams.get("Prevent").equals("True")) {
|
||||
return ReplacementResult.Prevented; // Nothing should replace the event.
|
||||
if (mapParams.containsKey("Prevent") && mapParams.get("Prevent").equals("True")) {
|
||||
if (replacementEffect.getMode() == ReplacementType.DamageDone) {
|
||||
if (Boolean.TRUE.equals(runParams.get(AbilityKey.NoPreventDamage))) {
|
||||
return ReplacementResult.NotReplaced;
|
||||
}
|
||||
putPreventMapEntry(runParams);
|
||||
}
|
||||
return ReplacementResult.Prevented; // Nothing should replace the event.
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("Skip")) {
|
||||
@@ -361,9 +383,25 @@ public class ReplacementHandler {
|
||||
}
|
||||
}
|
||||
|
||||
boolean cantPreventDamage = (replacementEffect.getMode() == ReplacementType.DamageDone
|
||||
&& mapParams.containsKey("PreventionEffect")
|
||||
&& Boolean.TRUE.equals(runParams.get(AbilityKey.NoPreventDamage)));
|
||||
|
||||
Player player = host.getController();
|
||||
|
||||
if (!cantPreventDamage || mapParams.containsKey("AlwaysReplace")) {
|
||||
player.getController().playSpellAbilityNoStack(effectSA, true);
|
||||
if (replacementEffect.getMode() == ReplacementType.DamageDone
|
||||
&& effectSA.getApi() != ApiType.ReplaceDamage && !cantPreventDamage) {
|
||||
putPreventMapEntry(runParams);
|
||||
}
|
||||
}
|
||||
|
||||
// If can't prevent damage, result is not replaced
|
||||
if (cantPreventDamage) {
|
||||
return ReplacementResult.NotReplaced;
|
||||
}
|
||||
|
||||
// if the spellability is a replace effect then its some new logic
|
||||
// if ReplacementResult is set in run params use that instead
|
||||
if (runParams.containsKey(AbilityKey.ReplacementResult)) {
|
||||
|
||||
@@ -7,6 +7,6 @@ A:AB$ PutCounterAll | Cost$ SubCounter<2/LOYALTY> | ValidCards$ Creature.YouCtrl
|
||||
SVar:DBPutCounterAll:DB$ PutCounterAll | ValidCards$ Planeswalker.YouCtrl+Other | CounterType$ LOYALTY | CounterNum$ 1
|
||||
A:AB$ Effect | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Emblem - Ajani Steadfast | Image$ emblem_ajani_steadfast | ReplacementEffects$ RPreventDamage | Stackable$ False | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "If a source would deal damage to you or a planeswalker you control, prevent all but 1 of that damage."
|
||||
SVar:RPreventDamage:Event$ DamageDone | ValidTarget$ You,Planeswalker.YouCtrl | ReplaceWith$ PreventDmg | PreventionEffect$ True | Description$ If a source would deal damage to you or a planeswalker you control, prevent all but 1 of that damage.
|
||||
SVar:PreventDmg:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ajani_steadfast.jpg
|
||||
SVar:PreventDmg:DB$ ReplaceDamage | Amount$ ShieldAmount
|
||||
SVar:ShieldAmount:ReplaceCount$DamageAmount/Minus.1
|
||||
Oracle:[+1]: Until end of turn, up to one target creature gets +1/+1 and gains first strike, vigilance, and lifelink.\n[−2]: Put a +1/+1 counter on each creature you control and a loyalty counter on each other planeswalker you control.\n[−7]: You get an emblem with "If a source would deal damage to you or a planeswalker you control, prevent all but 1 of that damage."
|
||||
|
||||
@@ -5,7 +5,7 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
|
||||
SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | OriginChoice$ True | OriginAlternative$ Graveyard | AlternativeMessage$ Would you like to search your library with this ability? If you do, your library will be shuffled. | Destination$ Hand | ChangeType$ Card.namedAjani; Valiant Protector | ChangeNum$ 1 | Optional$ True
|
||||
A:AB$ ChooseCard | Cost$ Sac<1/CARDNAME> | Choices$ Creature | AILogic$ NeedsPrevention | SubAbility$ DBEffect | RememberChosen$ True | SpellDescription$ Prevent all combat damage a creature of your choice would deal this turn.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | IsCombat$ True | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all combat damage a creature of your choice would deal this turn.
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | IsCombat$ True | ValidSource$ Card.IsRemembered | Prevent$ True | Description$ Prevent all combat damage a creature of your choice would deal this turn.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
DeckHints:Name$Ajani, Valiant Protector
|
||||
Oracle:When Ajani's Aid enters the battlefield, you may search your library and/or graveyard for a card named Ajani, Valiant Protector, reveal it, and put it into your hand. If you search your library this way, shuffle.\nSacrifice Ajani's Aid: Prevent all combat damage a creature of your choice would deal this turn.
|
||||
|
||||
@@ -4,7 +4,6 @@ Types:Artifact Creature Cleric
|
||||
PT:2/2
|
||||
A:AB$ ChooseSource | Cost$ W Sac<1/CARDNAME> | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal to you this turn.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | ValidTarget$ You | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the chosen source would deal to you this turn.
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | ValidTarget$ You | Prevent$ True | Description$ Prevent all damage the chosen source would deal to you this turn.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/auriok_replica.jpg
|
||||
Oracle:{W}, Sacrifice Auriok Replica: Prevent all damage a source of your choice would deal to you this turn.
|
||||
|
||||
@@ -5,7 +5,6 @@ PT:1/1
|
||||
K:Protection from red
|
||||
A:AB$ ChooseSource | Cost$ Sac<1/CARDNAME> | Choices$ Card.RedSource | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a red source of your choice would deal this turn.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | SubAbility$ DBCleanup | ConditionDefined$ ChosenCard | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.ChosenCard+RedSource | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the chosen source would deal this turn.
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.ChosenCard+RedSource | Prevent$ True | Description$ Prevent all damage the chosen source would deal this turn.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/burrenton_forge_tender.jpg
|
||||
Oracle:Protection from red\nSacrifice Burrenton Forge-Tender: Prevent all damage a red source of your choice would deal this turn.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Crumbling Sanctuary
|
||||
ManaCost:5
|
||||
Types:Artifact
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Player | ReplaceWith$ ExileTop | PreventionEffect$ True | Description$ If damage would be dealt to a player, that player exiles that many cards from the top of their library instead.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Player | ReplaceWith$ ExileTop | Description$ If damage would be dealt to a player, that player exiles that many cards from the top of their library instead.
|
||||
SVar:ExileTop:DB$ Dig | Defined$ ReplacedTarget | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:NonStackingEffect:True
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Artifact
|
||||
A:AB$ ChooseSource | Cost$ T Sac<1/CARDNAME> | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ The next time a source of your choice would deal damage to you this turn, prevent half that damage, rounded down.
|
||||
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | ReplacementEffects$ DBPrevent | ForgetOnMoved$ Battlefield
|
||||
SVar:DBPrevent:Event$ DamageDone | ActiveZones$ Command | ValidSource$ Card.IsRemembered | ValidTarget$ You | ReplaceWith$ DBReplace | PreventionEffect$ True | Description$ The next time a source of your choice would deal damage to you this turn, prevent half that damage, rounded down.
|
||||
SVar:DBReplace:DB$ ReplaceDamage | Amount$ ShieldAmount
|
||||
SVar:DBReplace:DB$ ReplaceDamage | Amount$ ShieldAmount | SubAbility$ ExileEffect
|
||||
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||
SVar:ShieldAmount:ReplaceCount$DamageAmount/HalfDown
|
||||
Oracle:{T}, Sacrifice Dark Sphere: The next time a source of your choice would deal damage to you this turn, prevent half that damage, rounded down.
|
||||
|
||||
@@ -4,9 +4,9 @@ Types:Artifact
|
||||
A:AB$ ChooseCard | Cost$ 1 | Choices$ Creature.unblocked | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ The next time an unblocked creature of your choice would deal combat damage to you this turn, prevent all but 1 of that damage.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventDamage | SubAbility$ DBCleanup | ConditionDefined$ ChosenCard | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventDamage:Event$ DamageDone | ValidSource$ Card.ChosenCard | ValidTarget$ You | ReplaceWith$ PreventDmg | PreventionEffect$ True | IsCombat$ True | Description$ The next time an unblocked creature of your choice would deal combat damage to you this turn, prevent all but 1 of that damage.
|
||||
SVar:PreventDmg:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ 1 | SubAbility$ ExileEffect
|
||||
SVar:PreventDmg:DB$ ReplaceDamage | Amount$ ShieldAmount | SubAbility$ ExileEffect
|
||||
SVar:ShieldAmount:ReplaceCount$DamageAmount/Minus.1
|
||||
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
|
||||
SVar:NonStackingEffect:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/forcefield.jpg
|
||||
Oracle:{1}: The next time an unblocked creature of your choice would deal combat damage to you this turn, prevent all but 1 of that damage.
|
||||
|
||||
@@ -2,8 +2,7 @@ Name:Gloom Surgeon
|
||||
ManaCost:1 B
|
||||
Types:Creature Spirit
|
||||
PT:2/1
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | IsCombat$ True | ReplaceWith$ Exile | PreventionEffect$ True | Description$ If combat damage would be dealt to CARDNAME, prevent that damage and exile that many cards from the top of your library.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | IsCombat$ True | ReplaceWith$ Exile | PreventionEffect$ True | AlwaysReplace$ True | Description$ If combat damage would be dealt to CARDNAME, prevent that damage and exile that many cards from the top of your library.
|
||||
SVar:Exile:DB$ Dig | DigNum$ X | ChangeNum$ All | ChangeValid$ Card | DestinationZone$ Exile
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/gloom_surgeon.jpg
|
||||
Oracle:If combat damage would be dealt to Gloom Surgeon, prevent that damage and exile that many cards from the top of your library.
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Ironscale Hydra
|
||||
ManaCost:3 G G
|
||||
Types:Creature Hydra
|
||||
PT:5/5
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ValidSource$ Creature | IsCombat$ True | ReplaceWith$ Counters | Description$ If a creature would deal combat damage to CARDNAME, prevent that damage and put a +1/+1 counter on CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ValidSource$ Creature | IsCombat$ True | ReplaceWith$ Counters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If a creature would deal combat damage to CARDNAME, prevent that damage and put a +1/+1 counter on CARDNAME.
|
||||
SVar:Counters:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
DeckHas:Ability$Counters
|
||||
Oracle:If a creature would deal combat damage to Ironscale Hydra, prevent that damage and put a +1/+1 counter on Ironscale Hydra.
|
||||
|
||||
@@ -5,7 +5,7 @@ PT:3/3
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMonarch | TriggerDescription$ When CARDNAME enters the battlefield, target opponent becomes the monarch. You can't become the monarch this turn.
|
||||
SVar:TrigMonarch:DB$ BecomeMonarch | ValidTgts$ Opponent | SubAbility$ DBPump
|
||||
SVar:DBPump:DB$ Pump | Defined$ You | KW$ You can’t become the monarch this turn.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | CheckDefinedPlayer$ You.isMonarch | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to NICKNAME while you're the monarch, prevent that damage and put that many +1/+1 counters on it.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | CheckDefinedPlayer$ You.isMonarch | ReplaceWith$ Counters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to NICKNAME while you're the monarch, prevent that damage and put that many +1/+1 counters on it.
|
||||
SVar:Counters:DB$ PutCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ Y
|
||||
SVar:Y:ReplaceCount$DamageAmount
|
||||
DeckHas:Ability$Counters
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Nine Lives
|
||||
ManaCost:1 W W
|
||||
Types:Enchantment
|
||||
K:Hexproof
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card,Emblem | ValidTarget$ You | PreventionEffect$ True | ReplaceWith$ AddCounters | Description$ If a source would deal damage to you, prevent that damage and put an incarnation counter on CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidSource$ Card,Emblem | ValidTarget$ You | PreventionEffect$ True | ReplaceWith$ AddCounters | AlwaysReplace$ True | Description$ If a source would deal damage to you, prevent that damage and put an incarnation counter on CARDNAME.
|
||||
SVar:AddCounters:DB$ PutCounter | Defined$ Self | CounterType$ INCARNATION | CounterNum$ 1
|
||||
T:Mode$ Always | TriggerZones$ Battlefield | IsPresent$ Card.Self+counters_GE9_INCARNATION | Execute$ TrigExile | TriggerDescription$ When there are nine or more incarnation counters on CARDNAME, exile it.
|
||||
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | Defined$ Self
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Human Knight
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:4
|
||||
K:CARDNAME attacks each combat if able.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from it.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from it.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
DeckHas:Ability$Counters
|
||||
Oracle:Oathsworn Knight enters the battlefield with four +1/+1 counters on it.\nOathsworn Knight attacks each combat if able.\nIf damage would be dealt to Oathsworn Knight while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from it.
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:W
|
||||
Types:Instant
|
||||
A:SP$ ChooseSource | Cost$ W | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal this turn.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the source would deal this turn.
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | Description$ Prevent all damage the source would deal this turn.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pay_no_heed.jpg
|
||||
Oracle:Prevent all damage a source of your choice would deal this turn.
|
||||
|
||||
@@ -4,7 +4,6 @@ Types:Creature Centaur Spirit
|
||||
PT:2/0
|
||||
K:Protection from black
|
||||
K:etbCounter:P1P1:3
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_centaur.jpg
|
||||
Oracle:Protection from black\nPhantom Centaur enters the battlefield with three +1/+1 counters on it.\nIf damage would be dealt to Phantom Centaur, prevent that damage. Remove a +1/+1 counter from Phantom Centaur.
|
||||
|
||||
@@ -4,7 +4,6 @@ Types:Creature Bird Soldier Spirit
|
||||
PT:0/0
|
||||
K:Flying
|
||||
K:etbCounter:P1P1:3
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_flock.jpg
|
||||
Oracle:Flying\nPhantom Flock enters the battlefield with three +1/+1 counters on it.\nIf damage would be dealt to Phantom Flock, prevent that damage. Remove a +1/+1 counter from Phantom Flock.
|
||||
|
||||
@@ -4,8 +4,7 @@ Types:Creature Insect Spirit
|
||||
PT:0/0
|
||||
K:Trample
|
||||
K:etbCounter:P1P1:2
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
A:AB$ PutCounter | Cost$ T | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_nantuko.jpg
|
||||
Oracle:Trample\nPhantom Nantuko enters the battlefield with two +1/+1 counters on it.\nIf damage would be dealt to Phantom Nantuko, prevent that damage. Remove a +1/+1 counter from Phantom Nantuko.\n{T}: Put a +1/+1 counter on Phantom Nantuko.
|
||||
|
||||
@@ -7,8 +7,7 @@ K:Trample
|
||||
T:Mode$ DamageDealtOnce | ValidSource$ Card.Self | Execute$ TrigGain | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals damage, you gain that much life.
|
||||
SVar:TrigGain:DB$ GainLife | Defined$ You | LifeAmount$ X
|
||||
SVar:X:TriggerCount$DamageAmount
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:HasCombatEffect:TRUE
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_nishoba.jpg
|
||||
Oracle:Trample\nPhantom Nishoba enters the battlefield with seven +1/+1 counters on it.\nWhenever Phantom Nishoba deals damage, you gain that much life.\nIf damage would be dealt to Phantom Nishoba, prevent that damage. Remove a +1/+1 counter from Phantom Nishoba.
|
||||
|
||||
@@ -5,8 +5,8 @@ PT:0/0
|
||||
K:etbCounter:P1P1:2
|
||||
T:Mode$ Phase | Static$ True | Phase$ First Strike Damage | Execute$ DBCleanup
|
||||
T:Mode$ Phase | Static$ True | Phase$ EndCombat | Execute$ DBCleanup
|
||||
R:Event$ DamageDone | IsCombat$ True | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCountersInCombat | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | IsCombat$ False | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Secondary$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | IsCombat$ True | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCountersInCombat | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | IsCombat$ False | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Secondary$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCountersInCombat:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionCheckSVar$ TimesFlagged | ConditionSVarCompare$ EQ0 | SubAbility$ DBFlagRemoveCounters
|
||||
SVar:DBFlagRemoveCounters:DB$ StoreSVar | SVar$ TimesFlagged | Type$ CountSVar | Expression$ TimesFlagged/Plus.1
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:2 G
|
||||
Types:Creature Cat Spirit
|
||||
PT:1/0
|
||||
K:etbCounter:P1P1:2
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_tiger.jpg
|
||||
Oracle:Phantom Tiger enters the battlefield with two +1/+1 counters on it.\nIf damage would be dealt to Phantom Tiger, prevent that damage. Remove a +1/+1 counter from Phantom Tiger.
|
||||
|
||||
@@ -3,7 +3,6 @@ ManaCost:4 G G
|
||||
Types:Creature Wurm Spirit
|
||||
PT:2/0
|
||||
K:etbCounter:P1P1:4
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantom_wurm.jpg
|
||||
Oracle:Phantom Wurm enters the battlefield with four +1/+1 counters on it.\nIf damage would be dealt to Phantom Wurm, prevent that damage. Remove a +1/+1 counter from Phantom Wurm.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Legendary Creature Zombie Hydra
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:X:nocondition:CARDNAME enters the battlefield with six +1/+1 counters on it. It escapes with twelve +1/+1 counters on it instead.
|
||||
SVar:X:Count$Escaped.12.6
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove that many +1/+1 counters from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ Counters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove that many +1/+1 counters from CARDNAME.
|
||||
SVar:Counters:DB$ RemoveCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ Y
|
||||
SVar:Y:ReplaceCount$DamageAmount
|
||||
A:AB$ Fight | Cost$ 1 B G | Defined$ Self | ValidTgts$ Creature.Other | TgtPrompt$ Select another target creature | SpellDescription$ CARDNAME fights another target creature.
|
||||
|
||||
@@ -4,7 +4,6 @@ Types:Land
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||
A:AB$ ChooseSource | Cost$ 4 W U T | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal this turn.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the chosen source would deal this turn.
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | Description$ Prevent all damage the chosen source would deal this turn.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/prahv_spires_of_order.jpg
|
||||
Oracle:{T}: Add {C}.\n{4}{W}{U}, {T}: Prevent all damage a source of your choice would deal this turn.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Hydra
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:X
|
||||
SVar:X:Count$xPaid
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage and remove that many +1/+1 counters from it.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage and remove that many +1/+1 counters from it.
|
||||
SVar:Counters:DB$ RemoveCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ Y
|
||||
SVar:Y:ReplaceCount$DamageAmount
|
||||
T:Mode$ CounterRemoved | ValidCard$ Card.Self | TriggerZones$ Battlefield | CounterType$ P1P1 | Execute$ ProteanPutCounter | TriggerDescription$ Whenever a +1/+1 counter is removed from CARDNAME, put two +1/+1 counters on it at the beginning of the next end step.
|
||||
|
||||
@@ -6,8 +6,7 @@ SVar:Bash:DB$ Destroy | ValidTgts$ Land.nonBasic | TgtPrompt$ Select target nonb
|
||||
SVar:Token:DB$ Token | TokenAmount$ 3 | TokenScript$ g_1_1_saproling | TokenOwner$ You | LegacyImage$ g 1 1 saproling pls | SpellDescription$ Create three 1/1 green Saproling creature tokens.
|
||||
SVar:Prevent:DB$ ChooseSource | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal this turn.
|
||||
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the source would deal this turn.
|
||||
SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | Description$ Prevent all damage the source would deal this turn.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
DeckHas:Ability$Token
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/riths_charm.jpg
|
||||
Oracle:Choose one —\n• Destroy target nonbasic land.\n• Create three 1/1 green Saproling creature tokens.\n• Prevent all damage a source of your choice would deal this turn.
|
||||
|
||||
@@ -7,7 +7,7 @@ A:AB$ PreventDamage | Cost$ R | Defined$ Self | Amount$ 1 | SpellDescription$ Pr
|
||||
A:AB$ PutCounter | Cost$ R R R | ActivationPhases$ Upkeep | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME. Activate only during your upkeep.
|
||||
T:Mode$ DamageDone | ValidTarget$ Card.Self | TriggerZones$ Battlefield | Execute$ RemoveCtrsTrig | Static$ True
|
||||
SVar:RemoveCtrsTrig:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ NumDmgTrig
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ActiveZones$ Battlefield | ReplaceWith$ ReplaceDamage | PreventionEffect$ True | Description$ For each 1 damage that would be dealt to CARDNAME, if it has a +1/+1 counter on it, remove a +1/+1 counter from it and prevent that 1 damage.
|
||||
R:Event$ DamageDone | ValidTarget$ Card.Self | ActiveZones$ Battlefield | ReplaceWith$ ReplaceDamage | PreventionEffect$ True | AlwaysReplace$ True | Description$ For each 1 damage that would be dealt to CARDNAME, if it has a +1/+1 counter on it, remove a +1/+1 counter from it and prevent that 1 damage.
|
||||
SVar:RemoveCtrsRepl:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ NumDmg
|
||||
SVar:ReplaceDamage:DB$ ReplaceEffect | DamageTarget$ Self | VarName$ DamageAmount | VarValue$ Z | ConditionCheckSVar$ Z | ConditionSVarCompare$ GE1 | SubAbility$ RemoveCtrsRepl
|
||||
SVar:NumDmg:ReplaceCount$DamageAmount
|
||||
@@ -16,5 +16,4 @@ SVar:X:Count$xPaid
|
||||
SVar:Y:Count$CardCounters.P1P1
|
||||
SVar:Z:SVar$NumDmg/Minus.Y
|
||||
AI:RemoveDeck:All
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rock_hydra.jpg
|
||||
Oracle:Rock Hydra enters the battlefield with X +1/+1 counters on it.\nFor each 1 damage that would be dealt to Rock Hydra, if it has a +1/+1 counter on it, remove a +1/+1 counter from it and prevent that 1 damage.\n{R}: Prevent the next 1 damage that would be dealt to Rock Hydra this turn.\n{R}{R}{R}: Put a +1/+1 counter on Rock Hydra. Activate only during your upkeep.
|
||||
|
||||
@@ -3,10 +3,9 @@ ManaCost:5 G G G
|
||||
Types:Legendary Creature Spirit
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:8
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ SekkiCounters | PreventionEffect$ True | Description$ If damage would be dealt to Sekki, prevent that damage, remove that many +1/+1 counters from Sekki, and create that many 1/1 colorless Spirit creature tokens.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ SekkiCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to Sekki, prevent that damage, remove that many +1/+1 counters from Sekki, and create that many 1/1 colorless Spirit creature tokens.
|
||||
SVar:SekkiCounters:DB$ RemoveCounter | CounterType$ P1P1 | CounterNum$ SekkiX | SubAbility$ DBSekkiToken
|
||||
SVar:DBSekkiToken:DB$ Token | TokenAmount$ SekkiX | TokenScript$ c_1_1_spirit | LegacyImage$ c 1 1 spirit sok
|
||||
A:AB$ ChangeZone | Cost$ Sac<8/Spirit> | Defined$ Self | ActivationZone$ Graveyard | Origin$ Graveyard | Destination$ Battlefield | SpellDescription$ Return Sekki from your graveyard to the battlefield.
|
||||
SVar:SekkiX:ReplaceCount$DamageAmount
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sekki_seasons_guide.jpg
|
||||
Oracle:Sekki, Seasons' Guide enters the battlefield with eight +1/+1 counters on it.\nIf damage would be dealt to Sekki, prevent that damage, remove that many +1/+1 counters from Sekki, and create that many 1/1 colorless Spirit creature tokens.\nSacrifice eight Spirits: Return Sekki from your graveyard to the battlefield.
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2 W
|
||||
Types:Creature Bird Goat
|
||||
PT:1/3
|
||||
K:Flying
|
||||
R:Event$ DamageDone | IsCombat$ False | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | Description$ If noncombat damage would be dealt to CARDNAME, prevent that damage. Put a +1/+1 counter on CARDNAME for each 1 damage prevented this way.
|
||||
R:Event$ DamageDone | IsCombat$ False | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If noncombat damage would be dealt to CARDNAME, prevent that damage. Put a +1/+1 counter on CARDNAME for each 1 damage prevented this way.
|
||||
SVar:Counters:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ X | Defined$ Self
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
DeckHas:Ability$Counters
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Temple Altisaur
|
||||
ManaCost:4 W
|
||||
Types:Creature Dinosaur
|
||||
PT:3/4
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Permanent.Dinosaur+YouCtrl+Other | ReplaceWith$ DmgMinus1 | Description$ If a source would deal damage to another Dinosaur you control, prevent all but 1 of that damage.
|
||||
SVar:DmgMinus1:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ 1
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Permanent.Dinosaur+YouCtrl+Other | ReplaceWith$ DmgMinus1 | PreventionEffect$ True | Description$ If a source would deal damage to another Dinosaur you control, prevent all but 1 of that damage.
|
||||
SVar:DmgMinus1:DB$ ReplaceDamage | Amount$ ShieldAmount
|
||||
SVar:ShieldAmount:ReplaceCount$DamageAmount/Minus.1
|
||||
DeckHints:Type$Dinosaur
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/temple_altisaur.jpg
|
||||
Oracle:If a source would deal damage to another Dinosaur you control, prevent all but 1 of that damage.
|
||||
@@ -4,7 +4,7 @@ Types:Creature Spirit Monk
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:X
|
||||
SVar:X:Count$xPaid
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove that many +1/+1 counters from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ Counters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove that many +1/+1 counters from CARDNAME.
|
||||
SVar:Counters:DB$ RemoveCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ Y
|
||||
SVar:Y:ReplaceCount$DamageAmount
|
||||
DeckHas:Ability$Counters
|
||||
|
||||
@@ -3,11 +3,10 @@ ManaCost:2 B
|
||||
Types:Creature Zombie
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:X:no Condition:CARDNAME enters the battlefield with a +1/+1 counter on it for each other Zombie you control and each Zombie card in your graveyard.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME, prevent that damage. Remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:X:Count$LastStateBattlefield Zombie.YouCtrl/Plus.Y
|
||||
SVar:Y:Count$LastStateGraveyard Zombie.YouCtrl
|
||||
SVar:NeedsToPlayVar:X GE1
|
||||
AI:RemoveDeck:Random
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/unbreathing_horde.jpg
|
||||
Oracle:Unbreathing Horde enters the battlefield with a +1/+1 counter on it for each other Zombie you control and each Zombie card in your graveyard.\nIf Unbreathing Horde would be dealt damage, prevent that damage and remove a +1/+1 counter from it.
|
||||
|
||||
@@ -2,9 +2,8 @@ Name:Undergrowth Champion
|
||||
ManaCost:1 G G
|
||||
Types:Creature Elemental
|
||||
PT:2/2
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from CARDNAME.
|
||||
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self+counters_GE1_P1P1 | ReplaceWith$ DBRemoveCounters | PreventionEffect$ True | AlwaysReplace$ True | Description$ If damage would be dealt to CARDNAME while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from CARDNAME.
|
||||
SVar:DBRemoveCounters:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on CARDNAME.
|
||||
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/undergrowth_champion.jpg
|
||||
Oracle:If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion.\nLandfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion.
|
||||
Reference in New Issue
Block a user