[SNC] Implemented shield counter mechanic (#8830)

* [SNC] Implemented shield counter mechanic

* Rework shield counter to be a global replacement effect

* Add unit test for shield counter

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
Daniel Bomar 2022-04-14 08:43:12 -05:00 committed by GitHub
parent a1c62f4495
commit 63239fe8e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 134 additions and 1 deletions

View file

@ -14,6 +14,7 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.PreventionEffectData;
import mage.abilities.effects.common.CopyEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.keyword.ShieldCounterEffect;
import mage.abilities.keyword.*;
import mage.abilities.mana.DelayedTriggeredManaAbility;
import mage.abilities.mana.TriggeredManaAbility;
@ -1130,6 +1131,9 @@ public abstract class GameImpl implements Game {
return;
}
// Apply shield counter mechanic from SNC
state.addAbility(new SimpleStaticAbility(Zone.ALL, new ShieldCounterEffect()), null);
// Handle companions
Map<Player, Card> playerCompanionMap = new HashMap<>();
for (Player player : state.getPlayers().values()) {