From 293f63741879deba24e86c66b16cb683e89ab27d Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 18:42:48 +0000 Subject: [PATCH] -add snow landwalk keywords (Snow swampwalk, Snow forestwalk, Snow plainswalk, Snow mountainwalk, Snow islandwalk, and Snow landwalk) -added Legions of Lim-Dul (from Ice Age) as an example --- .gitattributes | 1 + res/cardsfolder/legions_of_lim_dul.txt | 10 +++++ src/forge/CombatUtil.java | 54 ++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 res/cardsfolder/legions_of_lim_dul.txt diff --git a/.gitattributes b/.gitattributes index 06667136816..334e67ad20a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3435,6 +3435,7 @@ res/cardsfolder/leatherback_baloth.txt -text svneol=native#text/plain res/cardsfolder/leeches.txt -text svneol=native#text/plain res/cardsfolder/legacy_weapon.txt -text svneol=native#text/plain res/cardsfolder/legacys_allure.txt -text svneol=native#text/plain +res/cardsfolder/legions_of_lim_dul.txt -text svneol=native#text/plain res/cardsfolder/leonin_abunas.txt -text svneol=native#text/plain res/cardsfolder/leonin_armorguard.txt -text svneol=native#text/plain res/cardsfolder/leonin_battlemage.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/legions_of_lim_dul.txt b/res/cardsfolder/legions_of_lim_dul.txt new file mode 100644 index 00000000000..4c4183087ef --- /dev/null +++ b/res/cardsfolder/legions_of_lim_dul.txt @@ -0,0 +1,10 @@ +Name:Legions of Lim-Dul +ManaCost:1 B B +Types:Creature Zombie +Text:no text +PT:2/3 +K:Snow swampwalk +SVar:RemAIDeck:True +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/legions_of_lim_dul.jpg +End \ No newline at end of file diff --git a/src/forge/CombatUtil.java b/src/forge/CombatUtil.java index ba1e74fc7c9..75833b07229 100644 --- a/src/forge/CombatUtil.java +++ b/src/forge/CombatUtil.java @@ -131,6 +131,60 @@ public class CombatUtil { if(!temp.isEmpty()) return false; } + if(attacker.getKeyword().contains("Snow swampwalk")) { + temp = blkCL.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isType("Swamp") && c.isSnow(); + } + }); + if(!temp.isEmpty()) return false; + } + + if(attacker.getKeyword().contains("Snow forestwalk")) { + temp = blkCL.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isType("Forest") && c.isSnow(); + } + }); + if(!temp.isEmpty()) return false; + } + + if(attacker.getKeyword().contains("Snow islandwalk")) { + temp = blkCL.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isType("Island") && c.isSnow(); + } + }); + if(!temp.isEmpty()) return false; + } + + if(attacker.getKeyword().contains("Snow plainswalk")) { + temp = blkCL.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isType("Plains") && c.isSnow(); + } + }); + if(!temp.isEmpty()) return false; + } + + if(attacker.getKeyword().contains("Snow mountainwalk")) { + temp = blkCL.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isType("Mountain") && c.isSnow(); + } + }); + if(!temp.isEmpty()) return false; + } + + if(attacker.getKeyword().contains("Snow landwalk")) { + temp = blkCL.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isLand() && c.isSnow(); + } + }); + if(!temp.isEmpty()) return false; + } + if(attacker.getKeyword().contains("Desertwalk")) { temp = blkCL.filter(new CardListFilter() { public boolean addCard(Card c) {