AI issues of SpDestroyTgt
 Posted: 03 Aug 2010, 12:37
Posted: 03 Aug 2010, 12:37To determine the best targets, the AI uses this entry:
but if the only possible targets have a form like Creature.nonBlack, they don't get considered and the AI won't find a target (Yes that means the AI is currently not able to use Doom Blade and most of all creature removal spells )
 )
I fixed this for spBounceTgt by replacing Tgts[i].equals("Artifact") with Tgts[i].startsWith("Artifact"). I would suggest doing the same here.
			- Code: Select all
- if(choices.size() > 0) {
 for(int i = 0; i < Tgts.length; i++) {
 if(Tgts[i].equals("Artifact")) {
 if(CardFactoryUtil.AI_getBestArtifact(choices) != null) results.add(CardFactoryUtil.AI_getBestArtifact(choices));
 } else if(Tgts[i].equals("Creature")) {
 if(CardFactoryUtil.AI_getBestCreature(choices) != null) results.add(CardFactoryUtil.AI_getBestCreature(choices));
 } else if(Tgts[i].equals("Enchantment")) {
 if(CardFactoryUtil.AI_getBestEnchantment(choices, card, true) != null) results.add(CardFactoryUtil.AI_getBestEnchantment(
 choices, card, true));
 } else if(Tgts[i].equals("Land")) {
 if(CardFactoryUtil.AI_getBestLand(choices) != null) results.add(CardFactoryUtil.AI_getBestLand(choices));
 } else if(Tgts[i].equals("Permanent")) {
 if(CardFactoryUtil.AI_getMostExpensivePermanent(choices, card, true) != null) results.add(CardFactoryUtil.AI_getMostExpensivePermanent(
 choices, card, true));
 }
 }
 }
but if the only possible targets have a form like Creature.nonBlack, they don't get considered and the AI won't find a target (Yes that means the AI is currently not able to use Doom Blade and most of all creature removal spells
 )
 )I fixed this for spBounceTgt by replacing Tgts[i].equals("Artifact") with Tgts[i].startsWith("Artifact"). I would suggest doing the same here.