From f33bf7989d51f39969b25c6e22ce736c826de1c7 Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Tue, 19 Sep 2023 17:17:56 +0200 Subject: [PATCH] clean up --- forge-ai/src/main/java/forge/ai/ComputerUtilMana.java | 6 +++--- .../src/main/java/forge/game/cost/CostAdjustment.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index fe2f5dfcc6e..739312bfbc5 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -990,7 +990,7 @@ public class ComputerUtilMana { continue; } - if (!sa.allowsPayingWithShard(m.getSourceCard(), ManaAtom.fromName(s))) { + if (!sa.allowsPayingWithShard(sourceCard, ManaAtom.fromName(s))) { continue; } @@ -1008,7 +1008,7 @@ public class ComputerUtilMana { continue; } - if (!sa.allowsPayingWithShard(m.getSourceCard(), c)) { + if (!sa.allowsPayingWithShard(sourceCard, c)) { continue; } @@ -1020,7 +1020,7 @@ public class ComputerUtilMana { return false; } - if (!sa.allowsPayingWithShard(m.getSourceCard(), MagicColor.fromName(m.getOrigProduced()))) { + if (!sa.allowsPayingWithShard(sourceCard, MagicColor.fromName(m.getOrigProduced()))) { return false; } diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index dc99fc7c8ba..ccd1fe5afac 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -411,7 +411,7 @@ public class CostAdjustment { minMana = Integer.valueOf(staticAbility.getParam("MinMana")); } - final int maxReduction = Math.max(0, manaCost.getConvertedManaCost() - minMana - sumReduced); + final int maxReduction = manaCost.getConvertedManaCost() - minMana - sumReduced; if (maxReduction > 0) { return Math.min(value, maxReduction); }