From cc661a31000b30175f8244dd80e405a7829f0191 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Fri, 2 Sep 2011 00:21:40 +0400 Subject: [PATCH] Fixed NPE in kicker ability (Fixed Issue 232) --- Mage/src/mage/abilities/keyword/KickerAbility.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/abilities/keyword/KickerAbility.java b/Mage/src/mage/abilities/keyword/KickerAbility.java index bf2d71a148..8af035d85f 100644 --- a/Mage/src/mage/abilities/keyword/KickerAbility.java +++ b/Mage/src/mage/abilities/keyword/KickerAbility.java @@ -29,6 +29,7 @@ package mage.abilities.keyword; import mage.Constants.Zone; +import mage.abilities.Mode; import mage.abilities.StaticAbility; import mage.abilities.effects.Effect; import mage.cards.Card; @@ -63,10 +64,12 @@ public class KickerAbility extends StaticAbility { @Override public boolean activate(Game game, boolean noMana) { Player player = game.getPlayer(this.getControllerId()); - String message = "Use kicker - " + getEffects().get(0).getText(null) + "?"; + + String message = "Use kicker - " + getRule() + "?"; Card card = game.getCard(sourceId); // replace by card name or just plain "this" - message = message.replace("{this}", card == null ? "this" : card.getName()); + String text = card == null ? "this" : card.getName(); + message = message.replace("{this}", text).replace("{source}", text); if (player.chooseUse(getEffects().get(0).getOutcome(), message, game)) { int bookmark = game.bookmarkState(); if (super.activate(game, noMana)) {