mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix Simulation AI not being able to target some permanent types.
This commit is contained in:
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
|
||||
import forge.game.Game;
|
||||
import forge.game.GameObject;
|
||||
import forge.game.card.CardUtil;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.TargetRestrictions;
|
||||
@@ -21,16 +20,8 @@ public class PossibleTargetSelector {
|
||||
this.tgt = sa.getTargetRestrictions();
|
||||
this.targetIndex = 0;
|
||||
this.validTargets = new ArrayList<GameObject>();
|
||||
if (tgt.canTgtPermanent() || tgt.canTgtCreature()) {
|
||||
// TODO: What about things that target enchantments and such?
|
||||
validTargets.addAll(CardUtil.getValidCardsToTarget(tgt, sa));
|
||||
}
|
||||
if (tgt.canTgtPlayer()) {
|
||||
for (Player p : game.getPlayers()) {
|
||||
if (p != self || !tgt.canOnlyTgtOpponent()) {
|
||||
validTargets.add(p);
|
||||
}
|
||||
}
|
||||
for (GameObject o : tgt.getAllCandidates(sa, true)) {
|
||||
validTargets.add(o);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user