From a446881fe899e95143fb12b076f9edce8a9314c4 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 05:06:22 +0000 Subject: [PATCH] - Added Thran Quarry. - Added Glimmervoid. Note: Two other cards follow this card structure, Mark of the Oni and Stenchskipper and can be coded up pretty quickly --- res/card-pictures.txt | 2 ++ res/cards.txt | 20 ++++++++++++++++++ res/rare.txt | 2 ++ src/forge/EndOfTurn.java | 2 ++ src/forge/GameActionUtil.java | 38 +++++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index bcf59646c7d..56192802087 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 +thran_quarry.jpg http://www.wizards.com/global/images/magic/general/thran_quarry.jpg +glimmervoid.jpg http://www.wizards.com/global/images/magic/general/glimmervoid.jpg natures_lore.jpg http://www.wizards.com/global/images/magic/general/natures_lore.jpg monk_idealist.jpg http://www.wizards.com/global/images/magic/general/monk_idealist.jpg hermit_druid.jpg http://www.wizards.com/global/images/magic/general/hermit_druid.jpg diff --git a/res/cards.txt b/res/cards.txt index c71fc8ec0ca..cff788ef898 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,23 @@ +Thran Quarry +no cost +Land +At the beginning of the end step, if you control no creatures, sacrifice CARDNAME +tap: add W +tap: add B +tap: add U +tap: add R +tap: add G + +Glimmervoid +no cost +Land +At the beginning of the end step, if you control no artifacts, sacrifice CARDNAME +tap: add W +tap: add B +tap: add U +tap: add R +tap: add G + Nature's Lore 1 G Sorcery diff --git a/res/rare.txt b/res/rare.txt index 641b082ec02..8a17c8c6af2 100644 --- a/res/rare.txt +++ b/res/rare.txt @@ -289,6 +289,7 @@ Gilded Lotus Gilt-Leaf Archdruid Giltspire Avenger Glacial Fortress +Glimmervoid Glimpse the Unthinkable Glint-Eye Nephilim Global Ruin @@ -797,6 +798,7 @@ Thornling Thornscape Master Thought Devourer Thoughtseize +Thran Quarry Threads of Disloyalty Thriss, Nantuko Primus Thrumming Stone diff --git a/src/forge/EndOfTurn.java b/src/forge/EndOfTurn.java index 4a31d9c55da..72661542753 100644 --- a/src/forge/EndOfTurn.java +++ b/src/forge/EndOfTurn.java @@ -36,6 +36,8 @@ public class EndOfTurn implements java.io.Serializable GameActionUtil.endOfTurn_Predatory_Advantage(); GameActionUtil.endOfTurn_Wall_Of_Reverence(); GameActionUtil.endOfTurn_Lighthouse_Chronologist(); + GameActionUtil.endOfTurn_Thran_Quarry(); + GameActionUtil.endOfTurn_Glimmervoid(); //GameActionUtil.removeExaltedEffects(); GameActionUtil.removeAttackedBlockedThisTurn(); diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 50e624ab835..fcd5e72bf17 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -3728,6 +3728,44 @@ public class GameActionUtil { AllZone.Stack.add(ability); } } + + public static void endOfTurn_Thran_Quarry() + { + final String player = AllZone.Phase.getActivePlayer(); + final PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player); + CardList list = new CardList(playZone.getCards()); + + CardList quarries = list.getName("Thran Quarry"); + + if (quarries.size() == 0) return; + + CardList creatures = list.getType("Creature"); + + if (creatures.size() == 0){ + for(Card c : quarries){ + AllZone.GameAction.sacrifice(c); + } + } + } + + public static void endOfTurn_Glimmervoid() + { + final String player = AllZone.Phase.getActivePlayer(); + final PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player); + CardList list = new CardList(playZone.getCards()); + + CardList glimmers = list.getName("Glimmervoid"); + + if (glimmers.size() == 0) return; + + CardList artifacts = list.getType("Artifact"); + + if (artifacts.size() == 0){ + for(Card c : glimmers){ + AllZone.GameAction.sacrifice(c); + } + } + } //END ENDOFTURN CARDS