mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
spjspj - Final update to edh Power Level.
This commit is contained in:
parent
a5c677f72a
commit
9caaf0d5be
1 changed files with 27 additions and 3 deletions
|
@ -32,7 +32,9 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CanBeYourCommanderAbility;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.keyword.PartnerAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.ExpansionSet;
|
||||
|
@ -262,8 +264,10 @@ public class Commander extends Constructed {
|
|||
boolean twiceAs = false;
|
||||
boolean unblockable = false;
|
||||
boolean undying = false;
|
||||
boolean untapTarget = false;
|
||||
boolean wheneverEnters = false;
|
||||
boolean whenCounterThatSpell = false;
|
||||
boolean xCost = false;
|
||||
boolean youControlTarget = false;
|
||||
|
||||
for (String str : card.getRules()) {
|
||||
|
@ -313,11 +317,25 @@ public class Commander extends Constructed {
|
|||
twiceAs |= s.contains("twice that many") || s.contains("twice as much");
|
||||
unblockable |= s.contains("can't be blocked");
|
||||
undying |= s.contains("undying");
|
||||
untapTarget |= s.contains("untap target");
|
||||
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");
|
||||
}
|
||||
|
||||
for (ManaCost cost : card.getManaCost()) {
|
||||
if (cost.getText().contains("X")) {
|
||||
xCost = true;
|
||||
}
|
||||
}
|
||||
for (Ability a : card.getAbilities()) {
|
||||
for (ManaCost cost : a.getManaCosts()) {
|
||||
if (cost.getText().contains("X")) {
|
||||
xCost = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (extraTurns) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 7);
|
||||
}
|
||||
|
@ -390,6 +408,9 @@ public class Commander extends Constructed {
|
|||
if (wheneverEnters) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||
}
|
||||
if (xCost) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||
}
|
||||
if (youControlTarget) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 4);
|
||||
}
|
||||
|
@ -438,6 +459,9 @@ public class Commander extends Constructed {
|
|||
if (sacrifice) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||
}
|
||||
if (untapTarget) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 2);
|
||||
}
|
||||
if (copy) {
|
||||
thisMaxPower = Math.max(thisMaxPower, 1);
|
||||
}
|
||||
|
@ -662,7 +686,7 @@ public class Commander extends Constructed {
|
|||
}
|
||||
|
||||
edhPowerLevel += numberInfinitePieces * 10;
|
||||
edhPowerLevel = (int) Math.round(edhPowerLevel / 3.5);
|
||||
edhPowerLevel = (int) Math.round(edhPowerLevel / 4.5);
|
||||
if (edhPowerLevel > 100) {
|
||||
edhPowerLevel = 100;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue