From 85e29e7865c8f4dd5d70984dfbbffdfa48f8f866 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 11:15:00 +0000 Subject: [PATCH] - Added Crawlspace, Silent Arbiter and Caverns of Despair. --- .gitattributes | 3 +++ res/cardsfolder/caverns_of_despair.txt | 8 ++++++++ res/cardsfolder/crawlspace.txt | 7 +++++++ res/cardsfolder/silent_arbiter.txt | 8 ++++++++ src/forge/CombatUtil.java | 18 +++++++++++++++++- 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 res/cardsfolder/caverns_of_despair.txt create mode 100644 res/cardsfolder/crawlspace.txt create mode 100644 res/cardsfolder/silent_arbiter.txt diff --git a/.gitattributes b/.gitattributes index b7866539081..614c4484b86 100644 --- a/.gitattributes +++ b/.gitattributes @@ -739,6 +739,7 @@ res/cardsfolder/cave_sense.txt -text svneol=native#text/plain res/cardsfolder/cavern_crawler.txt -text svneol=native#text/plain res/cardsfolder/cavern_harpy.txt -text svneol=native#text/plain res/cardsfolder/cavern_thoctar.txt -text svneol=native#text/plain +res/cardsfolder/caverns_of_despair.txt -text svneol=native#text/plain res/cardsfolder/caves_of_koilos.txt -text svneol=native#text/plain res/cardsfolder/celestial_colonnade.txt -text svneol=native#text/plain res/cardsfolder/celestial_crusader.txt -text svneol=native#text/plain @@ -946,6 +947,7 @@ res/cardsfolder/craven_knight.txt -text svneol=native#text/plain res/cardsfolder/craw_giant.txt -text svneol=native#text/plain res/cardsfolder/craw_wurm.txt -text svneol=native#text/plain res/cardsfolder/crawling_filth.txt -text svneol=native#text/plain +res/cardsfolder/crawlspace.txt -text svneol=native#text/plain res/cardsfolder/crazed_goblin.txt -text svneol=native#text/plain res/cardsfolder/crazed_skirge.txt -text svneol=native#text/plain res/cardsfolder/creakwood_ghoul.txt -text svneol=native#text/plain @@ -4085,6 +4087,7 @@ res/cardsfolder/sigil_of_the_new_dawn.txt -text svneol=native#text/plain res/cardsfolder/sigiled_behemoth.txt -text svneol=native#text/plain res/cardsfolder/sigiled_paladin.txt -text svneol=native#text/plain res/cardsfolder/sign_in_blood.txt -text svneol=native#text/plain +res/cardsfolder/silent_arbiter.txt -text svneol=native#text/plain res/cardsfolder/silent_attendant.txt -text svneol=native#text/plain res/cardsfolder/silent_chant_zubera.txt -text svneol=native#text/plain res/cardsfolder/silent_specter.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/caverns_of_despair.txt b/res/cardsfolder/caverns_of_despair.txt new file mode 100644 index 00000000000..0ed85058cbf --- /dev/null +++ b/res/cardsfolder/caverns_of_despair.txt @@ -0,0 +1,8 @@ +Name:Caverns of Despair +ManaCost:2 R R +Types:World Enchantment +Text:No more than two creatures can attack each combat. No more than two creatures can block each combat. +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/caverns_of_despair.jpg +End diff --git a/res/cardsfolder/crawlspace.txt b/res/cardsfolder/crawlspace.txt new file mode 100644 index 00000000000..bc807bd474c --- /dev/null +++ b/res/cardsfolder/crawlspace.txt @@ -0,0 +1,7 @@ +Name:Crawlspace +ManaCost:3 +Types:Artifact +Text:No more than two creatures can attack you each combat. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/crawlspace.jpg +End diff --git a/res/cardsfolder/silent_arbiter.txt b/res/cardsfolder/silent_arbiter.txt new file mode 100644 index 00000000000..4d733cb3a6b --- /dev/null +++ b/res/cardsfolder/silent_arbiter.txt @@ -0,0 +1,8 @@ +Name:Silent Arbiter +ManaCost:4 +Types:Artifact Creature Construct +Text:No more than one creature can attack each combat. No more than one creature can block each combat. +PT:1/5 +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/silent_arbiter.jpg +End diff --git a/src/forge/CombatUtil.java b/src/forge/CombatUtil.java index 42015f5475c..599e340cee4 100644 --- a/src/forge/CombatUtil.java +++ b/src/forge/CombatUtil.java @@ -257,6 +257,12 @@ public class CombatUtil { if (blocker.getCounters(Counters.BRIBERY) > 0 && AllZoneUtil.isCardInPlay("Gwafa Hazid, Profiteer")) return false; + + if (AllZone.Combat.getAllBlockers().size() > 1 && AllZoneUtil.isCardInPlay("Caverns of Despair")) + return false; + + if (AllZone.Combat.getAllBlockers().size() > 0 && AllZoneUtil.isCardInPlay("Silent Arbiter")) + return false; CardList kulrath = AllZoneUtil.getCardsInPlay("Kulrath Knight"); if (kulrath.size() > 0) @@ -344,7 +350,8 @@ public class CombatUtil { } if(c.isTapped() || c.hasSickness() || c.getKeyword().contains("Defender") || moatPrevented - || AllZoneUtil.isCardInPlay("Blazing Archon", c.getController().getOpponent()) || c.getKeyword().contains("CARDNAME can't attack.") + || AllZoneUtil.isCardInPlay("Blazing Archon", c.getController().getOpponent()) + || c.getKeyword().contains("CARDNAME can't attack.") || c.getKeyword().contains("CARDNAME can't attack or block.") || (AllZoneUtil.isCardInPlay("Reverence", c.getController().getOpponent()) && c.getNetAttack() < 3)) return false; @@ -352,6 +359,15 @@ public class CombatUtil { if (c.getCounters(Counters.BRIBERY) > 0 && AllZoneUtil.isCardInPlay("Gwafa Hazid, Profiteer")) return false; + if (AllZone.Combat.getAttackers().length > 1 && AllZoneUtil.isCardInPlay("Crawlspace",c.getController().getOpponent())) + return false; + + if (AllZone.Combat.getAttackers().length > 1 && AllZoneUtil.isCardInPlay("Caverns of Despair")) + return false; + + if (AllZone.Combat.getAttackers().length > 0 && AllZoneUtil.isCardInPlay("Silent Arbiter")) + return false; + if (AllZoneUtil.isCardInPlay("Ensnaring Bridge")) { int limit = Integer.MAX_VALUE; CardList Human = new CardList();