mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38: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.Game;
|
||||||
import forge.game.GameObject;
|
import forge.game.GameObject;
|
||||||
import forge.game.card.CardUtil;
|
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.spellability.TargetRestrictions;
|
import forge.game.spellability.TargetRestrictions;
|
||||||
@@ -21,16 +20,8 @@ public class PossibleTargetSelector {
|
|||||||
this.tgt = sa.getTargetRestrictions();
|
this.tgt = sa.getTargetRestrictions();
|
||||||
this.targetIndex = 0;
|
this.targetIndex = 0;
|
||||||
this.validTargets = new ArrayList<GameObject>();
|
this.validTargets = new ArrayList<GameObject>();
|
||||||
if (tgt.canTgtPermanent() || tgt.canTgtCreature()) {
|
for (GameObject o : tgt.getAllCandidates(sa, true)) {
|
||||||
// TODO: What about things that target enchantments and such?
|
validTargets.add(o);
|
||||||
validTargets.addAll(CardUtil.getValidCardsToTarget(tgt, sa));
|
|
||||||
}
|
|
||||||
if (tgt.canTgtPlayer()) {
|
|
||||||
for (Player p : game.getPlayers()) {
|
|
||||||
if (p != self || !tgt.canOnlyTgtOpponent()) {
|
|
||||||
validTargets.add(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user