diff --git a/res/main.properties b/res/main.properties index b760ac37bc6..857b9db867f 100644 --- a/res/main.properties +++ b/res/main.properties @@ -1,6 +1,6 @@ program/mail=mtgerror@yahoo.com program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26 -program/version=Forge -- official beta: 10/01/17, SVN revision: 322 +program/version=Forge -- official beta: 10/01/17, SVN revision: 323 tokens--file=AllTokens.txt diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 4433a3ad7eb..5181fb16ba4 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -8324,57 +8324,6 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }// *************** END ************ END ************************** - -/* - //*************** START *********** START ************************** - else if (cardName.equals("Hush")) - { - SpellAbility spell = new Spell(card) - { - private static final long serialVersionUID = -1572271570905127602L; - - public void resolve() - { - - CardList all = new CardList(); - all.addAll(AllZone.Human_Play.getCards()); - all.addAll(AllZone.Computer_Play.getCards()); - all = all.getType("Enchantment"); - CardListUtil.sortByDestroyEffect(all); - - for (int i = 0; i < all.size(); i++) - { - Card c = all.get(i); - AllZone.GameAction.destroy(c); - } - - }// resolve() - - public boolean canPlayAI() - { - CardList human = new CardList(AllZone.Human_Play.getCards()); - CardList computer = new CardList(AllZone.Computer_Play.getCards()); - - human = human.getType("Enchantment"); - computer = computer.getType("Enchantment"); - - - if (human.size() == 0) - return false; - - // the computer will at least destroy 2 more human enchantments - return computer.size() < human.size() - 1 || - (AllZone.Computer_Life.getLife() < 7 && !human.isEmpty()); - } - };// SpellAbility - - spell.setDescription("Destroy all enchantments."); - card.clearSpellAbility(); - card.addSpellAbility(spell); - card.addSpellAbility(CardFactoryUtil.ability_cycle(card, "2")); - }// *************** END ************ END ************************** -*/ - //*************** START *********** START ************************** else if(cardName.equals("Incendiary Command")) @@ -9631,52 +9580,7 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** - -/* - //*************** END ************ END ************************** - else if (cardName.equals("Lockjaw Snapper")) - { - - final Ability ability = new Ability(card, "0") - { - public void resolve() - { - PlayerZone hPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human); - PlayerZone cPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer); - - CardList creatures = new CardList(); - creatures.addAll(hPlay.getCards()); - creatures.addAll(cPlay.getCards()); - creatures = creatures.filter(new CardListFilter() - { - public boolean addCard(Card c) { - return c.getCounters(Counters.M1M1) > 0; - } - }); - - for (int i=0; i choices = c.getBasicSpells(); + + for (SpellAbility sa : choices ) + { + if (sa.canPlayAI()) + { + ComputerUtil.playStackFree(sa); + break; + } + } + library.remove(c); + //play.add(c); + } } }// resolve() @@ -6022,7 +5793,7 @@ public class GameActionUtil if (creatureType.contains("Treefolk") || creatureType.contains("Shaman")) ability.setStackDescription("Leaf-Crowned Elder - " + player - + " puts into play: " + cardName + "."); + + " reveals: " + cardName + "."); else ability.setStackDescription("Leaf-Crowned Elder - " + player + " reveals top card: " + cardName + "."); @@ -7027,8 +6798,6 @@ public class GameActionUtil private static void upkeep_Greener_Pastures() { - - final String player = AllZone.Phase.getActivePlayer(); PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player); PlayerZone oppPlayZone = AllZone.getZone(Constant.Zone.Play, AllZone.GameAction.getOpponent(player)); @@ -7055,34 +6824,15 @@ public class GameActionUtil list = list.getName("Greener Pastures"); Ability ability; - for (int i = 0; i < list.size(); i++) { + final Card crd = list.get(i); ability = new Ability(list.get(i), "0") { public void resolve() { - Card c = new Card(); - - c.setOwner(mostLands); - c.setController(mostLands); - - - c.setName("Saproling"); - c.setImageName("G 1 1 Saproling"); - c.setManaCost("G"); - c.setToken(true); - - c.addType("Creature"); - c.addType("Saproling"); - - c.setBaseAttack(1); - c.setBaseDefense(1); - - PlayerZone play = AllZone.getZone(Constant.Zone.Play, - mostLands); - play.add(c); + CardFactoryUtil.makeToken("Saproling", "G 1 1 Saproling", crd, "G", new String[] {"Creature", "Saproling"}, 1, 1, new String[] {""} ); }// resolve() };// Ability ability.setStackDescription("Greener Pastures - " + mostLands + " puts a 1/1 green Saproling token into play."); @@ -7104,32 +6854,13 @@ public class GameActionUtil Ability ability; for (int i = 0; i < list.size(); i++) { + final Card crd = list.get(i); ability = new Ability(list.get(i), "0") { public void resolve() { AllZone.GameAction.getPlayerLife(player).subtractLife(1); - Card c = new Card(); - - c.setOwner(player); - c.setController(player); - - c.setName("Faerie Rogue"); - c.setImageName("B 1 1 Faerie Rogue"); - c.setManaCost("B"); - c.setToken(true); - - c.addType("Creature"); - c.addType("Faerie"); - c.addType("Rogue"); - c.addIntrinsicKeyword("Flying"); - - c.setBaseAttack(1); - c.setBaseDefense(1); - - PlayerZone play = AllZone.getZone(Constant.Zone.Play, - player); - play.add(c); + CardFactoryUtil.makeToken("Faerie Rogue", "B 1 1 Faerie Rogue", crd, "B", new String[] {"Creature", "Faerie", "Rogue"}, 1, 1, new String[] {"Flying"} ); }// resolve() };// Ability ability.setStackDescription("Bitterblossom - deals 1 damage to " @@ -7245,25 +6976,7 @@ public class GameActionUtil public void makeToken() { - Card c = new Card(); - - c.setOwner(player); - c.setController(player); - - c.setName("Saproling"); - c.setImageName("G 1 1 Saproling"); - c.setManaCost("G"); - c.setToken(true); - - c.addType("Creature"); - c.addType("Saproling"); - - c.setBaseAttack(1); - c.setBaseDefense(1); - - PlayerZone play = AllZone.getZone(Constant.Zone.Play, - player); - play.add(c); + CardFactoryUtil.makeToken("Saproling", "G 1 1 Saproling", card, "G", new String[] {"Creature", "Saproling"}, 1, 1, new String[] {""} ); } };// Ability ability.setStackDescription("Mycoloth - " @@ -7291,14 +7004,22 @@ public class GameActionUtil { public void resolve() { - makeToken(); + int multiplier = 1; + int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", card.getController()).size(); + if (doublingSeasons > 0) + multiplier = (int) Math.pow(2, doublingSeasons); + for (int i=0;i