mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Minor update to EffectAI to prevent negative "fight" logic from falling through to the random return in canPlayAI(). Prevent Polukranos activation from targeting shielded or creatures that can regenerate.
This commit is contained in:
@@ -260,7 +260,8 @@ public class DamageDealAi extends DamageAiBase {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final int assignedDamage = ComputerUtilCombat.getEnoughDamageToKill(humanCreature, dmg, source, false, noPrevention);
|
final int assignedDamage = ComputerUtilCombat.getEnoughDamageToKill(humanCreature, dmg, source, false, noPrevention);
|
||||||
if (assignedDamage <= dmg) {
|
if (assignedDamage <= dmg
|
||||||
|
&& humanCreature.getShield().isEmpty() && !ComputerUtil.canRegenerate(humanCreature.getController(), humanCreature)) {
|
||||||
tcs.add(humanCreature);
|
tcs.add(humanCreature);
|
||||||
tgt.addDividedAllocation(humanCreature, assignedDamage);
|
tgt.addDividedAllocation(humanCreature, assignedDamage);
|
||||||
lastTgt = humanCreature;
|
lastTgt = humanCreature;
|
||||||
|
|||||||
@@ -166,6 +166,8 @@ public class EffectAi extends SpellAbilityAi {
|
|||||||
tgtFight.getTargets().add(aiCreature);
|
tgtFight.getTargets().add(aiCreature);
|
||||||
sa.getTargets().add(humanCreature);
|
sa.getTargets().add(humanCreature);
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user