From 3fb18b334d1f8ddbba460090eee68c907505cf92 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 11 Mar 2019 02:04:49 +0400 Subject: [PATCH] * Tap cost abilities - added cancel button; --- .../java/mage/abilities/costs/common/TapTargetCost.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/costs/common/TapTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/TapTargetCost.java index cb79d1df6d..0496b89944 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/TapTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/TapTargetCost.java @@ -1,7 +1,5 @@ - package mage.abilities.costs.common; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; @@ -11,8 +9,9 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetControlledPermanent; import mage.util.CardUtil; +import java.util.UUID; + /** - * * @author BetaSteward_at_googlemail.com */ public class TapTargetCost extends CostImpl { @@ -22,6 +21,7 @@ public class TapTargetCost extends CostImpl { public TapTargetCost(TargetControlledPermanent target) { this.target = target; this.target.setNotTarget(true); // costs are never targeted + this.target.setRequired(false); // can be cancel by user this.text = new StringBuilder("Tap ") .append((target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") || target.getTargetName().startsWith("another")) @@ -52,7 +52,7 @@ public class TapTargetCost extends CostImpl { public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { return target.canChoose(sourceId, controllerId, game); } - + public TargetControlledPermanent getTarget() { return target; }