From dee67a6a68e127d2e53e840a131229cbd4e983a1 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 03:52:46 +0000 Subject: [PATCH] 1) Added to new pic urls. 2) Improved the AI for eqPumps, will now look for Loxodon Punisher as a target. --- res/card-pictures.txt | 2 ++ src/forge/CardFactoryUtil.java | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 6ef2e56f7af..d647f98a017 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -38,6 +38,8 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg +borderland_ranger.jpg http://www.wizards.com/global/images/magic/general/borderland_ranger.jpg +city_of_brass.jpg http://www.wizards.com/global/images/magic/general/city_of_brass.jpg channel_the_suns.jpg http://www.wizards.com/global/images/magic/general/channel_the_suns.jpg wall_of_tears.jpg http://www.wizards.com/global/images/magic/general/wall_of_tears.jpg goblin_assault.jpg http://www.wizards.com/global/images/magic/general/goblin_assault.jpg diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index 8ba401a1316..077a9f28662 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -1300,7 +1300,7 @@ public class CardFactoryUtil { setTargetCard(target); } - CardList getCreature() { + CardList getCreature() { // build list and do some pruning CardList list = new CardList(AllZone.Computer_Play.getCards()); list = list.filter(new CardListFilter() { public boolean addCard(Card c) { @@ -1311,6 +1311,28 @@ public class CardFactoryUtil { } }); // list.remove(card); // if mana-only cost, allow self-target + + // is there at least 1 Loxodon Punisher to target + + CardList equipMagnetList = list.getName("Loxodon Punisher"); + if (equipMagnetList.size() != 0 && Tough >= -1) { // we want Loxodon Punisher to gain at least +1 toughness + return equipMagnetList; + } + + if (Power == 0 && Tough == 0) { // This aura is keyword only + list = list.filter(new CardListFilter() { + public boolean addCard(Card c){ + ArrayList extKeywords = new ArrayList(Arrays.asList(extrinsicKeywords)); + for (String s:extKeywords) { + if (!c.getKeyword().contains(s)) + return true; // We want to give a new keyword + } + //no new keywords: + return false; + } + }); + } + return list; }//getCreature()