diff --git a/res/cards.txt b/res/cards.txt index 98168cc28b0..b973fd10bb8 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -28,6 +28,12 @@ When Wolfbriar Elemental enters the battlefield, put a 2/2 green Wolf creature t 4/4 Multikicker G +Helix Pinnacle +G +Enchantment +At the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game. +Shroud + Isochron Scepter 2 Artifact diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 539b3c3a22d..8c372100d09 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -16812,6 +16812,57 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); } + //*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Helix Pinnacle")) + { + final Ability ability = new Ability(card, "0") + { + public void resolve() + { + getSourceCard().addCounter(Counters.TOWER, getSourceCard().getX()); + } + public boolean canPlayAI() + { + getSourceCard().setX(ComputerUtil.getAvailableMana().size()); + setManaCost(getSourceCard().getX() + ""); + int n = getSourceCard().getX(); + for (Card c : AllZone.Computer_Play.getCards()) + { + if (c.getName().equals("Doubling Season")) + n*=2; + if (n > 20) + return true; + } + return false; + } + }; + ability.setBeforePayMana(new Input() + { + /** + * + */ + private static final long serialVersionUID = 43786418486732L; + + public void showMessage() + { + String s = JOptionPane.showInputDialog("What would you like X to be?"); + try { + ability.getSourceCard().setX(Integer.parseInt(s)); + ability.setManaCost(s); + stopSetNext(new Input_PayManaCost(ability)); + } + catch(NumberFormatException e){ + AllZone.Display.showMessage("\"" + s + "\" is not a number."); + stop(); + } + } + }); + ability.setDescription("X: Put X tower counters on Helix Pinnacle."); + ability.setStackDescription("Put X counters on Helix Pinnacle"); + card.addSpellAbility(ability); + } //*************** END ************ END ************************** // Cards with Cycling abilities diff --git a/src/forge/Counters.java b/src/forge/Counters.java index e7d41fd65cd..f91e10946af 100644 --- a/src/forge/Counters.java +++ b/src/forge/Counters.java @@ -28,7 +28,8 @@ public enum Counters { P1P1("+1/+1"), QUEST(), SPORE(), - TIME(); + TIME(), + TOWER("tower"); private String name; diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index e9979856f47..49bb89fcafb 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -67,6 +67,7 @@ public class GameActionUtil { upkeep_Dragon_Broodmother(); //put this before bitterblossom and mycoloth, so that they will resolve FIRST upkeep_Bitterblossom(); upkeep_Battle_of_Wits(); + upkeep_Helix_Pinnacle(); upkeep_Barren_Glory(); upkeep_Felidar_Sovereign(); upkeep_Klass(); @@ -5727,6 +5728,29 @@ public class GameActionUtil { }// if }// upkeep_Battle_of_Wits + private static void upkeep_Helix_Pinnacle() { + final String player = AllZone.Phase.getActivePlayer(); + PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player); + + CardList list = new CardList(playZone.getCards()); + list = list.getName("Helix Pinnacle"); + + for(Card c : list) { + if (c.getCounters(Counters.TOWER) < 100) continue; + Ability ability = new Ability(list.get(0), "0") { + @Override + public void resolve() + { + AllZone.GameAction.getPlayerLife(AllZone.GameAction.getOpponent(player)) + .setLife(0); + } + }; + + ability.setStackDescription("Helix Pinnacle - " + player + " wins the game"); + AllZone.Stack.add(ability); + }// if + }// upkeep_Helix_Pinnacle + private static void upkeep_Barren_Glory() { final String player = AllZone.Phase.getActivePlayer(); PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player);