diff --git a/res/cards.txt b/res/cards.txt index 0c7a05b6aba..f4170273fa3 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Doubling Season +4 G +Enchantment +If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead. If an effect would place one or more counters on a permanent you control, it places twice that many of those counters on that permanent instead. + Accelerated Mutation 3 G G Instant diff --git a/res/main.properties b/res/main.properties index d7fcff15814..d8b3b108be0 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: 315 +program/version=Forge -- official beta: 10/01/17, SVN revision: 320 tokens--file=AllTokens.txt diff --git a/res/pics_link/card-pictures_w.txt b/res/pics_link/card-pictures_w.txt index 7b8f8092f41..7fdbfc32484 100644 --- a/res/pics_link/card-pictures_w.txt +++ b/res/pics_link/card-pictures_w.txt @@ -126,7 +126,7 @@ watchdog.jpg http://[server]/TE/Watchdog.full.jpg watcher_sliver.jpg http://[server]/TSP/Watcher%20Sliver.full.jpg watchwing_scarecrow.jpg http://[server]/SHM/Watchwing%20Scarecrow.full.jpg watchwolf.jpg http://[server]/RAV/Watchwolf.full.jpg -water_elemental.jpg http://[server]/4E/Water%20Elemental.full.jpg +water_elemental.jpg http://[server]/B/Water%20Elemental.full.jpg water_gun_balloon_game.jpg http://[server]/UNH/Water%20Gun%20Balloon%20Game.full.jpg water_wurm.jpg http://[server]/DK/Water%20Wurm.full.jpg waterfront_bouncer.jpg http://[server]/MM/Waterfront%20Bouncer.full.jpg diff --git a/src/forge/AllZone.java b/src/forge/AllZone.java index 2a7a35f1496..4f53650567d 100644 --- a/src/forge/AllZone.java +++ b/src/forge/AllZone.java @@ -96,6 +96,7 @@ public class AllZone implements NewConstants { player = "Human"; System.out.println("Evil hack"); } + Object o = map.get(zone + player); if(o == null) throw new RuntimeException("AllZone : getZone() invalid parameters " +zone +" " +player); diff --git a/src/forge/BoosterDraft.java b/src/forge/BoosterDraft.java index 897bebe25b2..fd59d4ff30d 100644 --- a/src/forge/BoosterDraft.java +++ b/src/forge/BoosterDraft.java @@ -12,9 +12,9 @@ public interface BoosterDraft class BoosterDraft_1 implements BoosterDraft { private final BoosterDraftAI draftAI = new BoosterDraftAI(); - private final int nPlayers = 8; + private static final int nPlayers = 8; private static final int boosterPackSize = 15; - private final int stopCount = boosterPackSize * 3;//should total of 45 + private static final int stopCount = boosterPackSize * 3;//should total of 45 private int currentCount = 0; private CardList[] pack;//size 8 diff --git a/src/forge/Card.java b/src/forge/Card.java index 4edb80bce84..d340b3f31e4 100644 --- a/src/forge/Card.java +++ b/src/forge/Card.java @@ -189,14 +189,19 @@ public class Card extends MyObservable public void addCounter(Counters counterName, int n) { + int multiplier = 1; + int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", this.getController()).size(); + if (doublingSeasons > 0) + multiplier = (int) Math.pow(2, doublingSeasons); + if(counters.containsKey(counterName)) { - Integer aux = counters.get(counterName) + n; + Integer aux = counters.get(counterName) + (multiplier * n); counters.put(counterName,aux); } else { - counters.put(counterName, Integer.valueOf(n)); + counters.put(counterName, Integer.valueOf(multiplier * n)); } this.updateObservers(); } diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index bd6df82525f..98333752b44 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -823,7 +823,7 @@ public class CardFactory implements NewConstants { card.addSpellAbility(a1); - String Desc = new String(); + String Desc = ""; Desc = "Regenerate " + cardName; a1.setDescription(manacost + ": " + Desc); @@ -14013,10 +14013,14 @@ public class CardFactory implements NewConstants { return AllZone.Phase.getPhase().equals(Constant.Phase.Main1); } - public void resolve() { - final Card[] token = new Card[3]; + int multiplier = 1; + int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", card.getController()).size(); + if (doublingSeasons > 0) + multiplier = (int) Math.pow(2, doublingSeasons); + + final Card[] token = new Card[3*multiplier]; final Command atEOT = new Command() { private static final long serialVersionUID = -1928884889370422828L; @@ -14062,69 +14066,6 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** - - -/* - //*************** START *********** START ************************** - else if(cardName.equals("Inspirit")) - { - SpellAbility spell = new Spell(card) - { - private static final long serialVersionUID = -601100008975177639L; - - public boolean canPlayAI() - { - return getAttacker() != null; - } - public void chooseTargetAI() - { - setTargetCard(getAttacker()); - } - public Card getAttacker() - { - //target creature that is going to attack - Combat c = ComputerUtil.getAttackers(); - Card[] att = c.getAttackers(); - if(att.length != 0) - return att[0]; - else - return null; - }//getAttacker() - public void resolve() - { - final Card[] target = new Card[1]; - final Command untilEOT = new Command() - { - private static final long serialVersionUID = -3197321199337917886L; - - public void execute() - { - if(AllZone.GameAction.isCardInPlay(target[0])) - { - target[0].addTempAttackBoost(-2); - target[0].addTempDefenseBoost(-4); - } - } - }; - - target[0] = getTargetCard(); - if(AllZone.GameAction.isCardInPlay(target[0]) && CardFactoryUtil.canTarget(card, target[0])) - { - target[0].addTempAttackBoost(2); - target[0].addTempDefenseBoost(4); - - target[0].untap(); - - AllZone.EndOfTurn.addUntil(untilEOT); - } - }//resolve() - }; - spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell)); - card.clearSpellAbility(); - card.addSpellAbility(spell); - }//*************** END ************ END ************************** -*/ - //*************** START *********** START ************************** else if(cardName.equals("Animate Land")) @@ -17187,7 +17128,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); }//getCard2 // copies stats like attack, defense, etc.. - private Card copyStats(Object o) { + public static Card copyStats(Object o) { Card sim = (Card) o; Card c = new Card(); diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index fe294930df5..2f7211da463 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -3151,9 +3151,10 @@ public class CardFactoryUtil return list; } - public static void makeToken(String name, String imageName, Card source, String manaCost, String[] types, int baseAttack, int baseDefense, + public static CardList makeToken(String name, String imageName, Card source, String manaCost, String[] types, int baseAttack, int baseDefense, String[] intrinsicKeywords) { + CardList list = new CardList(); Card c = new Card(); c.setName(name); c.setImageName(imageName); @@ -3174,7 +3175,20 @@ public class CardFactoryUtil c.addIntrinsicKeyword(kw); PlayerZone play = AllZone.getZone(Constant.Zone.Play, source.getController()); - play.add(c); + + int multiplier = 1; + int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", source.getController()).size(); + if (doublingSeasons > 0) + multiplier = (int) Math.pow(2, doublingSeasons); + + for (int i=0;i