mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Simplify a target num check in AiController.
This commit is contained in:
@@ -662,8 +662,7 @@ public class AiController {
|
|||||||
if (sa instanceof SpellPermanent) {
|
if (sa instanceof SpellPermanent) {
|
||||||
return canPlayFromEffectAI((SpellPermanent)sa, false, true);
|
return canPlayFromEffectAI((SpellPermanent)sa, false, true);
|
||||||
}
|
}
|
||||||
if (sa.usesTargeting()
|
if (sa.usesTargeting() && !sa.isTargetNumberValid()) {
|
||||||
&& sa.getTargets().getNumTargeted() < sa.getTargetRestrictions().getMinTargets(sa.getHostCard(), sa)) {
|
|
||||||
if (!sa.getTargetRestrictions().hasCandidates(sa, true)) {
|
if (!sa.getTargetRestrictions().hasCandidates(sa, true)) {
|
||||||
return AiPlayDecision.TargetingFailed;
|
return AiPlayDecision.TargetingFailed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user