- Two improvements for the AI of AF Pump Curse:

- The AI will recognize duplicate HIDDEN keywords.
 - The AI will no longer give "HIDDEN CARDNAME attacks each turn if able." during his own turn.
This commit is contained in:
Sloth
2011-11-05 09:09:40 +00:00
parent fb0daf391c
commit 8981073cd3
3 changed files with 8 additions and 2 deletions

View File

@@ -6070,7 +6070,11 @@ public class Card extends GameEntity implements Comparable<Card> {
* @return a boolean.
*/
public final boolean hasKeyword(final String keyword) {
return getKeyword().contains(keyword);
String kw = new String(keyword);
if (kw.startsWith("HIDDEN")) {
kw = kw.substring(7);
}
return getKeyword().contains(kw);
}
/**

View File

@@ -360,6 +360,9 @@ public class AbilityFactoryPump {
if (!this.containsCombatRelevantKeyword(this.keywords)
&& AllZone.getPhase().isBefore(Constant.Phase.MAIN2)) {
list.clear(); // this keyword is not combat relevenat
} else if (this.keywords.get(0).equals("HIDDEN CARDNAME attacks each turn if able.")
&& AllZone.getPhase().isPlayerTurn(AllZone.getComputerPlayer())) {
list.clear();
}
list = list.filter(new CardListFilter() {