ComputerUtil: extend isNegativeCounter with more counters and Special cases

add isUselessCounter for Counters with no effect
This commit is contained in:
Hanmac
2016-11-26 11:23:47 +00:00
parent 1e7d900ba0
commit fdcf7be18a

View File

@@ -2177,11 +2177,27 @@ public class ComputerUtil {
} }
public static boolean isNegativeCounter(CounterType type, Card c) { public static boolean isNegativeCounter(CounterType type, Card c) {
return type == CounterType.AGE || type == CounterType.BLAZE || type == CounterType.BRIBERY || type == CounterType.DOOM return type == CounterType.AGE || type == CounterType.BRIBERY || type == CounterType.DOOM
|| type == CounterType.ICE || type == CounterType.M1M1 || type == CounterType.M0M2 || type == CounterType.M0M1 || type == CounterType.M1M1 || type == CounterType.M0M2 || type == CounterType.M0M1
|| type == CounterType.M1M0 || type == CounterType.M2M1 || type == CounterType.M2M2 || type == CounterType.MUSIC || type == CounterType.M1M0 || type == CounterType.M2M1 || type == CounterType.M2M2
// Blaze only hurts Lands
|| (type == CounterType.BLAZE && c.isLand())
// Iceberg does use Ice as Storage
|| (type == CounterType.ICE && !"Iceberg".equals(c.getName()))
// some lands does use Depletion as Storage Counter
|| (type == CounterType.DEPLETION && c.hasKeyword("CARDNAME doesn't untap during your untap step."))
// treat Time Counters on suspended Cards as Bad,
// and also on Chronozoa
|| (type == CounterType.TIME && (!c.isInPlay() || "Chronozoa".equals(c.getName())))
|| type == CounterType.GOLD || type == CounterType.MUSIC || type == CounterType.PUPA
|| type == CounterType.PARALYZATION || type == CounterType.SHELL || type == CounterType.SLEEP || type == CounterType.PARALYZATION || type == CounterType.SHELL || type == CounterType.SLEEP
|| type == CounterType.SLEIGHT || (type == CounterType.TIME && !c.isInPlay()) || type == CounterType.WAGE; || type == CounterType.SLEIGHT || type == CounterType.WAGE;
}
// this countertypes has no effect
public static boolean isUselessCounter(CounterType type) {
return type == CounterType.AWAKENING || type == CounterType.MANIFESTATION || type == CounterType.PETRIFICATION
|| type == CounterType.TRAINING;
} }
public static Player evaluateBoardPosition(final List<Player> listToEvaluate) { public static Player evaluateBoardPosition(final List<Player> listToEvaluate) {