From 6f5970f34e7e045f6bd5882f2d045a3289c81f57 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 18:43:22 +0000 Subject: [PATCH] - Converted all the mighty Honden Shrines to script. --- res/cardsfolder/honden_of_cleansing_fire.txt | 5 +- res/cardsfolder/honden_of_infinite_rage.txt | 5 +- res/cardsfolder/honden_of_lifes_web.txt | 5 +- res/cardsfolder/honden_of_nights_reach.txt | 5 +- res/cardsfolder/honden_of_seeing_winds.txt | 5 +- res/gui/display_new_layout.xml | 8 +- src/forge/GameActionUtil.java | 202 +------------------ 7 files changed, 25 insertions(+), 210 deletions(-) diff --git a/res/cardsfolder/honden_of_cleansing_fire.txt b/res/cardsfolder/honden_of_cleansing_fire.txt index 2aa9ff4ede4..56e06cca543 100644 --- a/res/cardsfolder/honden_of_cleansing_fire.txt +++ b/res/cardsfolder/honden_of_cleansing_fire.txt @@ -1,7 +1,10 @@ Name:Honden of Cleansing Fire ManaCost:3 W Types:Legendary Enchantment Shrine -Text:At the beginning of your upkeep, you gain 2 life for each Shrine you control. +Text:no text +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ At the beginning of your upkeep, you gain 2 life for each Shrine you control. +SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X +SVar:X:Count$TypeYouCtrl.Shrine/Times.2 SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/honden_of_cleansing_fire.jpg SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/14.jpg diff --git a/res/cardsfolder/honden_of_infinite_rage.txt b/res/cardsfolder/honden_of_infinite_rage.txt index 9c5d1a458e8..7c9cc9e0812 100644 --- a/res/cardsfolder/honden_of_infinite_rage.txt +++ b/res/cardsfolder/honden_of_infinite_rage.txt @@ -1,7 +1,10 @@ Name:Honden of Infinite Rage ManaCost:2 R Types:Legendary Enchantment Shrine -Text:At the beginning of your upkeep, Honden of Infinite Rage deals damage to target creature or player equal to the number of Shrines you control. +Text:no text +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ At the beginning of your upkeep, Honden of Infinite Rage deals damage to target creature or player equal to the number of Shrines you control. +SVar:TrigDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ X +SVar:X:Count$TypeYouCtrl.Shrine SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/honden_of_infinite_rage.jpg SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/172.jpg diff --git a/res/cardsfolder/honden_of_lifes_web.txt b/res/cardsfolder/honden_of_lifes_web.txt index 6d7c5f459af..85b412b790a 100644 --- a/res/cardsfolder/honden_of_lifes_web.txt +++ b/res/cardsfolder/honden_of_lifes_web.txt @@ -1,7 +1,10 @@ Name:Honden of Life's Web ManaCost:4 G Types:Legendary Enchantment Shrine -Text:At the beginning of your upkeep, put a 1/1 colorless Spirit creature token onto the battlefield for each Shrine you control. +Text:no text +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, put a 1/1 colorless Spirit creature token onto the battlefield for each Shrine you control. +SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ X | TokenName$ Spirit | TokenTypes$ Creature,Spirit | TokenOwner$ Controller | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 +SVar:X:Count$TypeYouCtrl.Shrine SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/honden_of_lifes_web.jpg SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/213.jpg diff --git a/res/cardsfolder/honden_of_nights_reach.txt b/res/cardsfolder/honden_of_nights_reach.txt index ea19d09a8dc..dd52b700d32 100644 --- a/res/cardsfolder/honden_of_nights_reach.txt +++ b/res/cardsfolder/honden_of_nights_reach.txt @@ -1,7 +1,10 @@ Name:Honden of Night's Reach ManaCost:3 B Types:Legendary Enchantment Shrine -Text:At the beginning of your upkeep, target opponent discards a card for each Shrine you control. +Text:no text +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDiscard | TriggerDescription$ At the beginning of your upkeep, target opponent discards a card for each Shrine you control. +SVar:TrigDiscard:AB$Discard | Cost$ 0 | Defined$ Opponent | NumCards$ X | Mode$ TgtChoose +SVar:X:Count$TypeYouCtrl.Shrine SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/honden_of_nights_reach.jpg SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/116.jpg diff --git a/res/cardsfolder/honden_of_seeing_winds.txt b/res/cardsfolder/honden_of_seeing_winds.txt index 44b214e0108..94545e71c86 100644 --- a/res/cardsfolder/honden_of_seeing_winds.txt +++ b/res/cardsfolder/honden_of_seeing_winds.txt @@ -1,7 +1,10 @@ Name:Honden of Seeing Winds ManaCost:4 U Types:Legendary Enchantment Shrine -Text:At the beginning of your upkeep, draw a card for each Shrine you control. +Text:no text +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ At the beginning of your upkeep, draw a card for each Shrine you control. +SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ X +SVar:X:Count$TypeYouCtrl.Shrine SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/honden_of_seeing_winds.jpg SetInfo:CHK|Uncommon|http://magiccards.info/scans/en/chk/69.jpg diff --git a/res/gui/display_new_layout.xml b/res/gui/display_new_layout.xml index f4ff2cc90fa..c9fab71a544 100644 --- a/res/gui/display_new_layout.xml +++ b/res/gui/display_new_layout.xml @@ -100,7 +100,7 @@ 0 485 447 - 145 + 290 @@ -119,7 +119,7 @@ 0 - 630 + 775 447 5 @@ -134,9 +134,9 @@ 0 - 635 + 780 447 - 192 + 47 diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 8a55fd3835e..a3c1e046717 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -43,11 +43,6 @@ public class GameActionUtil { upkeep_Master_of_the_Wild_Hunt(); upkeep_Carnophage(); upkeep_Sangrophage(); - upkeep_Honden_of_Cleansing_Fire(); - upkeep_Honden_of_Seeing_Winds(); - upkeep_Honden_of_Lifes_Web(); - upkeep_Honden_of_Nights_Reach(); - upkeep_Honden_of_Infinite_Rage(); upkeep_Dega_Sanctuary(); upkeep_Sheltered_Valley(); upkeep_Living_Artifact(); @@ -9175,202 +9170,7 @@ public class GameActionUtil { } }// upkeep_Master_of_the_Wild_Hunt - private static void upkeep_Honden_of_Seeing_Winds() { - final Player player = AllZone.Phase.getPlayerTurn(); - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, player); - - CardList list = new CardList(); - list.addAll(play.getCards()); - - list = list.getName("Honden of Seeing Winds"); - - for(int i = 0; i < list.size(); i++) { - PlayerZone Play = AllZone.getZone(Constant.Zone.Battlefield, player); - CardList hondlist = new CardList(); - hondlist.addAll(Play.getCards()); - hondlist = hondlist.getType("Shrine"); - player.drawCards(hondlist.size()); - } - - }// upkeep_Honden_of_Seeing_Winds - - private static void upkeep_Honden_of_Cleansing_Fire() { - final Player player = AllZone.Phase.getPlayerTurn(); - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, player); - - CardList list = new CardList(); - list.addAll(play.getCards()); - - list = list.getName("Honden of Cleansing Fire"); - - for(int i = 0; i < list.size(); i++) { - final Card source = list.get(i); - final Ability ability = new Ability(source, "0") { - @Override - public void resolve() { - PlayerZone Play = AllZone.getZone(Constant.Zone.Battlefield, player); - CardList hondlist = new CardList(); - hondlist.addAll(Play.getCards()); - hondlist = hondlist.getType("Shrine"); - player.gainLife(2*hondlist.size(), source); - } - };// ability - - StringBuilder sb = new StringBuilder(); - sb.append(source).append(" - ").append(source.getController()); - sb.append(" gains 2 life for each Shrine he controls."); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.add(ability); - } - }// upkeep_Honden_of_Cleansing_Fire - - private static void upkeep_Honden_of_Nights_Reach() { - final Player player = AllZone.Phase.getPlayerTurn(); - final Player opponent = player.getOpponent(); - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, player); - - CardList list = new CardList(); - list.addAll(play.getCards()); - - list = list.getName("Honden of Night's Reach"); - - for(int i = 0; i < list.size(); i++) { - final Ability ability = new Ability(list.get(i), "0") { - @Override - public void resolve() { - CardList shrineList = AllZoneUtil.getPlayerTypeInPlay(player, "Shrine"); - opponent.discard(shrineList.size(), this, false); - } - };// ability - - StringBuilder sb = new StringBuilder(); - sb.append(list.get(i)).append(" - ").append(list.get(i).getController().getOpponent()); - sb.append(" discards a card for each Shrine ").append(list.get(i).getController()).append(" controls."); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.add(ability); - } - } - - // upkeep_Honden_of_Nights_Reach() - - private static void upkeep_Honden_of_Infinite_Rage() { - final Player controller = AllZone.Phase.getPlayerTurn(); - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, controller); - - CardList list = new CardList(); - list.addAll(play.getCards()); - - list = list.getName("Honden of Infinite Rage"); - PlayerZone Play = AllZone.getZone(Constant.Zone.Battlefield, controller); - CardList hondlist = new CardList(); - hondlist.addAll(Play.getCards()); - hondlist = hondlist.getType("Shrine"); - for(int i = 0; i < list.size(); i++) { - - final Card card = list.get(i); - final Ability ability = new Ability(list.get(i), "0") { - - - @Override - public void resolve() { - PlayerZone Play = AllZone.getZone(Constant.Zone.Battlefield, controller); - CardList hondlist = new CardList(); - hondlist.addAll(Play.getCards()); - hondlist = hondlist.getType("Shrine"); - if(controller.equals(AllZone.HumanPlayer)) { - Player opp = controller.getOpponent(); - PlayerZone oppPlay = AllZone.getZone(Constant.Zone.Battlefield, opp); - - String[] choices = {"Yes", "No, target a creature instead"}; - - Object q = GuiUtils.getChoiceOptional("Select computer as target?", choices); - if(q != null && q.equals("Yes")) { - AllZone.ComputerPlayer.addDamage(hondlist.size(), card); - } - else { - CardList cards = new CardList(oppPlay.getCards()); - CardList oppCreatures = new CardList(); - for(int i = 0; i < cards.size(); i++) { - if(cards.get(i).isPlaneswalker() || cards.get(i).isCreature()) { - oppCreatures.add(cards.get(i)); - } - } - - if(oppCreatures.size() > 0) { - - Object o = GuiUtils.getChoiceOptional("Pick target creature", - oppCreatures.toArray()); - Card c = (Card) o; - c.addDamage(hondlist.size(), card); - } - } - } - - else { - Card targetc = null; - CardList flying = CardFactoryUtil.AI_getHumanCreature("Flying", card, true); - if(AllZone.HumanPlayer.getLife() > hondlist.size() * 2) { - for(int i = 0; i < flying.size(); i++) { - if(flying.get(i).getNetDefense() <= hondlist.size()) { - targetc = flying.get(i); - } - - } - } - if(targetc != null) { - if(AllZone.GameAction.isCardInPlay(targetc)) targetc.addDamage(hondlist.size(), card); - } else { - AllZone.HumanPlayer.addDamage(hondlist.size(), card); - } - } - }//resolve() - };//SpellAbility - - StringBuilder sb = new StringBuilder(); - sb.append(list.get(i)).append(" - Deals ").append(hondlist.size()); - sb.append(" damage to target creature or player"); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.add(ability); - } - }// upkeep_Honden_of_Infinite_Rage - - - private static void upkeep_Honden_of_Lifes_Web() { - final Player player = AllZone.Phase.getPlayerTurn(); - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, player); - - CardList list = new CardList(); - list.addAll(play.getCards()); - - list = list.getName("Honden of Life's Web"); - - for(int i = 0; i < list.size(); i++) { - final Card crd = list.get(i); - final Ability ability = new Ability(list.get(i), "0") { - @Override - public void resolve() { - PlayerZone Play = AllZone.getZone(Constant.Zone.Battlefield, player); - CardList hondlist = new CardList(); - hondlist.addAll(Play.getCards()); - hondlist = hondlist.getType("Shrine"); - for(int j = 0; j < hondlist.size(); j++) { - CardFactoryUtil.makeToken("Spirit", "C 1 1 Spirit", crd.getController(), "", new String[] { - "Creature", "Spirit"}, 1, 1, new String[] {""}); - } - } - };// Ability - - StringBuilder sb = new StringBuilder(); - sb.append(list.get(i)).append(" - ").append(list.get(i).getController()); - sb.append(" puts a 1/1 colorless Spirit creature token onto the battlefield for each Shrine he controls."); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.add(ability); - } - }// upkeep_Honden_of_Lifes_Web + private static void upkeep_Seizan_Perverter_of_Truth() { final Player player = AllZone.Phase.getPlayerTurn();