- Allow Sarkhan the Mad AI to use the 0 ability as a source of card advantage when Sarkhan is low on loyalty.

This commit is contained in:
Agetian
2017-06-24 14:06:26 +00:00
parent adefa11d3a
commit 174444e3b5
4 changed files with 13 additions and 4 deletions

View File

@@ -37,6 +37,10 @@ public class DamageDealAi extends DamageAiBase {
Card source = sa.getHostCard();
if ("MadSarkhanDigDmg".equals(logic)) {
return source.getCounters(CounterType.LOYALTY) == 1;
}
if (damage.equals("X") && sa.getSVar(damage).equals("Count$ChosenNumber")) {
int energy = ai.getCounters(CounterType.ENERGY);
for (SpellAbility s : source.getSpellAbilities()) {

View File

@@ -75,7 +75,7 @@ public class DestroyAi extends SpellAbilityAi {
sa.setTargetingPlayer(targetingPlayer);
return targetingPlayer.getController().chooseTargetsFor(sa);
}
if ("SarkhanDragon".equals(logic)) {
if ("MadSarkhanDragon".equals(logic)) {
// TODO: expand this logic to make the AI force the opponent to sacrifice a big threat bigger than a 5/5 flier?
CardCollection creatures = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.CREATURES);
boolean hasValidTgt = !CardLists.filter(creatures, new Predicate<Card>() {

View File

@@ -8,6 +8,7 @@ import forge.ai.SpellAbilityAi;
import forge.game.Game;
import forge.game.ability.AbilityUtils;
import forge.game.card.Card;
import forge.game.card.CounterType;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.player.PlayerActionConfirmMode;
@@ -92,6 +93,10 @@ public class DigAi extends SpellAbilityAi {
return false;
}
if ("MadSarkhanDigDmg".equals(sa.getParam("AILogic"))) {
return host.getCounters(CounterType.LOYALTY) == 1;
}
return !ComputerUtil.preventRunAwayActivations(sa);
}