From 9a90fa9ce3a19269cbef834f07008f3550bb8346 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 02:47:50 +0000 Subject: [PATCH] Fixed Goblin War Paint manacost, fixed Archon of Justice AI issue. --- res/cards.txt | 2 +- src/forge/CardFactory_Creatures.java | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/res/cards.txt b/res/cards.txt index e882c0477e9..ea55bc3b0ab 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -811,7 +811,7 @@ Enchanted creature gets +2/+2. Enchant creature Goblin War Paint -2 R +1 R Enchantment Aura Enchanted creature gets +2/+2 and has haste. Enchant creature diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 0b4586be1ed..6dcf11af95f 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -11407,13 +11407,21 @@ public class CardFactory_Creatures { { //if computer controlled Archon of Justice have it select the best creature, or enchantment, or artifact, whatever the human controllers, and as a last option a card it controls + Card temp; + CardList human_list = new CardList(AllZone.Human_Play.getCards()); - ability.setTargetCard(CardFactoryUtil.AI_getBestCreature(human_list)); + temp = CardFactoryUtil.AI_getBestCreature(human_list); + if (temp != null) + ability.setTargetCard(CardFactoryUtil.AI_getBestCreature(human_list)); if(ability.getTargetCard() == null){ - ability.setTargetCard(CardFactoryUtil.AI_getBestEnchantment(human_list, card, true)); + temp = CardFactoryUtil.AI_getBestEnchantment(human_list, card ,false); + if (temp != null) + ability.setTargetCard(CardFactoryUtil.AI_getBestEnchantment(human_list, card, true)); } if(ability.getTargetCard() == null){ - ability.setTargetCard(CardFactoryUtil.AI_getBestArtifact(human_list)); + temp = CardFactoryUtil.AI_getBestArtifact(human_list); + if (temp != null) + ability.setTargetCard(CardFactoryUtil.AI_getBestArtifact(human_list)); } if(ability.getTargetCard() == null){ if(human_list.size() == 0){