mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Implemented AI for Temur Sabertooth
This commit is contained in:
@@ -1051,7 +1051,9 @@ public class ComputerUtilCard {
|
||||
}
|
||||
|
||||
//1. save combatant
|
||||
if (ComputerUtilCombat.combatantWouldBeDestroyed(ai, c, combat) && !pumpedWillDie) {
|
||||
if (ComputerUtilCombat.combatantWouldBeDestroyed(ai, c, combat) && !pumpedWillDie
|
||||
&& !c.hasKeyword("Indestructible")) { // hack because attackerWouldBeDestroyed() does not
|
||||
// check for Indestructible when computing lethal damage
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import forge.game.spellability.TargetRestrictions;
|
||||
import forge.game.zone.ZoneType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class ChangeZoneAi extends SpellAbilityAi {
|
||||
@@ -294,6 +295,20 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
source.setSVar("PayX", Integer.toString(xPay));
|
||||
}
|
||||
}
|
||||
|
||||
if (source.getName().equals("Temur Sabertooth")) {
|
||||
// activated bounce + pump
|
||||
if (ComputerUtilCard.shouldPumpCard(ai, sa.getSubAbility(), source, 0, 0, Arrays.asList("Indestructible")) ||
|
||||
ComputerUtilCard.canPumpAgainstRemoval(ai, sa.getSubAbility())) {
|
||||
for (Card c : list) {
|
||||
if (ComputerUtilCard.evaluateCreature(c) < ComputerUtilCard.evaluateCreature(source)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ComputerUtil.playImmediately(ai, sa)) {
|
||||
|
||||
Reference in New Issue
Block a user