diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtil.java b/forge-ai/src/main/java/forge/ai/ComputerUtil.java index 387d4a83e07..304c825596c 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtil.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtil.java @@ -2809,7 +2809,7 @@ public class ComputerUtil { || type.is(CounterEnumType.GOLD) || type.is(CounterEnumType.MUSIC) || type.is(CounterEnumType.PUPA) || type.is(CounterEnumType.PARALYZATION) || type.is(CounterEnumType.SHELL) || type.is(CounterEnumType.SLEEP) || type.is(CounterEnumType.SLUMBER) || type.is(CounterEnumType.SLEIGHT) || type.is(CounterEnumType.WAGE) - || type.is(CounterEnumType.INCARNATION) || type.is(CounterEnumType.RUST); + || type.is(CounterEnumType.INCARNATION) || type.is(CounterEnumType.RUST) || type.is(CounterEnumType.STUN); } // this countertypes has no effect diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index eab8afa5f4e..fe29ac14162 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -334,6 +334,7 @@ public class Card extends GameEntity implements Comparable, IHasSVars { private ReplacementEffect shieldCounterReplaceDamage = null; private ReplacementEffect shieldCounterReplaceDestroy = null; + private ReplacementEffect stunCounterReplaceUntap = null; // Enumeration for CMC request types public enum SplitCMCMode { @@ -6100,16 +6101,16 @@ public class Card extends GameEntity implements Comparable, IHasSVars { } // Shield Counter aren't affected by Changed Card Traits - if (this.getCounters(CounterEnumType.SHIELD) > 0) { + if (getCounters(CounterEnumType.SHIELD) > 0) { String sa = "DB$ RemoveCounter | Defined$ Self | CounterType$ Shield | CounterNum$ 1"; if (shieldCounterReplaceDamage == null) { - String reStr = "Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | PreventionEffect$ True | AlwaysReplace$ True " + String reStr = "Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Card.Self | PreventionEffect$ True | AlwaysReplace$ True | Secondary$ True " + "| Description$ If damage would be dealt to this permanent, prevent that damage and remove a shield counter from it."; shieldCounterReplaceDamage = ReplacementHandler.parseReplacement(reStr, this, false, null); shieldCounterReplaceDamage.setOverridingAbility(AbilityFactory.getAbility(sa, this)); } if (shieldCounterReplaceDestroy == null) { - String reStr = "Event$ Destroy | ActiveZones$ Battlefield | ValidCard$ Card.Self | ValidSource$ SpellAbility " + String reStr = "Event$ Destroy | ActiveZones$ Battlefield | ValidCard$ Card.Self | ValidSource$ SpellAbility | Secondary$ True " + "| Description$ If this permanent would be destroyed as the result of an effect, instead remove a shield counter from it."; shieldCounterReplaceDestroy = ReplacementHandler.parseReplacement(reStr, this, false, null); shieldCounterReplaceDestroy.setOverridingAbility(AbilityFactory.getAbility(sa, this)); @@ -6118,6 +6119,17 @@ public class Card extends GameEntity implements Comparable, IHasSVars { list.add(shieldCounterReplaceDamage); list.add(shieldCounterReplaceDestroy); } + if (getCounters(CounterEnumType.STUN) > 0) { + String sa = "DB$ RemoveCounter | Defined$ Self | CounterType$ Stun | CounterNum$ 1"; + if (stunCounterReplaceUntap == null) { + String reStr = "Event$ Untap | ActiveZones$ Battlefield | ValidCard$ Card.Self | Secondary$ True " + + "| Description$ If this permanent would become untapped, instead remove a stun counter from it."; + + stunCounterReplaceUntap = ReplacementHandler.parseReplacement(reStr, this, false, null); + stunCounterReplaceUntap.setOverridingAbility(AbilityFactory.getAbility(sa, this)); + } + list.add(stunCounterReplaceUntap); + } } public boolean hasReplacementEffect(final ReplacementEffect re) { diff --git a/forge-game/src/main/java/forge/game/card/CounterEnumType.java b/forge-game/src/main/java/forge/game/card/CounterEnumType.java index 6bd9a2fb41b..ab66a3ab70f 100644 --- a/forge-game/src/main/java/forge/game/card/CounterEnumType.java +++ b/forge-game/src/main/java/forge/game/card/CounterEnumType.java @@ -329,6 +329,8 @@ public enum CounterEnumType { STUDY("STUDY", 226, 192, 165), + STUN("STUN", 226, 192, 165), + TASK("TASK", 191, 63, 49), THEFT("THEFT", 255, 176, 125), diff --git a/forge-gui/res/cardsfolder/upcoming/impede_momentum.txt b/forge-gui/res/cardsfolder/upcoming/impede_momentum.txt new file mode 100644 index 00000000000..0e3cbe0989a --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/impede_momentum.txt @@ -0,0 +1,8 @@ +Name:Impede Momentum +ManaCost:1 U +Types:Sorcery +A:SP$ Tap | TgtPrompt$ Choose target creature | ValidTgts$ Creature | SubAbility$ DBCounter | SpellDescription$ Tap target creature and put three stun counters on it. (If a permanent with a stun counter would become untapped, remove one from it instead.) +SVar:DBCounter:DB$ PutCounter | Defined$ Targeted | CounterType$ Stun | CounterNum$ 3 | SubAbility$ DBScry +SVar:DBScry:DB$ Scry | ScryNum$ 1 | SpellDescription$ Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) +DeckHints:Ability$Counters +Oracle:Tap target creature and put three stun counters on it. (If a permanent with a stun counter would become untapped, remove one from it instead.)\nScry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)