From 87f590f6b871684dcaabd6746aa4e1e92d9c64e9 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 13 Mar 2018 23:19:36 +0100 Subject: [PATCH] * Skirk Commando - Fixed triggered ability. --- Mage.Sets/src/mage/cards/s/SkirkCommando.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/SkirkCommando.java b/Mage.Sets/src/mage/cards/s/SkirkCommando.java index a091897f3b..3578a700de 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkCommando.java +++ b/Mage.Sets/src/mage/cards/s/SkirkCommando.java @@ -41,6 +41,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.game.events.GameEvent; +import mage.players.Player; import mage.target.common.TargetCreaturePermanent; /** @@ -50,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent; public class SkirkCommando extends CardImpl { public SkirkCommando(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); this.subtype.add(SubType.GOBLIN); this.power = new MageInt(2); @@ -87,9 +88,14 @@ class SkirkCommandoTriggeredAbility extends DealsCombatDamageToAPlayerTriggeredA @Override public boolean checkTrigger(GameEvent event, Game game) { if (super.checkTrigger(event, game)) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that player controls"); - filter.add(new ControllerIdPredicate(event.getPlayerId())); - addTarget(new TargetCreaturePermanent(filter)); + Player player = game.getPlayer(event.getPlayerId()); + if (player != null) { + getTargets().clear(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that player " + player.getName() + " controls"); + filter.add(new ControllerIdPredicate(event.getPlayerId())); + addTarget(new TargetCreaturePermanent(filter)); + return true; + } } return false; }