mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- 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:
@@ -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()) {
|
||||
|
||||
@@ -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>() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user