mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
EDH Power updates
This commit is contained in:
parent
71fad444c1
commit
3cb7424dfd
2 changed files with 26 additions and 6 deletions
|
@ -45,6 +45,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
boolean buyback = false;
|
boolean buyback = false;
|
||||||
boolean cascade = false;
|
boolean cascade = false;
|
||||||
boolean cantBe = false;
|
boolean cantBe = false;
|
||||||
|
boolean cantUntap = false;
|
||||||
boolean copy = false;
|
boolean copy = false;
|
||||||
boolean costLessEach = false;
|
boolean costLessEach = false;
|
||||||
boolean createToken = false;
|
boolean createToken = false;
|
||||||
|
@ -94,6 +95,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
boolean whenCounterThatSpell = false;
|
boolean whenCounterThatSpell = false;
|
||||||
boolean xCost = false;
|
boolean xCost = false;
|
||||||
boolean youControlTarget = false;
|
boolean youControlTarget = false;
|
||||||
|
boolean yourOpponentsControl = false;
|
||||||
|
|
||||||
for (String str : card.getRules()) {
|
for (String str : card.getRules()) {
|
||||||
String s = str.toLowerCase();
|
String s = str.toLowerCase();
|
||||||
|
@ -101,6 +103,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
anyNumberOfTarget |= s.contains("any number");
|
anyNumberOfTarget |= s.contains("any number");
|
||||||
buyback |= s.contains("buyback");
|
buyback |= s.contains("buyback");
|
||||||
cantBe |= s.contains("can't be");
|
cantBe |= s.contains("can't be");
|
||||||
|
cantUntap |= s.contains("can't untap");
|
||||||
cascade |= s.contains("cascade");
|
cascade |= s.contains("cascade");
|
||||||
copy |= s.contains("copy");
|
copy |= s.contains("copy");
|
||||||
costLessEach |= s.contains("cost") || s.contains("less") || s.contains("each");
|
costLessEach |= s.contains("cost") || s.contains("less") || s.contains("each");
|
||||||
|
@ -151,6 +154,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
whenCounterThatSpell |= s.contains("when") && s.contains("counter that spell");
|
whenCounterThatSpell |= s.contains("when") && s.contains("counter that spell");
|
||||||
wheneverEnters |= s.contains("when") && s.contains("another") && s.contains("enters");
|
wheneverEnters |= s.contains("when") && s.contains("another") && s.contains("enters");
|
||||||
youControlTarget |= s.contains("you control target");
|
youControlTarget |= s.contains("you control target");
|
||||||
|
yourOpponentsControl |= s.contains("your opponents control");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extraTurns) {
|
if (extraTurns) {
|
||||||
|
@ -165,6 +169,9 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
if (annihilator) {
|
if (annihilator) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 5);
|
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||||
}
|
}
|
||||||
|
if (cantUntap) {
|
||||||
|
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||||
|
}
|
||||||
if (costLessEach) {
|
if (costLessEach) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 5);
|
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||||
}
|
}
|
||||||
|
@ -222,6 +229,9 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
if (returnFromYourGY) {
|
if (returnFromYourGY) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
}
|
}
|
||||||
|
if (sacrifice) {
|
||||||
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
|
}
|
||||||
if (skip) {
|
if (skip) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
}
|
}
|
||||||
|
@ -243,6 +253,9 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
if (youControlTarget) {
|
if (youControlTarget) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
}
|
}
|
||||||
|
if (yourOpponentsControl) {
|
||||||
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
|
}
|
||||||
if (anyNumberOfTarget) {
|
if (anyNumberOfTarget) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 3);
|
thisMaxPower = Math.max(thisMaxPower, 3);
|
||||||
}
|
}
|
||||||
|
@ -285,9 +298,6 @@ public class CardViewEDHPowerLevelComparator implements Comparator<CardView> {
|
||||||
if (sliver) {
|
if (sliver) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||||
}
|
}
|
||||||
if (sacrifice) {
|
|
||||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
|
||||||
}
|
|
||||||
if (untapTarget) {
|
if (untapTarget) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,7 @@ public class Commander extends Constructed {
|
||||||
boolean buyback = false;
|
boolean buyback = false;
|
||||||
boolean cascade = false;
|
boolean cascade = false;
|
||||||
boolean cantBe = false;
|
boolean cantBe = false;
|
||||||
|
boolean cantUntap = false;
|
||||||
boolean copy = false;
|
boolean copy = false;
|
||||||
boolean costLessEach = false;
|
boolean costLessEach = false;
|
||||||
boolean createToken = false;
|
boolean createToken = false;
|
||||||
|
@ -270,12 +271,14 @@ public class Commander extends Constructed {
|
||||||
boolean whenCounterThatSpell = false;
|
boolean whenCounterThatSpell = false;
|
||||||
boolean xCost = false;
|
boolean xCost = false;
|
||||||
boolean youControlTarget = false;
|
boolean youControlTarget = false;
|
||||||
|
boolean yourOpponentsControl = false;
|
||||||
|
|
||||||
for (String str : card.getRules()) {
|
for (String str : card.getRules()) {
|
||||||
String s = str.toLowerCase();
|
String s = str.toLowerCase();
|
||||||
annihilator |= s.contains("annihilator");
|
annihilator |= s.contains("annihilator");
|
||||||
anyNumberOfTarget |= s.contains("any number");
|
anyNumberOfTarget |= s.contains("any number");
|
||||||
buyback |= s.contains("buyback");
|
buyback |= s.contains("buyback");
|
||||||
|
cantUntap |= s.contains("can't untap") || s.contains("don't untap");
|
||||||
cantBe |= s.contains("can't be");
|
cantBe |= s.contains("can't be");
|
||||||
cascade |= s.contains("cascade");
|
cascade |= s.contains("cascade");
|
||||||
copy |= s.contains("copy");
|
copy |= s.contains("copy");
|
||||||
|
@ -327,6 +330,7 @@ public class Commander extends Constructed {
|
||||||
whenCounterThatSpell |= s.contains("when") && s.contains("counter that spell");
|
whenCounterThatSpell |= s.contains("when") && s.contains("counter that spell");
|
||||||
wheneverEnters |= s.contains("when") && s.contains("another") && s.contains("enters");
|
wheneverEnters |= s.contains("when") && s.contains("another") && s.contains("enters");
|
||||||
youControlTarget |= s.contains("you control target");
|
youControlTarget |= s.contains("you control target");
|
||||||
|
yourOpponentsControl |= s.contains("your opponents control");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ManaCost cost : card.getManaCost()) {
|
for (ManaCost cost : card.getManaCost()) {
|
||||||
|
@ -354,6 +358,9 @@ public class Commander extends Constructed {
|
||||||
if (annihilator) {
|
if (annihilator) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 5);
|
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||||
}
|
}
|
||||||
|
if (cantUntap) {
|
||||||
|
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||||
|
}
|
||||||
if (costLessEach) {
|
if (costLessEach) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 5);
|
thisMaxPower = Math.max(thisMaxPower, 5);
|
||||||
}
|
}
|
||||||
|
@ -411,6 +418,9 @@ public class Commander extends Constructed {
|
||||||
if (returnFromYourGY) {
|
if (returnFromYourGY) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
}
|
}
|
||||||
|
if (sacrifice) {
|
||||||
|
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||||
|
}
|
||||||
if (skip) {
|
if (skip) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
}
|
}
|
||||||
|
@ -432,6 +442,9 @@ public class Commander extends Constructed {
|
||||||
if (youControlTarget) {
|
if (youControlTarget) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
}
|
}
|
||||||
|
if (yourOpponentsControl) {
|
||||||
|
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||||
|
}
|
||||||
if (anyNumberOfTarget) {
|
if (anyNumberOfTarget) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 3);
|
thisMaxPower = Math.max(thisMaxPower, 3);
|
||||||
}
|
}
|
||||||
|
@ -474,9 +487,6 @@ public class Commander extends Constructed {
|
||||||
if (sliver) {
|
if (sliver) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||||
}
|
}
|
||||||
if (sacrifice) {
|
|
||||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
|
||||||
}
|
|
||||||
if (untapTarget) {
|
if (untapTarget) {
|
||||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue