- Minor update to FightAI

This commit is contained in:
excessum
2014-04-15 13:44:10 +00:00
parent 3f0e238919
commit ec9331ceb8

View File

@@ -242,13 +242,6 @@ public class PumpAi extends PumpAiBase {
int buffedAtk = attack, buffedDef = defense;
for (Card humanCreature : humCreatures) {
for (Card aiCreature : aiCreatures) {
if (sa.getParam("AILogic").equals("PowerDmg")) {
if (FightAi.canKill(aiCreature, humanCreature, attack)) {
sa.getTargets().add(aiCreature);
tgtFight.getTargets().add(humanCreature);
return true;
}
} else {
if (sa.isSpell()) { //heroic triggers adding counters
for (Trigger t : aiCreature.getTriggers()) {
if (t.getMode() == TriggerType.SpellCast) {
@@ -265,6 +258,13 @@ public class PumpAi extends PumpAiBase {
}
}
}
if (sa.getParam("AILogic").equals("PowerDmg")) {
if (FightAi.canKill(aiCreature, humanCreature, buffedAtk)) {
sa.getTargets().add(aiCreature);
tgtFight.getTargets().add(humanCreature);
return true;
}
} else {
if (FightAi.shouldFight(aiCreature, humanCreature, buffedAtk, buffedDef)) {
sa.getTargets().add(aiCreature);
tgtFight.getTargets().add(humanCreature);