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