diff --git a/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java b/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java index 5e0b1e5f2b..cac210a838 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/CavernOfSouls.java @@ -204,6 +204,7 @@ class CavernOfSoulsWatcher extends Watcher { public CavernOfSoulsWatcher(final CavernOfSoulsWatcher watcher) { super(watcher); + this.spells.addAll(watcher.spells); } @Override @@ -259,15 +260,15 @@ class CavernOfSoulsCantCounterEffect extends ContinuousRuleModifyingEffectImpl { return null; } + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTER; + } + @Override public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType() == GameEvent.EventType.COUNTER) { - CavernOfSoulsWatcher watcher = (CavernOfSoulsWatcher) game.getState().getWatchers().get("ManaPaidFromCavernOfSoulsWatcher"); - Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && watcher.spells.contains(spell.getId())) { - return true; - } - } - return false; + CavernOfSoulsWatcher watcher = (CavernOfSoulsWatcher) game.getState().getWatchers().get("ManaPaidFromCavernOfSoulsWatcher"); + Spell spell = game.getStack().getSpell(event.getTargetId()); + return spell != null && watcher.spells.contains(spell.getId()); } } diff --git a/Mage/src/mage/game/events/GameEvent.java b/Mage/src/mage/game/events/GameEvent.java index e5a1e11f8f..5e85f5b032 100644 --- a/Mage/src/mage/game/events/GameEvent.java +++ b/Mage/src/mage/game/events/GameEvent.java @@ -94,7 +94,16 @@ public class GameEvent { PLAY_LAND, LAND_PLAYED, CAST_SPELL, SPELL_CAST, ACTIVATE_ABILITY, ACTIVATED_ABILITY, - ADD_MANA, MANA_ADDED, MANA_PAYED, + ADD_MANA, MANA_ADDED, + + /* MANA_PAYED + targetId id if the ability the mana was paid for (not the sourceId) + sourceId sourceId of the mana source + playerId controller of the ability the mana was paid for + amount not used for this event + flag indicates a special condition (e.g. TRUE if it's a colored mana from Cavern of Souls) + */ + MANA_PAYED, LOSES, LOST, WINS, TARGET, TARGETED, COUNTER, COUNTERED,