mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Reorganized PayEnergyConservatively as an if-else chain.
This commit is contained in:
@@ -225,15 +225,13 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
if (playAggro) {
|
if (playAggro) {
|
||||||
// aggro profiles ignore conservative play for this AI logic
|
// aggro profiles ignore conservative play for this AI logic
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (ai.getCounters(CounterType.ENERGY) > ComputerUtilCard.getMaxSAEnergyCostOnBattlefield(ai) + sa.getPayCosts().getCostEnergy().convertAmount()) {
|
||||||
if (ai.getGame().getCombat() != null && sa.getHostCard() != null) {
|
return true;
|
||||||
|
} else if (ai.getGame().getCombat() != null && sa.getHostCard() != null) {
|
||||||
if (ai.getGame().getCombat().isAttacking(sa.getHostCard())) {
|
if (ai.getGame().getCombat().isAttacking(sa.getHostCard())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ai.getCounters(CounterType.ENERGY) > ComputerUtilCard.getMaxSAEnergyCostOnBattlefield(ai) + sa.getPayCosts().getCostEnergy().convertAmount()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sa.getConditions() != null && !sa.getConditions().areMet(sa) && sa.getSubAbility() == null) {
|
if (sa.getConditions() != null && !sa.getConditions().areMet(sa) && sa.getSubAbility() == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user