From 6e5494c02219a00309c8308df49257abf4ee2f19 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov <jaydi85@gmail.com> Date: Fri, 3 Jan 2020 12:16:32 +0400 Subject: [PATCH] fixed Wavebreak Hippocamp (missing watcher, wrong turn check) --- Mage.Sets/src/mage/cards/w/WavebreakHippocamp.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WavebreakHippocamp.java b/Mage.Sets/src/mage/cards/w/WavebreakHippocamp.java index 42cd5f47d4..f245d20d59 100644 --- a/Mage.Sets/src/mage/cards/w/WavebreakHippocamp.java +++ b/Mage.Sets/src/mage/cards/w/WavebreakHippocamp.java @@ -29,7 +29,7 @@ public final class WavebreakHippocamp extends CardImpl { this.toughness = new MageInt(2); // Whenever you cast your first spell during each opponent's turn, draw a card. - this.addAbility(new WavebreakHippocampTriggeredAbility()); + this.addAbility(new WavebreakHippocampTriggeredAbility(), new SpellsCastWatcher()); } private WavebreakHippocamp(final WavebreakHippocamp card) { @@ -59,14 +59,20 @@ class WavebreakHippocampTriggeredAbility extends SpellCastControllerTriggeredAbi @Override public boolean checkTrigger(GameEvent event, Game game) { - if (!game.getActivePlayerId().equals(this.getControllerId()) + if (game.getActivePlayerId().equals(this.getControllerId()) // ignore controller turn || !super.checkTrigger(event, game)) { return false; } + + if (!game.getOpponents(this.getControllerId()).contains(game.getActivePlayerId())) { + return false; + } + SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class); if (watcher == null) { return false; } + List<Spell> spells = watcher.getSpellsCastThisTurn(event.getPlayerId()); return spells != null && spells.size() == 1; }