mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- 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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user