mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- More cleanup.
This commit is contained in:
@@ -935,6 +935,30 @@ public class SpecialCardAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Phyrexian Dreadnought
|
||||||
|
public static class PhyrexianDreadnought {
|
||||||
|
public static CardCollection reviseCreatureSacList(final Player ai, final SpellAbility sa, final CardCollection choices) {
|
||||||
|
choices.sort(Collections.reverseOrder(ComputerUtilCard.EvaluateCreatureComparator));
|
||||||
|
int power = 0;
|
||||||
|
List<Card> toKeep = Lists.newArrayList();
|
||||||
|
for (Card c : choices) {
|
||||||
|
if (c.getName().equals(ComputerUtilAbility.getAbilitySourceName(sa))) {
|
||||||
|
continue; // not worth it sac'ing another Dreadnaught
|
||||||
|
}
|
||||||
|
if (c.getNetPower() < 1) {
|
||||||
|
continue; // contributes nothing to Dreadnought requirements
|
||||||
|
}
|
||||||
|
if (power >= 12) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
toKeep.add(c);
|
||||||
|
power += c.getNetPower();
|
||||||
|
}
|
||||||
|
|
||||||
|
return new CardCollection(toKeep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Price of Progress
|
// Price of Progress
|
||||||
public static class PriceOfProgress {
|
public static class PriceOfProgress {
|
||||||
public static boolean consider(final Player ai, final SpellAbility sa) {
|
public static boolean consider(final Player ai, final SpellAbility sa) {
|
||||||
@@ -993,30 +1017,6 @@ public class SpecialCardAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Phyrexian Dreadnought
|
|
||||||
public static class PhyrexianDreadnought {
|
|
||||||
public static CardCollection reviseCreatureSacList(final Player ai, final SpellAbility sa, final CardCollection choices) {
|
|
||||||
choices.sort(Collections.reverseOrder(ComputerUtilCard.EvaluateCreatureComparator));
|
|
||||||
int power = 0;
|
|
||||||
List<Card> toKeep = Lists.newArrayList();
|
|
||||||
for (Card c : choices) {
|
|
||||||
if (c.getName().equals(ComputerUtilAbility.getAbilitySourceName(sa))) {
|
|
||||||
continue; // not worth it sac'ing another Dreadnaught
|
|
||||||
}
|
|
||||||
if (c.getNetPower() < 1) {
|
|
||||||
continue; // contributes nothing to Dreadnought requirements
|
|
||||||
}
|
|
||||||
if (power >= 12) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
toKeep.add(c);
|
|
||||||
power += c.getNetPower();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new CardCollection(toKeep);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sarkhan the Mad
|
// Sarkhan the Mad
|
||||||
public static class SarkhanTheMad {
|
public static class SarkhanTheMad {
|
||||||
public static boolean considerDig(final Player ai, final SpellAbility sa) {
|
public static boolean considerDig(final Player ai, final SpellAbility sa) {
|
||||||
|
|||||||
Reference in New Issue
Block a user