mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Minor update to FightAI
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user