- Added AI support for Barrage of Boulders.

This commit is contained in:
Sloth
2014-09-21 20:44:08 +00:00
parent b1c07c8f7a
commit 59949eea96
4 changed files with 8 additions and 4 deletions

View File

@@ -85,7 +85,14 @@ public class DamageAllAi extends SpellAbilityAi {
int minGain = 200; // The minimum gain in destroyed creatures
if (sa.getPayCosts() != null && sa.getPayCosts().isReusuableResource()) {
minGain = 100;
if (computerList.isEmpty()) {
minGain = 10; // nothing to lose
} else {
minGain = 100; // safety for errors in evaluate creature
}
} else if (sa.getSubAbility() != null && ai.getGame().getPhaseHandler().isPreCombatMain() && computerList.isEmpty()
&& opp.getCreaturesInPlay().size() > 1 && !ai.getCreaturesInPlay().isEmpty()) {
minGain = 126; // prepare for attack
}
// evaluate both lists and pass only if human creatures are more valuable