diff --git a/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java b/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java index bbaf4c7396..105c9cbeed 100644 --- a/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java +++ b/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java @@ -45,6 +45,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator { boolean buyback = false; boolean cascade = false; boolean cantBe = false; + boolean cantUntap = false; boolean copy = false; boolean costLessEach = false; boolean createToken = false; @@ -94,6 +95,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator { boolean whenCounterThatSpell = false; boolean xCost = false; boolean youControlTarget = false; + boolean yourOpponentsControl = false; for (String str : card.getRules()) { String s = str.toLowerCase(); @@ -101,6 +103,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator { anyNumberOfTarget |= s.contains("any number"); buyback |= s.contains("buyback"); cantBe |= s.contains("can't be"); + cantUntap |= s.contains("can't untap"); cascade |= s.contains("cascade"); copy |= s.contains("copy"); costLessEach |= s.contains("cost") || s.contains("less") || s.contains("each"); @@ -151,6 +154,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator { whenCounterThatSpell |= s.contains("when") && s.contains("counter that spell"); wheneverEnters |= s.contains("when") && s.contains("another") && s.contains("enters"); youControlTarget |= s.contains("you control target"); + yourOpponentsControl |= s.contains("your opponents control"); } if (extraTurns) { @@ -165,6 +169,9 @@ public class CardViewEDHPowerLevelComparator implements Comparator { if (annihilator) { thisMaxPower = Math.max(thisMaxPower, 5); } + if (cantUntap) { + thisMaxPower = Math.max(thisMaxPower, 5); + } if (costLessEach) { thisMaxPower = Math.max(thisMaxPower, 5); } @@ -222,6 +229,9 @@ public class CardViewEDHPowerLevelComparator implements Comparator { if (returnFromYourGY) { thisMaxPower = Math.max(thisMaxPower, 4); } + if (sacrifice) { + thisMaxPower = Math.max(thisMaxPower, 4); + } if (skip) { thisMaxPower = Math.max(thisMaxPower, 4); } @@ -243,6 +253,9 @@ public class CardViewEDHPowerLevelComparator implements Comparator { if (youControlTarget) { thisMaxPower = Math.max(thisMaxPower, 4); } + if (yourOpponentsControl) { + thisMaxPower = Math.max(thisMaxPower, 4); + } if (anyNumberOfTarget) { thisMaxPower = Math.max(thisMaxPower, 3); } @@ -285,9 +298,6 @@ public class CardViewEDHPowerLevelComparator implements Comparator { if (sliver) { thisMaxPower = Math.max(thisMaxPower, 2); } - if (sacrifice) { - thisMaxPower = Math.max(thisMaxPower, 2); - } if (untapTarget) { thisMaxPower = Math.max(thisMaxPower, 2); } diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java index 7d1e560f2a..03e3790980 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Commander.java @@ -221,6 +221,7 @@ public class Commander extends Constructed { boolean buyback = false; boolean cascade = false; boolean cantBe = false; + boolean cantUntap = false; boolean copy = false; boolean costLessEach = false; boolean createToken = false; @@ -270,12 +271,14 @@ public class Commander extends Constructed { boolean whenCounterThatSpell = false; boolean xCost = false; boolean youControlTarget = false; + boolean yourOpponentsControl = false; for (String str : card.getRules()) { String s = str.toLowerCase(); annihilator |= s.contains("annihilator"); anyNumberOfTarget |= s.contains("any number"); buyback |= s.contains("buyback"); + cantUntap |= s.contains("can't untap") || s.contains("don't untap"); cantBe |= s.contains("can't be"); cascade |= s.contains("cascade"); copy |= s.contains("copy"); @@ -327,6 +330,7 @@ public class Commander extends Constructed { whenCounterThatSpell |= s.contains("when") && s.contains("counter that spell"); wheneverEnters |= s.contains("when") && s.contains("another") && s.contains("enters"); youControlTarget |= s.contains("you control target"); + yourOpponentsControl |= s.contains("your opponents control"); } for (ManaCost cost : card.getManaCost()) { @@ -354,6 +358,9 @@ public class Commander extends Constructed { if (annihilator) { thisMaxPower = Math.max(thisMaxPower, 5); } + if (cantUntap) { + thisMaxPower = Math.max(thisMaxPower, 5); + } if (costLessEach) { thisMaxPower = Math.max(thisMaxPower, 5); } @@ -411,6 +418,9 @@ public class Commander extends Constructed { if (returnFromYourGY) { thisMaxPower = Math.max(thisMaxPower, 4); } + if (sacrifice) { + thisMaxPower = Math.max(thisMaxPower, 2); + } if (skip) { thisMaxPower = Math.max(thisMaxPower, 4); } @@ -432,6 +442,9 @@ public class Commander extends Constructed { if (youControlTarget) { thisMaxPower = Math.max(thisMaxPower, 4); } + if (yourOpponentsControl) { + thisMaxPower = Math.max(thisMaxPower, 4); + } if (anyNumberOfTarget) { thisMaxPower = Math.max(thisMaxPower, 3); } @@ -474,9 +487,6 @@ public class Commander extends Constructed { if (sliver) { thisMaxPower = Math.max(thisMaxPower, 2); } - if (sacrifice) { - thisMaxPower = Math.max(thisMaxPower, 2); - } if (untapTarget) { thisMaxPower = Math.max(thisMaxPower, 2); }