mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- AiController: a more robust check for potential targets in order to avoid the AI activating an ability it can't legally target due to restrictions (e.g. Wicked Akuba).
This commit is contained in:
@@ -662,6 +662,11 @@ public class AiController {
|
||||
if (sa instanceof SpellPermanent) {
|
||||
return canPlayFromEffectAI((SpellPermanent)sa, false, true);
|
||||
}
|
||||
if (sa.usesTargeting()) {
|
||||
if (!sa.getTargetRestrictions().hasCandidates(sa, true)) {
|
||||
return AiPlayDecision.TargetingFailed;
|
||||
}
|
||||
}
|
||||
if (sa instanceof Spell) {
|
||||
if (ComputerUtil.getDamageForPlaying(player, sa) >= player.getLife()
|
||||
&& !player.cantLoseForZeroOrLessLife() && player.canLoseLife()) {
|
||||
|
||||
Reference in New Issue
Block a user