From 99c2ef50bccdc5b7edaf419f102481cde1fae010 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 07:17:49 +0000 Subject: [PATCH] Added Harbor Serpent. --- .gitattributes | 1 + res/cardsfolder/harbor_serpent.txt | 9 +++++++++ src/forge/CombatUtil.java | 10 +++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 res/cardsfolder/harbor_serpent.txt diff --git a/.gitattributes b/.gitattributes index cadcd80c0d4..eb35c97a77d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1566,6 +1566,7 @@ res/cardsfolder/hanna_ships_navigator.txt -text svneol=native#text/plain res/cardsfolder/hannas_custody.txt -text svneol=native#text/plain res/cardsfolder/harabaz_druid.txt -text svneol=native#text/plain res/cardsfolder/harbor_guardian.txt -text svneol=native#text/plain +res/cardsfolder/harbor_serpent.txt -text svneol=native#text/plain res/cardsfolder/harmattan_efreet.txt -text svneol=native#text/plain res/cardsfolder/harmonic_convergence.txt -text svneol=native#text/plain res/cardsfolder/harmonize.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/harbor_serpent.txt b/res/cardsfolder/harbor_serpent.txt new file mode 100644 index 00000000000..75f382bb754 --- /dev/null +++ b/res/cardsfolder/harbor_serpent.txt @@ -0,0 +1,9 @@ +Name:Harbor Serpent +ManaCost:4 U U +Types:Creature Serpent +Text:Harbor Serpent can't attack unless there are five or more Islands on the battlefield. +PT:5/5 +K:Islandwalk +K:SVar:Rarity:Common +K:SVar:Picture:http://www.wizards.com/global/images/magic/general/harbor_serpent.jpg +End diff --git a/src/forge/CombatUtil.java b/src/forge/CombatUtil.java index 4fad187045c..5029e378f32 100644 --- a/src/forge/CombatUtil.java +++ b/src/forge/CombatUtil.java @@ -324,6 +324,14 @@ public class CombatUtil { temp = list.getType("Island"); if(temp.isEmpty()) return false; } + + if(c.getName().equals("Harbor Serpent")) { + CardList allislands = new CardList(); + allislands.addAll(AllZone.getZone(Constant.Zone.Play, Constant.Player.Human).getCards()); + allislands.addAll(AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer).getCards()); + allislands = allislands.getType("Island"); + if(allislands.size() < 5) return false; + } if(c.isTapped() || c.hasSickness() || c.getKeyword().contains("Defender") || moatPrevented || oppControlsBlazingArchon(c) || c.getKeyword().contains("CARDNAME can't attack.") @@ -336,7 +344,7 @@ public class CombatUtil { { CardList all = new CardList(); all.addAll(AllZone.getZone(Constant.Zone.Play, Constant.Player.Human).getCards()); - all.addAll(AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer). getCards()); + all.addAll(AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer).getCards()); all = all.getName("Kulrath Knight"); for (int i=0; i