Improved the AI for enPumpCurse.

This commit is contained in:
jendave
2011-08-06 03:51:29 +00:00
parent b8259ccfb5
commit b18e6b31f3

View File

@@ -1567,11 +1567,31 @@ public class CardFactoryUtil {
if (list.isEmpty()) return false; if (list.isEmpty()) return false;
//else we may need to filter the list and remove inappropriate targets
// If extrinsicKeywords contains "This creature can't attack" or "This creature can't attack or block" // If extrinsicKeywords contains "This creature can't attack" or "This creature can't attack or block"
// then remove creatures with Defender from the list // then remove creatures with Defender from the list
final ArrayList<String> extKeywords = new ArrayList<String>(Arrays.asList(extrinsicKeywords));
if (extKeywords.contains("This creature can't attack") || extKeywords.contains("This creature can't attack or block")) {
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature() && !c.getKeyword().contains("Defender");
}
});
}
// If extrinsicKeywords contains "This card doesn't untap during your untap step." // If extrinsicKeywords contains "This card doesn't untap during your untap step."
// then remove creatures with Vigilence from the list // then remove creatures with Vigilance from the list
if (extKeywords.contains("This card doesn't untap during your untap step.")) {
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature() && !c.getKeyword().contains("Vigilance");
}
});
}
//else (if aura is keyword only) //else (if aura is keyword only)