- Added a more conservative version of AILogic PayEnergy for PutCounter AI that only pays energy if the creature is in combat (attacking/blocking) or if there's more energy available than the most expensive energy cost of a permanent SA on the battlefield requires plus whatever the PutCounter SA requires.

- Set this logic for Longtusk Cub and Bristling Hydra.
- TODO: maybe somehow teach the AI to pay energy if it can save the creature from lethal damage from a spell?
This commit is contained in:
Agetian
2017-06-16 10:30:13 +00:00
parent 146e21c8df
commit d4c4afcf0b
5 changed files with 49 additions and 3 deletions

View File

@@ -494,6 +494,15 @@ public class Cost {
return null;
}
public final CostPayEnergy getCostEnergy() {
for (final CostPart part : this.costParts) {
if (part instanceof CostPayEnergy) {
return (CostPayEnergy) part;
}
}
return null;
}
/**
* <p>
* refundPaidCost.