From 2bf78dcd0c6f187c7f91772a084375b82da857a5 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 03:09:24 +0000 Subject: [PATCH] Carnophage & Sangrphage added --- res/card-pictures.txt | 2 ++ res/cards.txt | 12 ++++++++ src/forge/GameActionUtil.java | 58 +++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 3e842b1e36a..172f054ea08 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -18,6 +18,8 @@ forest.jpg http://resources.wizards.com/magic/cards/unh/en-us/card73946.jpg forest1.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=2748 forest2.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=587 forest3.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=586 +Sangrophage.jpg http://www.wizards.com/global/images/magic/general/Sangrophage.jpg +carnophage.jpg http://www.wizards.com/global/images/magic/general/carnophage.jpg chronatog.jpg http://www.wizards.com/global/images/magic/general/chronatog.jpg loxodon_gatekeeper.jpg http://www.wizards.com/global/images/magic/general/loxodon_gatekeeper.jpg frozen_aether.jpg http://www.wizards.com/global/images/magic/general/frozen_aether.jpg diff --git a/res/cards.txt b/res/cards.txt index 03f16c98676..959fa0d3603 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,15 @@ +Carnophage +B +Creature Zombie +At the beginning of your upkeep, tap Carnophage unless you pay 1 life +2/2 + +Sangrophage +B B +Creature Zombie +At the beginning of your upkeep, tap Carnophage unless you pay 2 life +3/3 + Chronatog 1 U Creature Atog diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 78e511fd009..8b4f7e8a2f0 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -17,6 +17,8 @@ public class GameActionUtil upkeep_MagusTabernacleUpkeepCost(); // upkeep_CheckEmptyDeck_Lose(); //still a little buggy upkeep_Phyrexian_Arena(); + upkeep_Carnophage(); + upkeep_Sangrophage(); upkeep_Honden_of_Cleansing_Fire(); upkeep_Honden_of_Seeing_Winds(); upkeep_Honden_of_Lifes_Web(); @@ -7562,6 +7564,62 @@ public class GameActionUtil } }// upkeep_Font_of_Mythos() + private static void upkeep_Carnophage() + { + final String player = AllZone.Phase.getActivePlayer(); + PlayerZone play = AllZone.getZone(Constant.Zone.Play, player); + + CardList list = new CardList(); + list.addAll(play.getCards()); + + list = list.getName("Carnophage"); + if ( player == "Human" ) { + for (int i = 0; i < list.size(); i++) { + Card c = list.get(i); + String[] choices = + { "Yes", "No" }; + Object choice = AllZone.Display.getChoice( + "Pay Carnophage's upkeep?", choices); + if (choice.equals("Yes")) + AllZone.GameAction.getPlayerLife(player).subtractLife(1); + else c.tap(); + } } + if ( player == "Computer" ) + for (int i = 0; i < list.size(); i++) { + Card c = list.get(i); + if ( AllZone.Computer_Life.getLife() > 1 ) + AllZone.GameAction.getPlayerLife(player).subtractLife(1); + else c.tap(); } + }// upkeep_Carnophage + + private static void upkeep_Sangrophage() + { + final String player = AllZone.Phase.getActivePlayer(); + PlayerZone play = AllZone.getZone(Constant.Zone.Play, player); + + CardList list = new CardList(); + list.addAll(play.getCards()); + + list = list.getName("Sangrophage"); + if ( player == "Human" ) { + for (int i = 0; i < list.size(); i++) { + Card c = list.get(i); + String[] choices = + { "Yes", "No" }; + Object choice = AllZone.Display.getChoice( + "Pay Sangrophage's upkeep?", choices); + if (choice.equals("Yes")) + AllZone.GameAction.getPlayerLife(player).subtractLife(2); + else c.tap(); + } } + if ( player == "Computer" ) + for (int i = 0; i < list.size(); i++) { + Card c = list.get(i); + if ( AllZone.Computer_Life.getLife() > 2 ) + AllZone.GameAction.getPlayerLife(player).subtractLife(2); + else c.tap(); } + }// upkeep_Carnophage + private static void upkeep_Phyrexian_Arena() { final String player = AllZone.Phase.getActivePlayer();