- The AI can now use Gruul Charm.

This commit is contained in:
Sloth
2013-03-02 19:24:14 +00:00
parent 04efd63554
commit c79b3d0cd2
3 changed files with 9 additions and 2 deletions

View File

@@ -77,6 +77,13 @@ public class ControlGainAi extends SpellAbilityAi {
// if Defined, then don't worry about targeting
if (tgt == null) {
if (sa.hasParam("AllValid")) {
List<Card> tgtCards = ai.getOpponent().getCardsIn(ZoneType.Battlefield);
tgtCards = AbilityUtils.filterListByType(tgtCards, sa.getParam("AllValid"), sa);
if (tgtCards.isEmpty()) {
return false;
}
}
return true;
} else {
tgt.resetTargets();

View File

@@ -91,7 +91,7 @@ public class DamageAllAi extends SpellAbilityAi {
}
int minGain = 200; // The minimum gain in destroyed creatures
if (sa.getPayCosts().isReusuableResource()) {
if (sa.getPayCosts() != null && sa.getPayCosts().isReusuableResource()) {
minGain = 100;
}