diff --git a/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java b/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java index 4d66891eeab..46984f04584 100644 --- a/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java +++ b/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java @@ -120,11 +120,12 @@ class AshiokNightmareWeaverExileEffect extends OneShotEffect { - private int amount; + private final int amount; public PayLoyaltyCost(int amount) { this.amount = amount; this.text = Integer.toString(amount); - if (amount >= 0) this.text = "+" + this.text; + if (amount >= 0) { + this.text = "+" + this.text; + } } public PayLoyaltyCost(PayLoyaltyCost cost) { @@ -58,9 +60,7 @@ public class PayLoyaltyCost extends CostImpl { @Override public boolean canPay(UUID sourceId, UUID controllerId, Game game) { Permanent planeswalker = game.getPermanent(sourceId); - if (planeswalker.getCounters().getCount(CounterType.LOYALTY) + amount >= 0 && !planeswalker.isLoyaltyUsed()) - return true; - return false; + return planeswalker.getCounters().getCount(CounterType.LOYALTY) + amount >= 0 && !planeswalker.isLoyaltyUsed(); } @Override diff --git a/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java b/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java index c74f3cc7030..ac2ae090720 100644 --- a/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java +++ b/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java @@ -28,6 +28,7 @@ package mage.abilities.costs.common; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.VariableCostImpl; @@ -55,9 +56,15 @@ public class PayVariableLoyaltyCost extends VariableCostImpl