From 02c41195a8c5d8da44099c720dee65366b3a98f1 Mon Sep 17 00:00:00 2001 From: Sloth Date: Thu, 21 Mar 2013 22:00:18 +0000 Subject: [PATCH 01/20] - Fixed a possible UnmodifiableCollection.remove call. --- src/main/java/forge/card/ability/effects/DiscardEffect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forge/card/ability/effects/DiscardEffect.java b/src/main/java/forge/card/ability/effects/DiscardEffect.java index d15ab566e7f..4e2d5d8254b 100644 --- a/src/main/java/forge/card/ability/effects/DiscardEffect.java +++ b/src/main/java/forge/card/ability/effects/DiscardEffect.java @@ -165,7 +165,7 @@ public class DiscardEffect extends RevealEffectBase { } else if (mode.equals("RevealYouChoose") || mode.equals("RevealOppChoose") || mode.equals("TgtChoose")) { // Is Reveal you choose right? I think the wrong player is // being used? - List dPHand = p.getCardsIn(ZoneType.Hand); + List dPHand = new ArrayList(p.getCardsIn(ZoneType.Hand)); if (dPHand.isEmpty()) continue; // for loop over players From 321282299fc3715be6a9d2766e17cc7450756a34 Mon Sep 17 00:00:00 2001 From: myk Date: Thu, 21 Mar 2013 22:36:31 +0000 Subject: [PATCH 02/20] clarify comment in CPicture --- .../java/forge/gui/match/controllers/CPicture.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/forge/gui/match/controllers/CPicture.java b/src/main/java/forge/gui/match/controllers/CPicture.java index 368bcad6e90..8dae6eb2f74 100644 --- a/src/main/java/forge/gui/match/controllers/CPicture.java +++ b/src/main/java/forge/gui/match/controllers/CPicture.java @@ -47,7 +47,7 @@ public enum CPicture implements ICDoc { */ public void showCard(final Card c) { canFlip = c != null && (c.isDoubleFaced() || c.isFlipCard()); - this.currentCard = c; + currentCard = c; flipped = canFlip && (c.getCurState() == CardCharacteristicName.Transformed || c.getCurState() == CardCharacteristicName.Flipped); VPicture.SINGLETON_INSTANCE.getLblFlipcard().setVisible(canFlip); @@ -59,14 +59,16 @@ public enum CPicture implements ICDoc { showCard(((IPaperCard)item).getMatchingForgeCard()); return; } - - this.currentCard = null; + + canFlip = false; + flipped = false; + currentCard = null; VPicture.SINGLETON_INSTANCE.getLblFlipcard().setVisible(false); VPicture.SINGLETON_INSTANCE.getPnlPicture().setCard(item); } public Card getCurrentCard() { - return this.currentCard; + return currentCard; } @Override @@ -100,7 +102,8 @@ public enum CPicture implements ICDoc { } else if (currentCard.isFlipCard()) { newState = CardCharacteristicName.Flipped; } else { - // if this is hit, then there is a misalignment between this method and the showCard method above + // if this is hit, then then showCard has been modified to handle additional types, but + // this function is missing an else if statement above throw new RuntimeException("unhandled flippable card"); } } else { From 1567fa996d4d4964afb79f8bd99675f1c06577ad Mon Sep 17 00:00:00 2001 From: Sol Date: Fri, 22 Mar 2013 01:20:43 +0000 Subject: [PATCH 03/20] - Convert Scroll Rack to script --- res/cardsfolder/s/scroll_rack.txt | 6 ++ .../cardfactory/CardFactoryArtifacts.java | 98 ------------------- 2 files changed, 6 insertions(+), 98 deletions(-) diff --git a/res/cardsfolder/s/scroll_rack.txt b/res/cardsfolder/s/scroll_rack.txt index cda09e1d5e8..34081418bbc 100644 --- a/res/cardsfolder/s/scroll_rack.txt +++ b/res/cardsfolder/s/scroll_rack.txt @@ -1,6 +1,12 @@ Name:Scroll Rack ManaCost:2 Types:Artifact +A:AB$ ChangeZone | Cost$ 1 T | Origin$ Hand | Destination$ Exile | ChangeType$ Card | ChangeNum$ XFetch | References$ XFetch | RememberChanged$ True | SubAbility$ DBDig | SpellDescription$ Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order. | StackDescription$ SpellDescription +SVar:DBDig:DB$ Dig | DigNum$ X | Reveal$ True | ChangeNum$ All | ChangeValid$ Card | DestinationZone$ Hand | SubAbility$ DBReplace +SVar:DBReplace:DB$ ChangeZoneAll | Origin$ Exile | Destination$ Library | ChangeType$ Card.IsRemembered | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:XFetch:Count$InYourHand +SVar:X:Remembered$Amount SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/scroll_rack.jpg Oracle:{1}, {T}: Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order. diff --git a/src/main/java/forge/card/cardfactory/CardFactoryArtifacts.java b/src/main/java/forge/card/cardfactory/CardFactoryArtifacts.java index 4c2bcda640d..6c653ac621f 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryArtifacts.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryArtifacts.java @@ -5,18 +5,11 @@ import java.util.List; import forge.Card; -import forge.Singletons; import forge.card.cost.Cost; import forge.card.spellability.AbilityActivated; import forge.card.spellability.Target; -import forge.control.input.Input; -import forge.control.input.InputSelectManyCards; import forge.game.player.Player; -import forge.game.zone.PlayerZone; -import forge.game.zone.Zone; import forge.game.zone.ZoneType; -import forge.gui.GuiChoose; -import forge.gui.match.CMatchUI; /** * TODO: Write javadoc for this type. @@ -102,96 +95,5 @@ class CardFactoryArtifacts { ab1.setStackDescription(sb.toString()); card.addSpellAbility(ab1); } // *************** END ************ END ************************** - - // *************** START *********** START ************************** - else if (cardName.equals("Scroll Rack")) { - class AbilityScrollRack extends AbilityActivated { - public AbilityScrollRack(final Card ca, final Cost co, final Target t) { - super(ca, co, t); - } - - @Override - public AbilityActivated getCopy() { - AbilityActivated res = new AbilityScrollRack(getSourceCard(), - getPayCosts(), getTarget() == null ? null : new Target(getTarget())); - CardFactory.copySpellAbility(this, res); - return res; - } - - private static final long serialVersionUID = -5588587187720068547L; - - @Override - public void resolve() { - // not implemented for compy - if (card.getController().isHuman()) { - - InputSelectManyCards inp = new InputSelectManyCards(0, Integer.MAX_VALUE) { - private static final long serialVersionUID = 806464726820739922L; - - @Override - protected boolean isValidChoice(Card c) { - Zone zone = Singletons.getModel().getGame().getZoneOf(c); - return zone.is(ZoneType.Hand) && c.getController() == card.getController(); - } - - /* (non-Javadoc) - * @see forge.control.input.InputSelectManyCards#onDone() - */ - @Override - protected Input onDone() { - for (final Card c : selected) { - Singletons.getModel().getGame().getAction().exile(c); - } - - // Put that many cards from the top of your - // library into your hand. - // Ruling: This is not a draw... - final PlayerZone lib = card.getController().getZone(ZoneType.Library); - int numCards = 0; - while ((lib.size() > 0) && (numCards < selected.size())) { - Singletons.getModel().getGame().getAction().moveToHand(lib.get(0)); - numCards++; - } - - final StringBuilder sb = new StringBuilder(); - sb.append(card.getName()).append(" - Returning cards to top of library."); - CMatchUI.SINGLETON_INSTANCE.showMessage(sb.toString()); - - // Then look at the exiled cards and put them on - // top of your library in any order. - while (selected.size() > 0) { - final Card c1 = GuiChoose.one("Put a card on top of your library.", selected); - Singletons.getModel().getGame().getAction().moveToLibrary(c1); - selected.remove(c1); - } - return null; } - }; - inp.setMessage(card.getName() + " - Exile cards from hand. Currently, %d selected. (Press OK when done.)"); - - Singletons.getModel().getMatch().getInput().setInput(inp); - - } - } - - @Override - public boolean canPlayAI() { - return false; - } - } - final Cost abCost = new Cost(card, "1 T", true); - final AbilityActivated ability = new AbilityScrollRack(card, abCost, null); - - final StringBuilder sbDesc = new StringBuilder(); - sbDesc.append(abCost); - sbDesc.append("Exile any number of cards from your hand face down. Put that many cards "); - sbDesc.append("from the top of your library into your hand. Then look at the exiled cards "); - sbDesc.append("and put them on top of your library in any order."); - ability.setDescription(sbDesc.toString()); - - final StringBuilder sbStack = new StringBuilder(); - sbStack.append(cardName).append(" - exile any number of cards from your hand."); - ability.setStackDescription(sbStack.toString()); - card.addSpellAbility(ability); - } // *************** END ************ END ************************** } } From 9decf87bba29b3c883c2b323df1ec370ec3f7c57 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 06:44:57 +0000 Subject: [PATCH 04/20] - Fixed Painter's Servant crash. --- src/main/java/forge/StaticEffects.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/forge/StaticEffects.java b/src/main/java/forge/StaticEffects.java index 407e92a32c4..c7dc9ab4b45 100644 --- a/src/main/java/forge/StaticEffects.java +++ b/src/main/java/forge/StaticEffects.java @@ -153,13 +153,21 @@ public class StaticEffects { } if (params.containsKey("AddColor")) { - addColors = CardUtil.getShortColorsString(new ArrayList(Arrays.asList(params.get("AddColor").split( - " & ")))); + final String colors = params.get("AddColor"); + if (colors.equals("ChosenColor")) { + addColors = CardUtil.getShortColorsString(se.getSource().getChosenColor()); + } else { + addColors = CardUtil.getShortColorsString(new ArrayList(Arrays.asList(colors.split(" & ")))); + } } if (params.containsKey("SetColor")) { - addColors = CardUtil.getShortColorsString(new ArrayList(Arrays.asList(params.get("SetColor").split( - " & ")))); + final String colors = params.get("SetColor"); + if (colors.equals("ChosenColor")) { + addColors = CardUtil.getShortColorsString(se.getSource().getChosenColor()); + } else { + addColors = CardUtil.getShortColorsString(new ArrayList(Arrays.asList(colors.split(" & ")))); + } } // modify players From 025c2a2e7ffa0a58aa73d79b3dd9b683ccd199f7 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 07:13:11 +0000 Subject: [PATCH 05/20] - Fixed AI problem with Angel of Serenity. --- src/main/java/forge/card/ability/ai/ChangeZoneAi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forge/card/ability/ai/ChangeZoneAi.java b/src/main/java/forge/card/ability/ai/ChangeZoneAi.java index 6ee5b378bdc..81f23bd9e65 100644 --- a/src/main/java/forge/card/ability/ai/ChangeZoneAi.java +++ b/src/main/java/forge/card/ability/ai/ChangeZoneAi.java @@ -927,7 +927,7 @@ public class ChangeZoneAi extends SpellAbilityAi { } final Card source = sa.getSourceCard(); - final ZoneType origin = ZoneType.smartValueOf(sa.getParam("Origin")); + final ZoneType origin = ZoneType.listValueOf(sa.getParam("Origin")).get(0); final ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination")); final Target tgt = sa.getTarget(); From 563d21a0948e7caeac223f09948bda3863e52759 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 12:22:54 +0000 Subject: [PATCH 06/20] - Improved AI predicting some ETB triggers. --- res/cardsfolder/a/angel_of_serenity.txt | 4 ++-- src/main/java/forge/card/ability/ai/ChangeZoneAi.java | 11 +++++------ .../java/forge/card/spellability/SpellPermanent.java | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/res/cardsfolder/a/angel_of_serenity.txt b/res/cardsfolder/a/angel_of_serenity.txt index ea6891f5668..b70052c5b90 100644 --- a/res/cardsfolder/a/angel_of_serenity.txt +++ b/res/cardsfolder/a/angel_of_serenity.txt @@ -5,8 +5,8 @@ PT:5/6 K:Flying T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, you may exile up to three other target creatures from the battlefield and/or creature cards from graveyards. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME leaves the battlefield, return the exiled card to the battlefield under its owner's control. -SVar:TrigExile:DB$ChangeZone | TargetMin$ 0 | TargetMax$ 3 | IsCurse$ True | ValidTgts$ Creature.Other | TgtPrompt$ Choose another target creature | RememberChanged$ True | Origin$ Battlefield,Graveyard | Destination$ Exile -SVar:TrigReturn:DB$ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Hand | SubAbility$ DBCleanup +SVar:TrigExile:DB$ ChangeZone | TargetMin$ 0 | TargetMax$ 3 | IsCurse$ True | ValidTgts$ Creature.Other | TgtPrompt$ Choose another target creature | RememberChanged$ True | Origin$ Battlefield,Graveyard | Destination$ Exile +SVar:TrigReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Hand | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:PlayMain1:TRUE SVar:Picture:http://www.wizards.com/global/images/magic/general/angel_of_serenity.jpg diff --git a/src/main/java/forge/card/ability/ai/ChangeZoneAi.java b/src/main/java/forge/card/ability/ai/ChangeZoneAi.java index 81f23bd9e65..5893b0f06eb 100644 --- a/src/main/java/forge/card/ability/ai/ChangeZoneAi.java +++ b/src/main/java/forge/card/ability/ai/ChangeZoneAi.java @@ -670,8 +670,7 @@ public class ChangeZoneAi extends SpellAbilityAi { * a boolean. * @return a boolean. */ - private static boolean isPreferredTarget(final AIPlayer ai, final SpellAbility sa, - final boolean mandatory) { + private static boolean isPreferredTarget(final AIPlayer ai, final SpellAbility sa, final boolean mandatory) { final Card source = sa.getSourceCard(); final ZoneType origin = ZoneType.listValueOf(sa.getParam("Origin")).get(0); final ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination")); @@ -833,7 +832,7 @@ public class ChangeZoneAi extends SpellAbilityAi { return false; } - if (!mandatory && (list.size() < tgt.getMinTargets(sa.getSourceCard(), sa))) { + if (!mandatory && list.size() < tgt.getMinTargets(sa.getSourceCard(), sa)) { return false; } @@ -843,8 +842,8 @@ public class ChangeZoneAi extends SpellAbilityAi { Card choice = null; if (!list.isEmpty()) { - final Card mostExpensive = ComputerUtilCard.getMostExpensivePermanentAI(list, sa, false); if (destination.equals(ZoneType.Battlefield) || origin.equals(ZoneType.Battlefield)) { + final Card mostExpensive = ComputerUtilCard.getMostExpensivePermanentAI(list, sa, false); if (mostExpensive.isCreature()) { // if a creature is most expensive take the best one if (destination.equals(ZoneType.Exile)) { @@ -887,13 +886,13 @@ public class ChangeZoneAi extends SpellAbilityAi { } } if (choice == null) { // can't find anything left - if ((tgt.getNumTargeted() == 0) || (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa))) { + if (tgt.getNumTargeted() == 0 || tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa)) { if (!mandatory) { tgt.resetTargets(); } return false; } else { - if (!ComputerUtil.shouldCastLessThanMax(ai, source)) { + if (!sa.isTrigger() && !ComputerUtil.shouldCastLessThanMax(ai, source)) { return false; } break; diff --git a/src/main/java/forge/card/spellability/SpellPermanent.java b/src/main/java/forge/card/spellability/SpellPermanent.java index 744d4784c44..a4539088000 100644 --- a/src/main/java/forge/card/spellability/SpellPermanent.java +++ b/src/main/java/forge/card/spellability/SpellPermanent.java @@ -327,6 +327,7 @@ public class SpellPermanent extends Spell { else { throw new InvalidParameterException("Either ai or sa must be not null!"); } + exSA.setTrigger(true); // Run non-mandatory trigger. // These checks only work if the Executing SpellAbility is an From 565fb266d1058fa72daf3262a0c11ffbfc3d90e1 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 12:34:23 +0000 Subject: [PATCH 07/20] - Commented out the unfinished "Blink permanents with ETB triggers" part in changeZoneAI. --- src/main/java/forge/card/ability/ai/ChangeZoneAi.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/forge/card/ability/ai/ChangeZoneAi.java b/src/main/java/forge/card/ability/ai/ChangeZoneAi.java index 5893b0f06eb..8f5e49654cd 100644 --- a/src/main/java/forge/card/ability/ai/ChangeZoneAi.java +++ b/src/main/java/forge/card/ability/ai/ChangeZoneAi.java @@ -749,8 +749,8 @@ public class ChangeZoneAi extends SpellAbilityAi { } } } - // Blink permanents with ETB triggers - else if (!sa.isTrigger() && SpellAbilityAi.playReusable(ai, sa)) { + // TODO: Blink permanents with ETB triggers + /*else if (!sa.isTrigger() && SpellAbilityAi.playReusable(ai, sa)) { aiPermanents = CardLists.filter(aiPermanents, new Predicate() { @Override public boolean apply(final Card c) { @@ -768,7 +768,7 @@ public class ChangeZoneAi extends SpellAbilityAi { tgt.addTarget(ComputerUtilCard.getBestAI(aiPermanents)); return true; } - } + }*/ } } else if (origin.equals(ZoneType.Graveyard)) { From 709d77a8c1993835684f9cbc55af1cf654a1a977 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 22 Mar 2013 12:39:28 +0000 Subject: [PATCH 08/20] - Added new card names to changes.txt. --- CHANGES.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1591f52536b..0a0c2b02b66 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -70,9 +70,12 @@ Thieves' Auction Infinite Reflection Laccolith Rig Paroxysm +Essence Leak -New Planes: +---------- +New Planes +---------- Bant Turri Island From 6e85029b3f4eb8840d157bcb2dbc42c6112e4a9e Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 12:40:42 +0000 Subject: [PATCH 09/20] - Fixed spliced Kodama's Reach. --- src/main/java/forge/game/GameActionUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/forge/game/GameActionUtil.java b/src/main/java/forge/game/GameActionUtil.java index f7fa491a034..d0183522413 100644 --- a/src/main/java/forge/game/GameActionUtil.java +++ b/src/main/java/forge/game/GameActionUtil.java @@ -1333,6 +1333,7 @@ public final class GameActionUtil { while (child.getSubAbility() != null) { AbilitySub newChild = child.getSubAbility().getCopy(); child.setSubAbility(newChild); + child.setActivatingPlayer(s.getActivatingPlayer()); child = newChild; } From f797c9ad007c5b6135c10a40bd928ad47151bbe6 Mon Sep 17 00:00:00 2001 From: swordshine Date: Fri, 22 Mar 2013 14:05:05 +0000 Subject: [PATCH 10/20] - Added Mistform Warchief --- .gitattributes | 1 + res/cardsfolder/m/mistform_warchief.txt | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 res/cardsfolder/m/mistform_warchief.txt diff --git a/.gitattributes b/.gitattributes index 86d563d23e1..64efeae412f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6739,6 +6739,7 @@ res/cardsfolder/m/mistform_stalker.txt svneol=native#text/plain res/cardsfolder/m/mistform_ultimus.txt svneol=native#text/plain res/cardsfolder/m/mistform_wakecaster.txt -text svneol=unset#text/plain res/cardsfolder/m/mistform_wall.txt -text svneol=unset#text/plain +res/cardsfolder/m/mistform_warchief.txt -text res/cardsfolder/m/misthollow_griffin.txt -text res/cardsfolder/m/mistmeadow_skulk.txt svneol=native#text/plain res/cardsfolder/m/mistmeadow_witch.txt svneol=native#text/plain diff --git a/res/cardsfolder/m/mistform_warchief.txt b/res/cardsfolder/m/mistform_warchief.txt new file mode 100644 index 00000000000..1eec03c66d6 --- /dev/null +++ b/res/cardsfolder/m/mistform_warchief.txt @@ -0,0 +1,11 @@ +Name:Mistform Warchief +ManaCost:2 U +Types:Creature Illusion +PT:1/3 +S:Mode$ ReduceCost | ValidCard$ Creature.sharesCreatureTypeWith | Type$ Spell | Activator$ You | Amount$ 1 | Description$ Creature spells you cast that share a creature type with CARDNAME cost 1 less to cast. +A:AB$ ChooseType | Cost$ T | Defined$ You | Type$ Creature | SubAbility$ DBAnimate | SpellDescription$ CARDNAME becomes the creature type of your choice until end of turn. +SVar:DBAnimate:DB$ Animate | Types$ ChosenType | OverwriteTypes$ True | KeepSupertypes$ True | KeepCardTypes$ True +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/mistform_warchief.jpg +Oracle:Creature spells you cast that share a creature type with Mistform Warchief cost {1} less to cast.\n{T}: Mistform Warchief becomes the creature type of your choice until end of turn. +SetInfo:SCG Uncommon \ No newline at end of file From 46abba0cdb2baf41b3e61152798ab16345437a60 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 17:24:19 +0000 Subject: [PATCH 11/20] - Added the hard quest opponent Dead Girl 3 by Nordos. --- .gitattributes | 1 + res/quest/duels/Dead Girl 3.dck | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 res/quest/duels/Dead Girl 3.dck diff --git a/.gitattributes b/.gitattributes index 64efeae412f..1d13a7f0cdc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12869,6 +12869,7 @@ res/quest/duels/Darrin[!!-~]Stephens[!!-~]3.dck -text res/quest/duels/Darrin[!!-~]Stephens[!!-~]4.dck -text res/quest/duels/Darth[!!-~]Vader[!!-~]3.dck -text res/quest/duels/Data[!!-~]2.dck -text +res/quest/duels/Dead[!!-~]Girl[!!-~]3.dck -text res/quest/duels/Deadpool[!!-~]1.dck -text res/quest/duels/Deadpool[!!-~]2.dck -text res/quest/duels/Deadpool[!!-~]3.dck -text diff --git a/res/quest/duels/Dead Girl 3.dck b/res/quest/duels/Dead Girl 3.dck new file mode 100644 index 00000000000..52d4f72d2c0 --- /dev/null +++ b/res/quest/duels/Dead Girl 3.dck @@ -0,0 +1,23 @@ +[duel] +[metadata] +Name=Dead Girl 3 +Title=Dead Girl +Difficulty=hard +Description=Mono B Zombie Infestation deck +Icon=Dead Girl.jpg +Deck Type=constructed +[main] +2 Ashen Ghoul +3 Ghastly Remains +2 Grave Defiler +3 Gravecrawler +2 Haakon, Stromgald Scourge +4 Lord of the Undead +1 Noxious Ghoul +4 Skirk Ridge Exhumer +4 Squee, Goblin Nabob +24 Swamp +4 Veilborn Ghoul +3 Vengeful Pharaoh +4 Zombie Infestation +[sideboard] From 13cc4555e254bf95f195f6787ae63f361f0af0e8 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 17:25:11 +0000 Subject: [PATCH 12/20] - Added the hard quest opponent Odysseus 3. --- .gitattributes | 1 + res/quest/duels/Odysseus 3.dck | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 res/quest/duels/Odysseus 3.dck diff --git a/.gitattributes b/.gitattributes index 1d13a7f0cdc..ee47b168415 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13043,6 +13043,7 @@ res/quest/duels/Oberon[!!-~]3.dck -text res/quest/duels/Odin[!!-~]1.dck -text res/quest/duels/Odin[!!-~]2.dck -text res/quest/duels/Odin[!!-~]3.dck -text +res/quest/duels/Odysseus[!!-~]3.dck -text res/quest/duels/Optimus[!!-~]Prime[!!-~]3.dck -text res/quest/duels/Oreius[!!-~]2.dck -text res/quest/duels/Oreius[!!-~]3.dck -text diff --git a/res/quest/duels/Odysseus 3.dck b/res/quest/duels/Odysseus 3.dck new file mode 100644 index 00000000000..5d7494a90e5 --- /dev/null +++ b/res/quest/duels/Odysseus 3.dck @@ -0,0 +1,37 @@ +[duel] +[metadata] +Name=Odysseus 3 +Title=Odysseus +Difficulty=hard +Description=Mono W Hate Bear deck +Icon=Odysseus.jpg +Deck Type=constructed +[main] +21 Plains +1 Karakas +1 Soul's Attendant +4 Dryad Militant +1 Icatian Javelineers +2 Thalia, Guardian of Thraben +1 Grand Abolisher +1 True Believer +1 Kataki, War's Wage +1 Leonin Relic-Warder +1 Samurai of the Pale Curtain +2 Knight of the White Orchid +2 Veteran Armorer +1 Kitchen Finks +4 Glowrider +4 Fiend Hunter +2 Mentor of the Meek +1 Mirran Crusader +1 Silverblade Paladin +1 Soltari Champion +1 Linvala, Keeper of Silence +1 Angel of Jubilation +1 Celestial Crusader +1 Loxodon Gatekeeper +1 Hero of Bladehold +1 Crovax, Ascendant Hero +1 Elesh Norn, Grand Cenobite +[sideboard] From 72d38b34a3fcbb0916948651242b7c681e1fe732 Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Fri, 22 Mar 2013 18:16:38 +0000 Subject: [PATCH 13/20] Thread-related routines moved from FControl to FThreads --- .gitattributes | 2 + src/main/java/forge/FThreads.java | 109 ++++++++++++++++++ .../card/cardfactory/CardStorageReader.java | 6 +- src/main/java/forge/control/FControl.java | 26 ----- .../java/forge/control/input/InputLockUI.java | 18 +++ src/main/java/forge/gui/GuiUtils.java | 21 ---- .../java/forge/gui/toolbox/FProgressBar.java | 6 +- src/main/java/forge/gui/toolbox/FSkin.java | 5 +- src/main/java/forge/model/FModel.java | 4 +- 9 files changed, 140 insertions(+), 57 deletions(-) create mode 100644 src/main/java/forge/FThreads.java create mode 100644 src/main/java/forge/control/input/InputLockUI.java diff --git a/.gitattributes b/.gitattributes index ee47b168415..3ad89dd1e53 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13699,6 +13699,7 @@ src/main/java/forge/Command.java svneol=native#text/plain src/main/java/forge/CommandList.java svneol=native#text/plain src/main/java/forge/Constant.java svneol=native#text/plain src/main/java/forge/CounterType.java svneol=native#text/plain +src/main/java/forge/FThreads.java -text src/main/java/forge/GameEntity.java -text src/main/java/forge/GameLog.java -text src/main/java/forge/ImageCache.java svneol=native#text/plain @@ -14083,6 +14084,7 @@ src/main/java/forge/control/input/InputAttack.java svneol=native#text/plain src/main/java/forge/control/input/InputBlock.java svneol=native#text/plain src/main/java/forge/control/input/InputCleanup.java svneol=native#text/plain src/main/java/forge/control/input/InputControl.java svneol=native#text/plain +src/main/java/forge/control/input/InputLockUI.java -text src/main/java/forge/control/input/InputMulligan.java svneol=native#text/plain src/main/java/forge/control/input/InputPassPriority.java svneol=native#text/plain src/main/java/forge/control/input/InputPayDiscardCost.java -text diff --git a/src/main/java/forge/FThreads.java b/src/main/java/forge/FThreads.java new file mode 100644 index 00000000000..f35a94923bd --- /dev/null +++ b/src/main/java/forge/FThreads.java @@ -0,0 +1,109 @@ +package forge; + +import java.lang.reflect.InvocationTargetException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import javax.swing.SwingUtilities; + +import forge.control.input.InputLockUI; + +/** + * TODO: Write javadoc for this type. + * + */ +public class FThreads { + + static { + System.out.printf("(FThreads static ctor): Running on a machine with %d cpu core(s)%n", Runtime.getRuntime().availableProcessors() ); + } + + private final static ExecutorService threadPool = Executors.newCachedThreadPool(); + public static ExecutorService getCachedPool() { + return threadPool; + } + + // This pool is designed to parallel CPU or IO intensive tasks like parse cards or download images, assuming a load factor of 0.5 + public final static ExecutorService getComputingPool(float loadFactor) { + return Executors.newFixedThreadPool((int)(Runtime.getRuntime().availableProcessors() / (1-loadFactor))); + } + + public static boolean isMultiCoreSystem() { + return Runtime.getRuntime().availableProcessors() > 1; + } + + /** Checks if calling method uses event dispatch thread. + * Exception thrown if method is on "wrong" thread. + * A boolean is passed to indicate if the method must be EDT or not. + * + * @param methodName   String, part of the custom exception message. + * @param mustBeEDT   boolean: true = exception if not EDT, false = exception if EDT + */ + public static void checkEDT(final String methodName, final boolean mustBeEDT) { + boolean isEDT = SwingUtilities.isEventDispatchThread(); + if ( isEDT != mustBeEDT ) { + String modalOperator = mustBeEDT ? " must be" : " may not be"; + throw new IllegalStateException( methodName + modalOperator + " accessed from the event dispatch thread."); + } + } + + /** + * TODO: Write javadoc for this method. + * @param runnable + */ + public static void invokeInEDT(Runnable runnable) { + SwingUtilities.invokeLater(runnable); + } + + /** + * Invoke the given Runnable in an Event Dispatch Thread and wait for it to + * finish; but try to use SwingUtilities.invokeLater instead whenever + * feasible. + * + * Exceptions generated by SwingUtilities.invokeAndWait (if used), are + * rethrown as RuntimeExceptions. + * + * @param proc + * the Runnable to run + * @see javax.swing.SwingUtilities#invokeLater(Runnable) + */ + public static void invokeInEDTAndWait(final Runnable proc) { + if (SwingUtilities.isEventDispatchThread()) { + // Just run in the current thread. + proc.run(); + } else { + try { + SwingUtilities.invokeAndWait(proc); + } catch (final InterruptedException exn) { + throw new RuntimeException(exn); + } catch (final InvocationTargetException exn) { + throw new RuntimeException(exn); + } + } + } + + + public static void invokeInNewThread(Runnable proc) { + invokeInNewThread(proc, false); + } + + private final static InputLockUI inpuptLock = new InputLockUI(); + public static void invokeInNewThread(final Runnable proc, boolean lockUI) { + Runnable toRun = proc; + if( lockUI ) { + // checkEDT("FThreads.invokeInNewthread", true) + Singletons.getModel().getMatch().getInput().setInput(inpuptLock); + toRun = new Runnable() { + @Override + public void run() { + proc.run(); + // may try special unlock method here + Singletons.getModel().getMatch().getInput().resetInput(); + } + }; + } + + getCachedPool().execute(toRun); + } + +} diff --git a/src/main/java/forge/card/cardfactory/CardStorageReader.java b/src/main/java/forge/card/cardfactory/CardStorageReader.java index e75d1b2fc24..d284f15e64b 100644 --- a/src/main/java/forge/card/cardfactory/CardStorageReader.java +++ b/src/main/java/forge/card/cardfactory/CardStorageReader.java @@ -39,9 +39,9 @@ import javax.swing.SwingUtilities; import org.apache.commons.lang.time.StopWatch; +import forge.FThreads; import forge.card.CardRules; import forge.card.CardRulesReader; -import forge.control.FControl; import forge.error.BugReporter; import forge.gui.toolbox.FProgressBar; import forge.util.FileUtil; @@ -62,7 +62,7 @@ public class CardStorageReader { /** Default charset when loading from files. */ public static final String DEFAULT_CHARSET_NAME = "US-ASCII"; - final private boolean useThreadPool = FControl.isMultiCoreSystem(); + final private boolean useThreadPool = FThreads.isMultiCoreSystem(); final private int NUMBER_OF_PARTS = 25; final private CountDownLatch cdl = new CountDownLatch(NUMBER_OF_PARTS); @@ -209,7 +209,7 @@ public class CardStorageReader { try { if ( useThreadPool ) { - final ExecutorService executor = FControl.getComputingPool(0.5f); + final ExecutorService executor = FThreads.getComputingPool(0.5f); final List>> parts = executor.invokeAll(tasks); executor.shutdown(); cdl.await(); diff --git a/src/main/java/forge/control/FControl.java b/src/main/java/forge/control/FControl.java index c12b26f0b37..c6922f5cc6e 100644 --- a/src/main/java/forge/control/FControl.java +++ b/src/main/java/forge/control/FControl.java @@ -25,9 +25,6 @@ import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.io.File; import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - import javax.swing.ImageIcon; import javax.swing.JLayeredPane; import javax.swing.SwingUtilities; @@ -85,14 +82,8 @@ public enum FControl { DRAFTING_PROCESS } - private final ExecutorService threadPool = Executors.newCachedThreadPool(); - private final SoundSystem soundSystem = new SoundSystem(); - - static { - System.out.printf("(FControl static ctor): Running on a machine with %d cpu core(s)%n", Runtime.getRuntime().availableProcessors() ); - } /** *

* FControl. @@ -317,21 +308,4 @@ public enum FControl { public SoundSystem getSoundSystem() { return soundSystem; } - - public ExecutorService getThreadPool() { - return threadPool; - } - - // This pool is designed to parallel CPU or IO intensive tasks like parse cards or download images, assuming a load factor of 0.5 - public final static ExecutorService getComputingPool(float loadFactor) { - return Executors.newFixedThreadPool((int)(Runtime.getRuntime().availableProcessors() / (1-loadFactor))); - } - - /** - * TODO: Write javadoc for this method. - * @return - */ - public static boolean isMultiCoreSystem() { - return Runtime.getRuntime().availableProcessors() > 1; - } } diff --git a/src/main/java/forge/control/input/InputLockUI.java b/src/main/java/forge/control/input/InputLockUI.java new file mode 100644 index 00000000000..cd76856a653 --- /dev/null +++ b/src/main/java/forge/control/input/InputLockUI.java @@ -0,0 +1,18 @@ +package forge.control.input; + +import forge.gui.match.CMatchUI; +import forge.view.ButtonUtil; + +/** + * TODO: Write javadoc for this type. + * + */ +public class InputLockUI extends Input { + private static final long serialVersionUID = 5777143577098597374L; + + public void showMessage() { + ButtonUtil.disableAll(); + CMatchUI.SINGLETON_INSTANCE.showMessage("Waiting for actions..."); + } + +} diff --git a/src/main/java/forge/gui/GuiUtils.java b/src/main/java/forge/gui/GuiUtils.java index c93d287bff5..e8662c774cd 100644 --- a/src/main/java/forge/gui/GuiUtils.java +++ b/src/main/java/forge/gui/GuiUtils.java @@ -31,7 +31,6 @@ import java.util.List; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.KeyStroke; -import javax.swing.SwingUtilities; import forge.Card; import forge.gui.match.VMatchUI; @@ -89,26 +88,6 @@ public final class GuiUtils { return ttf; } - /** Checks if calling method uses event dispatch thread. - * Exception thrown if method is on "wrong" thread. - * A boolean is passed to indicate if the method must be EDT or not. - * - * @param methodName   String, part of the custom exception message. - * @param mustBeEDT   boolean: true = exception if not EDT, false = exception if EDT - */ - public static void checkEDT(final String methodName, final boolean mustBeEDT) { - boolean isEDT = SwingUtilities.isEventDispatchThread(); - - if (!isEDT && mustBeEDT) { - throw new IllegalStateException( - methodName + " must be accessed from the event dispatch thread."); - } - else if (isEDT && !mustBeEDT) { - throw new IllegalStateException( - methodName + " may not be accessed from the event dispatch thread."); - } - } - /** * Clear all visually highlighted card panels on the battlefield. */ diff --git a/src/main/java/forge/gui/toolbox/FProgressBar.java b/src/main/java/forge/gui/toolbox/FProgressBar.java index bff0f133454..22015d5d7e0 100644 --- a/src/main/java/forge/gui/toolbox/FProgressBar.java +++ b/src/main/java/forge/gui/toolbox/FProgressBar.java @@ -5,7 +5,7 @@ import java.util.Date; import javax.swing.JProgressBar; import javax.swing.SwingUtilities; -import forge.gui.GuiUtils; +import forge.FThreads; /** * A simple progress bar component using the Forge skin. @@ -37,7 +37,7 @@ public class FProgressBar extends JProgressBar { * @param s0   A description to prepend before statistics. */ public void setDescription(final String s0) { - GuiUtils.checkEDT("FProgressBar$setDescription", true); + FThreads.checkEDT("FProgressBar$setDescription", true); this.desc = s0; this.setString(s0); } @@ -77,7 +77,7 @@ public class FProgressBar extends JProgressBar { /** Resets the various values required for this class. Must be called from EDT. */ public void reset() { - GuiUtils.checkEDT("FProgressBar$reset", true); + FThreads.checkEDT("FProgressBar$reset", true); this.setIndeterminate(true); this.setValue(0); this.tempVal = 0; diff --git a/src/main/java/forge/gui/toolbox/FSkin.java b/src/main/java/forge/gui/toolbox/FSkin.java index 12d707febad..88f723e3f15 100644 --- a/src/main/java/forge/gui/toolbox/FSkin.java +++ b/src/main/java/forge/gui/toolbox/FSkin.java @@ -37,6 +37,7 @@ import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.border.LineBorder; +import forge.FThreads; import forge.gui.GuiUtils; import forge.view.FView; @@ -419,7 +420,7 @@ public enum FSkin { */ public static void loadLight(final String skinName) { // No need for this method to be loaded while on the EDT. - GuiUtils.checkEDT("FSkin$constructor", false); + FThreads.checkEDT("FSkin$constructor", false); // Non-default (preferred) skin name and dir. FSkin.preferredName = skinName.toLowerCase().replace(' ', '_'); @@ -479,7 +480,7 @@ public enum FSkin { */ public static void loadFull() { // No need for this method to be loaded while on the EDT. - GuiUtils.checkEDT("FSkin$load", false); + FThreads.checkEDT("FSkin$load", false); // Preferred skin name must be called via loadLight() method, // which does some cleanup and init work. diff --git a/src/main/java/forge/model/FModel.java b/src/main/java/forge/model/FModel.java index 56a9f31bd40..5a40205d8e5 100644 --- a/src/main/java/forge/model/FModel.java +++ b/src/main/java/forge/model/FModel.java @@ -27,6 +27,7 @@ import java.util.List; import forge.Constant; import forge.Constant.Preferences; +import forge.FThreads; import forge.card.BoosterData; import forge.card.CardBlock; import forge.card.CardRulesReader; @@ -43,7 +44,6 @@ import forge.game.MatchController; import forge.game.limited.GauntletMini; import forge.game.player.LobbyPlayer; import forge.gauntlet.GauntletData; -import forge.gui.GuiUtils; import forge.item.CardDb; import forge.properties.ForgePreferences; import forge.properties.ForgePreferences.FPref; @@ -161,7 +161,7 @@ public enum FModel { this.loadDynamicGamedata(); // Loads all cards (using progress bar). - GuiUtils.checkEDT("CardFactory$constructor", false); + FThreads.checkEDT("CardFactory$constructor", false); final CardStorageReader reader = new CardStorageReader(NewConstants.CARD_DATA_DIR, true); try { // this fills in our map of card names to Card instances. From 51d607ff1ee5daee82338c942ce07d1be2cfde45 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 22 Mar 2013 21:42:41 +0000 Subject: [PATCH 14/20] - Added Whipkeeper. --- .gitattributes | 1 + res/cardsfolder/w/whipkeeper.txt | 9 +++++++++ src/main/java/forge/Card.java | 8 ++++++++ .../java/forge/card/cardfactory/CardFactoryUtil.java | 4 ++++ 4 files changed, 22 insertions(+) create mode 100644 res/cardsfolder/w/whipkeeper.txt diff --git a/.gitattributes b/.gitattributes index 3ad89dd1e53..91bccd238fc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12045,6 +12045,7 @@ res/cardsfolder/w/whip_spine_drake.txt svneol=native#text/plain res/cardsfolder/w/whip_vine.txt svneol=native#text/plain res/cardsfolder/w/whipcorder.txt svneol=native#text/plain res/cardsfolder/w/whipflare.txt svneol=native#text/plain +res/cardsfolder/w/whipkeeper.txt -text res/cardsfolder/w/whiplash_trap.txt svneol=native#text/plain res/cardsfolder/w/whipstitched_zombie.txt svneol=native#text/plain res/cardsfolder/w/whiptail_moloch.txt svneol=native#text/plain diff --git a/res/cardsfolder/w/whipkeeper.txt b/res/cardsfolder/w/whipkeeper.txt new file mode 100644 index 00000000000..8075cae1f21 --- /dev/null +++ b/res/cardsfolder/w/whipkeeper.txt @@ -0,0 +1,9 @@ +Name:Whipkeeper +ManaCost:2 R R +Types:Creature Dwarf +PT:1/1 +A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X | References$ X | SpellDescription$ CARDNAME deals damage to target creature equal to the damage already dealt to it this turn. +SVar:X:Targeted$TotalDamageReceivedThisTurn +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/whipkeeper.jpg +Oracle:{T}: Whipkeeper deals damage to target creature equal to the damage already dealt to it this turn. diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index d4f8fd3e7c8..3c7b330cc7b 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -7675,6 +7675,14 @@ public class Card extends GameEntity implements Comparable { this.receivedDamageFromThisTurn.clear(); } + public final int getTotalDamageRecievedThisTurn() { + int total = 0; + for (int damage : this.receivedDamageFromThisTurn.values()) { + total += damage; + } + return total; + } + /** *

* addDealtDamageToThisTurn. diff --git a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java index af7877e5ca3..981093bb98d 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java @@ -1537,6 +1537,10 @@ public class CardFactoryUtil { return CardFactoryUtil.doXMath(c.getTotalDamageDoneBy(), m, c); } + if (sq[0].equals("TotalDamageReceivedThisTurn")) { + return CardFactoryUtil.doXMath(c.getTotalDamageRecievedThisTurn(), m, c); + } + // Count$YourPoisonCounters if (sq[0].contains("YourPoisonCounters")) { return CardFactoryUtil.doXMath(cardController.getPoisonCounters(), m, c); From 7a036a7df271b34aeda6df6706fd813fc59956ff Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 23 Mar 2013 00:41:30 +0000 Subject: [PATCH 15/20] - Fixing Quietus Spike description --- res/cardsfolder/q/quietus_spike.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/cardsfolder/q/quietus_spike.txt b/res/cardsfolder/q/quietus_spike.txt index 35c4d63459f..edd4d9a0a1d 100644 --- a/res/cardsfolder/q/quietus_spike.txt +++ b/res/cardsfolder/q/quietus_spike.txt @@ -2,7 +2,7 @@ Name:Quietus Spike ManaCost:3 Types:Artifact Equipment K:Equip 3 -S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Deathtouch | Description$ Equipped creature has deathtouch. Whenever equipped creature deals combat damage to a player, that player loses half his or her life, rounded up. +S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Deathtouch | Description$ Equipped creature has deathtouch. T:Mode$ DamageDone | ValidSource$ Creature.EquippedBy | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigLoseLifeOpp | TriggerDescription$ Whenever equipped creature deals combat damage to a player, that player loses half his or her life, rounded up. SVar:TrigLoseLifeOpp:AB$ LoseLife | Cost$ 0 | Defined$ TriggeredTarget | LifeAmount$ QuietusX | References$ QuietusX SVar:QuietusX:TriggeredTarget$LifeTotal/HalfUp From c6d461fe14d61455335338a58dccb00d34c60767 Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 23 Mar 2013 02:37:02 +0000 Subject: [PATCH 16/20] - Convert Catastrophe to Generic choice --- res/cardsfolder/c/catastrophe.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/res/cardsfolder/c/catastrophe.txt b/res/cardsfolder/c/catastrophe.txt index cbd8f71d2a2..dba495088a2 100644 --- a/res/cardsfolder/c/catastrophe.txt +++ b/res/cardsfolder/c/catastrophe.txt @@ -1,8 +1,9 @@ Name:Catastrophe ManaCost:4 W W Types:Sorcery -A:SP$ DestroyAll | Cost$ 4 W W | ValidCards$ Land | SpellDescription$ Destroy all lands. -A:SP$ DestroyAll | Cost$ 4 W W | ValidCards$ Creature | NoRegen$ True | SpellDescription$ Destroy all creatures. Creatures destroyed this way can't be regenerated. +A:SP$ GenericChoice | Cost$ 4 W W | Choices$ DBKillLand,DBKillCreatures | Defined$ You | StackDescription$ SpellDescription | SpellDescription$ Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated. +SVar:DBKillLand:DB$ DestroyAll | ValidCards$ Land | ChoiceDescription$ Destroy all lands. +SVar:DBKillCreatures:DB$ DestroyAll | ValidCards$ Creature | NoRegen$ True | ChoiceDescription$ Destroy all creatures. They can't be regenerated. SVar:Picture:http://www.wizards.com/global/images/magic/general/catastrophe.jpg Oracle:Destroy all lands or all creatures. Creatures destroyed this way can't be regenerated. SetInfo:USG Rare \ No newline at end of file From 37a77f3a308653dab6ebd4cfb872d8f02e559d95 Mon Sep 17 00:00:00 2001 From: swordshine Date: Sat, 23 Mar 2013 03:32:21 +0000 Subject: [PATCH 17/20] - Added Sanctum Guardian --- .gitattributes | 1 + res/cardsfolder/s/sanctum_guardian.txt | 14 ++++++++++++++ res/cardsfolder/w/whipkeeper.txt | 1 + 3 files changed, 16 insertions(+) create mode 100644 res/cardsfolder/s/sanctum_guardian.txt diff --git a/.gitattributes b/.gitattributes index 91bccd238fc..1951068d42c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8941,6 +8941,7 @@ res/cardsfolder/s/sanctimony.txt svneol=native#text/plain res/cardsfolder/s/sanctuary_cat.txt -text res/cardsfolder/s/sanctum_custodian.txt svneol=native#text/plain res/cardsfolder/s/sanctum_gargoyle.txt svneol=native#text/plain +res/cardsfolder/s/sanctum_guardian.txt -text res/cardsfolder/s/sanctum_plowbeast.txt svneol=native#text/plain res/cardsfolder/s/sand_silos.txt svneol=native#text/plain res/cardsfolder/s/sand_squid.txt svneol=native#text/plain diff --git a/res/cardsfolder/s/sanctum_guardian.txt b/res/cardsfolder/s/sanctum_guardian.txt new file mode 100644 index 00000000000..f2fc3fc12ad --- /dev/null +++ b/res/cardsfolder/s/sanctum_guardian.txt @@ -0,0 +1,14 @@ +Name:Sanctum Guardian +ManaCost:1 W W +Types:Creature Human Cleric +PT:1/4 +A:AB$ ChooseSource | Cost$ Sac<1/CARDNAME> | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. +SVar:DBEffect:DB$ Effect | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player to prevent damage to | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Targeted | ImprintCards$ Remembered | SVars$ RPreventNextFromSource,ExileEffect | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsImprinted | ValidTarget$ Card.IsRemembered,Player.IsRemembered | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time the chosen source deals damage to the targeted creature or player, prevent that damage. +SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/sanctum_guardian.jpg +Oracle:Sacrifice Sanctum Guardian: The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. +SetInfo:9ED Uncommon +SetInfo:USG Uncommon \ No newline at end of file diff --git a/res/cardsfolder/w/whipkeeper.txt b/res/cardsfolder/w/whipkeeper.txt index 8075cae1f21..8269dbe2acd 100644 --- a/res/cardsfolder/w/whipkeeper.txt +++ b/res/cardsfolder/w/whipkeeper.txt @@ -7,3 +7,4 @@ SVar:X:Targeted$TotalDamageReceivedThisTurn SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/whipkeeper.jpg Oracle:{T}: Whipkeeper deals damage to target creature equal to the damage already dealt to it this turn. +SetInfo:ODY Uncommon \ No newline at end of file From 9cd185d902d0cc8691be260502fca729327c5877 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 23 Mar 2013 13:10:09 +0000 Subject: [PATCH 18/20] - Added a fluff piece to the changes.txt file. - Added new card names to changes.txt. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 0a0c2b02b66..412ade5923b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,6 +48,10 @@ The display of clones and copied cards is now a matter of user preference. A use Flippable cards -- cards that have an alternate card printed upside-down at the bottom -- will now flip their appearance on the battlefield when in a flipped state. They are now also flippable in the card viewer by clicking on the card image, just like double-sided "transform" cards have been. When flipped this way, the details of the flipped side can be examined in the Card Details oracle text. +- High Quality Booster Pictures - +Forge will now download high quality booster pictures. If you are interested in these high quality booster pictures, then you should delete the pictures that are found in your /pics/boosters/ directory. Then download the new pictures by using the Home View -> Game Settings -> Content Downloaders -> Download Quest Images button. + + --------- New Cards --------- @@ -71,6 +75,9 @@ Infinite Reflection Laccolith Rig Paroxysm Essence Leak +Mistform Warchief +Whipkeeper +Sanctum Guardian ---------- From ec359d32d143651d1bf6fb5ca9cfb3f4e7b984c4 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 23 Mar 2013 16:55:30 +0000 Subject: [PATCH 19/20] - Updated the README.txt file. --- README.txt | 130 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 52 deletions(-) diff --git a/README.txt b/README.txt index ab4a6cff6df..ee69bfe4185 100644 --- a/README.txt +++ b/README.txt @@ -1,44 +1,27 @@ -Installation and Updating to a newer version Instructions: +Installation Instructions: +-------------------------- -We have changed the archival format used for the Forge distributions from ".zip" to ".tar.bz2". There are utilities for Windows, Mac OS and the various *nix's that can be used to decompress these ".tar.bz2" archives. We recommend that you decompress the Forge archive into a new and unused folder. +The archive format used for the Forge distribution is ".tar.bz2". There are utilities for Windows, Mac OS and the various *nix's that can be used to extract/decompress these ".tar.bz2" archives. We recommend that you extract/decompress the Forge archive into a new and unused folder. -Once the Forge archive has been decompressed you should then be able to launch Forge by using the included launcher. Launching Forge by double clicking on the forge jar file will cause a java heap space error. Forge's memory requirements have increased over time and the launchers increase the java heap space available to Forge. +Some people use the Windows application 7zip. This utility can be found at http://www.7-zip.org/download.html. Mac users can double click on the archive and the application Archive Utility will launch and extract the archive. Mac users do not need to download a separate utility. -After downloading and installing a newer version of Forge you may want to move certain files from the older version over to the newer version of Forge. You should maintain your older version of Forge as a back up in case you make a mistake while installing the newer version. +Once the Forge archive has been decompressed you should then be able to launch Forge by using the included launcher. Launching Forge by double clicking on the forge jar file in the past caused a java heap space error. Forge's memory requirements have increased over time and the launchers increase the java heap space available to Forge. Currently you can launch Forge by double clicking on the forge jar file without a java heap space error but this is likely to change as we add in more sounds, icons, etc. -1) The /res/pics/ folder contains the card pictures, icons and token pictures (mtg card tokens and quest pet/plant tokens). Please note that the /res/images/icons/ folder was moved back to the /res/pics/ folder. The forge /res/images/ folder no longer is used as of version 1.2.8. -The /res/pics/icons/ folder contains the quest opponent icons, small quest pet/plant icons (non-tokens) and some icons that are used by forge's quest mode. While several of these pictures ship with the forge archive most of them have to be downloaded using the Home screen -> Utilities -> Download Quest Images command. +Updating to a newer version Instructions: +----------------------------------------- -2) The /res/pics_product/ folder contains four folders which in turn contain pictures for the booster, fatpacks, precons and tournamentpacks products. - -3) The /res/decks/ folder contains your deck files. You should copy over the files with the extension ".dck". In version 1.2.4 and later the /decks/ folder contains 4 subdirectories named constructed, cube, draft and sealed. - -You can place your deck files from an earlier version of Forge into the /res/decks/ folder. When you next launch Forge these decks will be converted to a newer format and will be moved into the proper subdirectory. - -4) The /res/draft/ and the /res/sealed/ folders contains files for the sealed and draft mode. You should copy over your files inside of these folders that end in the extension ".draft" or ".zsealed". - -5) The /res/quest/data folder contains your questData files. These files include all of the information for your current quests. You will not be able to continue your quests in a newer version of Forge unless you copy over the your quest data files. These files have a ".dat" extension. You can now have multiple ongoing quests at the same time. - -6) The Forge /res/preferences/ folder contains the preference files named "forge.preferences" and "editor.preferences". You should also move a copy of these files over to the newer version. The /res/preferences/ folder was added to version 1.2.8. The main.properties file was also moved to the /res/preferences/ folder. - -7) The /res/layouts/ folder contains a file named "match_preferred.xml". This file contains information that forge uses when setting the layout for the battlefield display. The match_default.xml file contains the default layout for the battlefield. - -The editor_preferred.xml file contains information that forge uses when setting the layout for the deck editor display. The editor_default.xml file contains the default layout for the deck editor display. +The instructions that were found in this section are now out of date. Current instructions can be found in the CHANGES.txt and forge.profile.properties.example files. Advanced Updating to a newer version Instructions: +-------------------------------------------------- -Another option for you to consider is to move some of the files/folders listed above to a different location on your hard drive. Then edit the "main.properties" file in the /res/ folder with any basic text editor. At the "image/base--file=pics" and "image/token--file=pics/tokens". Just change these to absolute paths of your choice eg: - -image/base--file=F:/Personal/CardForge/Low Resolution Images - -image/token--file=F:/Personal/CardForge/Low Resolution Images/tokens - -and do the same for "decks-dir--file=decks", "quest--properties=quest/quest.properties" and whatever else you might usually copy from version to version. Try to avoid folders that are usually updated in the releases. Just remember to use forward slashes for the pathnames. Then just copy the "main.properties" file from version to version. Occasionally compare it to the release version to make sure nothing else has changed, and if it has just replace the adjusted lines instead. +The instructions that were found in this section are now out of date. Current instructions can be found in the CHANGES.txt and forge.profile.properties.example files. The Mac OS application version: +------------------------------- We have packaged the Forge BETA version as a Mac OS application. You can double click the Forge.app icon to launch the forge application on your Apple computer running Mac OS. This application will automatically increase the java heap space memory for you as it launches. This version does not require the forge.command file and it does not need to start the Terminal application as part of the start up process. @@ -58,19 +41,13 @@ Please note that the issue is most likely caused by Mountain Lion's Gatekeeper f Picture location info: +---------------------- -The quest opponent icons jpg picture files go into your /res/images/icons folder. Please note that the /res/pics/icons/ folder was moved out of this folder and placed in the /res/images/ folder. - -The quest booster package jpg picture files go into your /res/pics/booster folder. The card token jpg picture files go into your /res/pics/tokens folder. - -The quest pets archive contains two subdirectories named "icons" and "tokens". Place the files located inside of the /icons/ folder into the /res/images/icons/ folder. Place the files located inside of the /tokens/ folder into the /res/pics/tokens/ folder. - -Your forge game may not come with one or more of these three folders as part of the forge archive. In this case you should use your computer's OS file system to create the proper folders with the correct names and they must be located inside of the /res/pics/ folder. - -The in-game downloaders will grab an image for face-down (Morph) cards on the battlefield. To use a custom image, place a "morph.jpg" file in your res/pics/tokens directory. +The instructions that were found in this section are now out of date. Current instructions can be found in the CHANGES.txt and forge.profile.properties.example files. Launching Forge and Memory Issues: +---------------------------------- In the past, some people noticed java heap space errors and lengthy pauses. The memory requirements for Forge have increased over time. The default setting on your computer for the java heap space may not be enough to prevent the above problems. @@ -82,10 +59,11 @@ The script file must be located in the same folder as the Forge jar file and the If you have a low end machine you may find that the scripts above will prevent java heap space errors but will find that Forge still runs very slowly at times. -In this case you can try the following. Remove the background jpg picture from /res/images/ui/ folder. You can try using low quality pictures rather than the high quality pictures. Or you can try removing all of the jpg pictures from the pics folder. +In this case you can try the following. You can try using low quality pictures rather than the high quality pictures. Or you can try removing all of the jpg pictures from the pics folder. Forge failed to launch: +----------------------- If you're trying to run Forge for the first time, but it doesn't open up, you can try the following to get some output and help yourself/us solve the problem. @@ -114,47 +92,59 @@ Now you will probably see some sort of Error in the console. the first few lines The Card Pictures disappear when you restart Forge: +--------------------------------------------------- if you're running Windows 7, make sure you're running the program as an admin, otherwise no changes will be made to your system (nothing is saved). In Windows 7, Forge may be happier when run from somewhere in the My Documents structure, (they call them Libraries now???) or from another partition other than C:. The user has little permission to do much on the system drive. Java Issues: +------------ -Some people that are using an early version of Java 7 under the Windows OS have reported errors that state "Split must have > 2 children". Anyone having this sort of problem should either upgrade Java 7 to a newer version or de-install Java 7 and install Java 6 instead. +Forge is likely to be compatible with Java 7 at this time. Some people have used forge with Java 7 and have not reported any problems that are related to Java 7. If you would like to upgrade to Java 7 and have held off because of Forge then you may upgrade as we do not think that it will cause an incompatibility type of problem. We will continue to try to maintain compatibility with Java 6 for the foreseeable future. Forge requires Java 6 and will not run if you have an earlier version of Java. You will need to update to Java 6. Card Picture Issues: +-------------------- The server which contained the high quality card pictures is now off line and these high quality card pictures are no longer available as a download from within the forge application. We apologize, but the current dev team do not maintain this server and this matter is out of our control. Some people are choosing to re-download all of the low quality card and card set pictures when they install the next version of forge. This consumes large amounts of bandwidth needlessly. Please be careful! -When you install the new version of Forge, find the forge/res/pics/ folder. Either move it or copy and paste the pics folder over to the recently installed new version of forge. This way you will only have to download the pictures for the new cards. + +The instructions that were found in this section are now out of date. Current instructions can be found in the CHANGES.txt and forge.profile.properties.example files. + + +When you install a new version of Forge, please follow the instructions that can be found in the CHANGES.txt and forge.profile.properties.example files. This will allow you to reuse your previous picture files and other user data files. This way you will only have to download the pictures for the new cards. This should save enough bandwidth that everyone will be able to download the new set pictures from the cardforge server. We do appreciate your efforts to save bandwidth. Thank you. Reporting Bugs: +--------------- To report a bug with an official beta release, please follow the instructions at http://www.slightlymagic.net/wiki/Forge#I_think_I_found_a_bug_in_Forge._What_do_I_do.3F . -To report a bug (1) with an alpha test, (2) with a nightly build, (3) with something compiled from the official Forge software repository, or (4) with the leading edge (formerly "SVN Bug Reports"), please do not submit your bugs to the forum. Instead, please follow the instructions at http://www.slightlymagic.net/wiki/How_to_File_a_Bug_Report_with_Mantis . +To report a bug (1) with an alpha test, (2) with a nightly build, (3) with something compiled from the official Forge software repository, or (4) with the leading edge (formerly "SVN Bug Reports"), please do not submit your bugs to the forum. Instead, please follow the instructions at http://www.slightlymagic.net/wiki/How_to_File_a_Bug_Report_with_Mantis. +Forge will now allow you to upload a crash report to the Forge forum at CCGH. A new very hard tier category in Quest mode: +-------------------------------------------- You will notice a new very hard tier category for the opponent. As you change from the previous tier to the next tier (easy to medium, etc.) you will now notice that there is not an abrupt change over. There is now a mixture of decks from the previous tier and the next tier for you to chose from. When you win a match you will complete the advancement to the next tier. The Forge Booster Draft mode: +----------------------------- A significant re-write of the Booster Draft functionality has taken place. Draft from the Full card pool, sets/blocks or custom drafts (like cube). The AI will pick cards more intelligently, and builds decks from picked cards. Old method would pick cards for deck and then stop picking new cards. The developer mode: +------------------- The developer mode gives us a few new features. These new features will primarily interest the devs as it will now help to test out specific cards while testing combat code changes. You can turn on or off this mode at the Home View -> Game Settings -> Preferences -> Gameplay Options section. @@ -162,41 +152,49 @@ When turned on the battlefield will have a tab named "Dev Mode". There are a num New foil card image available: +------------------------------ Rob and Marc have worked together to add in a new feature which will overlay a card's image with a foil like film. A few random cards will have a foil like image in constructed mode games and possibly quest mode games. There is a check box on the Home View -> Game Settings -> Preferences view that you can use to turn this feature on or off. Informational icons overlays for cards on the battlefield: +---------------------------------------------------------- The Battlefield will now display three symbolic icons that will overlay creature cards. These icons are used to denote summoning sickness and whether a creature is attacking or blocking. Added additional icons that will be drawn over the cards in the battlefield for phasing and counters at a later date. The attack/block/phasing icons and counters will now also be shown on large cards, only casting cost will be omitted. Lands and tokens with different amounts/types of counters will no longer stack. Tokens with different summoning sickness will no longer stack. Lands that become creatures will now always be moved to the front row. Optional choice for abilities that are on the stack: +---------------------------------------------------- When a spell or an ability appears on the stack and it says "(OPTIONAL)" you can right-click it to decide if you want to always accept or to decline it. Multiple quest files: +--------------------- Multiple quest files are now supported. This allows you to start a new quest and give it a unique name, and it will not overwrite your previous quest game file. The new UI now uses tabbed panes: +--------------------------------- We now have a tab system for sub-menus in the home screen. Quest mode refactored to fit this tab system. It's now considerably easier to use - less cramped, less clicks, more functionality. The quest mode card shop: +------------------------- You can now buy PreCon decks, Starter packs, Tournament packs and Fat packs from the quest mode card shop. Player Avatar pictures: +----------------------- The UI has a few new features including the option to pick an avatar from a collection of pictures. This can be accessed from the Settings -> Avatars tab. The organizational structure of the /res/decks/ folder: +------------------------------------------------------- The organizational structure of the /res/decks/ folder has been improved and we now have these six subdirectories: @@ -209,8 +207,11 @@ The organizational structure of the /res/decks/ folder has been improved and we You can place your deck files from an earlier version of Forge into the /res/decks/ folder. When you next launch Forge these decks will be converted to a newer format and will be moved into the proper subdirectory. +Please not that your /decks/ directory no longer resides in you /res/ directory and has been moved to /decks/. + User-created themes for Forge's background, fonts, colors and icons: +-------------------------------------------------------------------- When you select a new skin in the Preferences view Forge should save the change to the preference file, quit and then automatically re-launch with the new skin displayed. During testing some people have noticed that Forge is not restarting on their computer and they have to re-launch Forge themselves. @@ -220,6 +221,7 @@ http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8449 The Battlefield UI: +------------------- The Battlefield UI has a new feature implemented which allows us to move and resize the panels to new places on the battlefield. This allows us to personalize the battlefield display to our own liking. You should try moving panels by clicking and dragging their tabs. @@ -227,21 +229,19 @@ If you do not like your efforts to personalize the battlefield display you can r The pets in quest mode: +----------------------- Some adjustments to the pets in quest mode were made. The quest mode plant wall's Deathtouch ability was deemed to be too strong against the AI's attack code and this ability was changed to Wither in this version. This includes a new pet. The dock tab has a new button labeled "Open Layout": +---------------------------------------------------- The dock now has a new button labeled "Open Layout" along with old button with original function "Revert Layout". Modifying the battlefield layout will result in your changes being saved to a file named "match_preferred.xml". You can copy and rename that file to share your layouts with other people. -The res/images/icons/ folder: - -The res/images/icons/ folder has been moved to res/pics/icons/. This folder holds the quest opponent icons, bazaar pets, and bazaar plants. If you have downloaded this content, it will still work, but the folder must be moved on your computer. - - The new Deck Editors: +--------------------- The work on the new UI is now finished and this version adds the new UI to the deck editors. We all would like to thank Doublestrike for his contributions to the new UI. @@ -256,6 +256,7 @@ The new deck editors include: Performance issues on low end machines: +--------------------------------------- Several people have noticed forge slowing down after playing a number of matches without quitting forge in between the matches that are played. The new UI may be involved somehow. We also hope to have this figured out and fixed in the near future. Please be patient in the meanwhile. A recent fix was implemented that should improve the slowdown problem somewhat. @@ -265,11 +266,13 @@ Some performance changes were made to Forge and it should now operate more quick A note about winning booster packs in quest mode: +------------------------------------------------- If you win a quest mode match, you get a booster pack for every 1 or 2 (default) Wins, depending on the difficulty level. If you lose and you are playing on easy mode, you get a booster pack every 1 (default) Loss. The new UI: +----------- The first step was to update the battlefield window. The second step was to update the New Game window (now named Home view). We got constructed mode and then quest modes working first. We got the draft and sealed modes working again afterwards. @@ -277,11 +280,13 @@ The work on the new UI is now for the most part finished. We should not expect m The new Alpha Strike button: +---------------------------- A new Alpha Strike button was added to the dock. The Dock is one of the tabs availble in the battlefield view. Using Forge with the new Mac OS Mountain Lion: +---------------------------------------------- If you update your OS to Apple OSX 10.8 Mountain Lion and try to launch a new version of forge that you will likely get a dialog which states "File is damaged and cannot be opened. Please move to trash." @@ -293,6 +298,7 @@ Please note that the issue is most likely caused by Mountain Lion's Gatekeeper f The Forge sealed deck mode: +--------------------------- Sealed Deck mode has had a complete rewrite. Full cardpool, block and custom modes are supported. Custom sealed files in the res/sealed folder are exactly the same as custom draft files, except the file extension ".sealed". @@ -304,11 +310,13 @@ Perhaps the most notable changes to the sealed deck mode are related to "fantasy The new Gauntlet mode: +---------------------- A new Gauntlet mode has been added. This mode gives you four options: Quick Gauntlet, Build A Gauntlet, Load Gauntlet and Gauntlet Contests. You can create a group of computer decks to play against by choosing either Custom user decks, Quest Decks, Fully random color decks or Semi-random theme decks. The new Variant mode (was named Multiplayer): +--------------------------------------------- A new multiplayer mode has also been added. You should be able to play against multiple AI opponents at this time. You should note that the current Archenemy mode does not use Schemes at this time. @@ -320,21 +328,25 @@ The older match layout files are incompatible with the new multiplayer mode. The The new damage dialog: +---------------------- The new damage dialog now uses the new UI. When choosing cards, sources, etc. using a list box: +---------------------------------------------------- -When choosing cards, sources, etc. using a list box, the currently selected card will now be visually highlighted on the playfield (to better distinguish between e.g. three different cards with the same name on the playfield). Now the visual highlighting of a card will also work when declaring the order of blockers. +When choosing cards, sources, etc. using a list box, the currently selected card will now be visually highlighted on the play field (to better distinguish between e.g. three different cards with the same name on the play field). Now the visual highlighting of a card will also work when declaring the order of blockers. Return to Ravnica Guild Sealed Deck mode: +----------------------------------------- Added Return to Ravnica Guild Sealed Deck mode. Start a new sealed deck game, choose "Block / Set" and then scroll down until you find "Return to Ravnica Guild Sealed (block)". Select that. From the "Choose Set Combination" menu, select the first option. You will be prompted twice to pick your guild (once for the promo cards, once for the actual booster - you should choose the same guild both times). After that you're ready to go. Targeting arrows are now available in the battlefield display: +-------------------------------------------------------------- The Targeting Overlay has been fixed and re-enabled. It now correctly shows the targeting arcs in cases when it previously showed them in the wrong direction. The match UI is properly refreshed when the targeting arcs are switched on/off. The defunct "mouseover-only" mode is currently disabled (it crashes Forge, difficult to fix). @@ -342,6 +354,7 @@ The visuals for targeting arrows has been improved and looks better, with an ada The new sound system: +--------------------- Forge now has a sound effect system in place. Several basic sounds are linked to the code now and will be enabled when "Enable Sounds" option is checked in the preferences. It supports WAV and AU file formats. @@ -387,23 +400,27 @@ All sounds use the event bus model now and are not called directly. The new Vanguard mode: +---------------------- We now have a Vanguard mode implemented. This is a work in progress. The older match layout files are incompatible with the new Vanguard mode. The original match_default.xml, match_preferred.xml and the match_preferred.xml saved to a different name files need to be deleted and can no longer be used. You can keep your editor_preferred.xml file. But you will have to setup your match view panels using the new match_default.xml file. The new Archenemy mode: +----------------------- Schemes have been added to the Archenemy mode. This is a work in progress and there may be a bug or two for us to find. Quest Worlds: +------------- -This version allows you to travel between the regular quest world and the other worlds (Shandalar, Ravnica, Jamuraa, more may be added in the future) to get different duel opponents and challenges. You will have to complete your current challenges before travelling or you will lose them. +This version allows you to travel between the regular quest world and the other worlds (Shandalar, Ravnica, Jamuraa, more may be added in the future) to get different duel opponents and challenges. You will have to complete your current challenges before traveling or you will lose them. -World-specific format enforcing and starting world selection are available. Something has to be done about locked (non-repeatabled) challenges so they do not end up locking other challenges in different worlds. +World-specific format enforcing and starting world selection are available. Something has to be done about locked (non-repeatable) challenges so they do not end up locking other challenges in different worlds. Forge now has sideboards for the human player: +---------------------------------------------- Sideboards have been implemented for Human players. We currently have: @@ -418,17 +435,20 @@ We don't yet have: * AI sideboarding. -The deck conformance/legality limitaion: +The deck conformance/legality limitation: +----------------------------------------- -The deck conformance/legality is now a user-togglable preference and is enabled by default. You no longer need to turn on dev mode to play an illegal deck. +The deck conformance/legality is now a user-toggable preference and is enabled by default. You no longer need to turn on dev mode to play an illegal deck. Using Forge on displays that are only 600 pixels tall or slightly larger: +------------------------------------------------------------------------- The "Sanctioned Format: Constructed" view should now be compatible with displays that are only 600 pixels tall. The deck list at 600 pixels tall should now display three lines of text rather than less than a single line of text. We are looking for help in finding additional sound files for the new sound feature: +------------------------------------------------------------------------------------ This version of forge includes a few sound files for the new sound effect system. While we have several sounds assigned to a few of the available events there are a number of events that do not yet have a assigned sound file. This should be considered a work in progress and we could use some help in finding interesting sounds that we can add to forge. @@ -444,6 +464,7 @@ http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8570 Notes about the second Quest World, Jamuraa: +-------------------------------------------- A second Quest World, Jamuraa, has been added to Forge. When playing Quest mode, it is now possible to 'Travel' between the regular Quest environment and the two Worlds, Shandalar and Jamuraa, both of which include special formats, opponents and challenges. Or you can start a new Quest in any of them. @@ -464,6 +485,7 @@ http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=9258 New Deck Editor features with improved Filters: +----------------------------------------------- Some work is being done on the various deck editors -- including the quest spell shop -- and we hope to add in additional features while improving the UI. Here is a quick tutorial on the new features: @@ -504,16 +526,19 @@ The Deck Editor has also gained some hotkey and context menu abilities. R-click The Game Log: +------------- Added a 'copy to clipboard' button on WinLose screen so players can easily copy the game log. -The UI more keyboard-friendly: +The UI is more keyboard-friendly: +--------------------------------- Work was also done on making the UI more keyboard-friendly. For example, the OK button should now stay focused during matches, so you can advance through the stages by hitting Enter without having to go over and click the button all the time. If you find the button is losing focus, please report it as a bug. Gatecrash Guild Sealed game mode: +--------------------------------- Gatecrash Guild Sealed game mode has been added. To use it, start a new Sealed Mode Game, select "Block / Set" and "Gatecrash Guild Sealed". Select the first (default) configuration in the "Choose Set Combination" dialog, and when asked to pick your boosters, choose the guild you want twice (once for the guild-specific booster, and then for the extra promo cards). @@ -521,5 +546,6 @@ The following cards are not included in the guild boosters of this game mode bec Our Lawyers Made Us Do This: +---------------------------- This product includes software developed by the Indiana University Extreme! Lab (http://www.extreme.indiana.edu/). From 4c2176b9b36113d8969c0783556734dd09841193 Mon Sep 17 00:00:00 2001 From: Sol Date: Sun, 24 Mar 2013 03:34:30 +0000 Subject: [PATCH 20/20] - Planeswalkers Loyalty will now be shown in the P/T label in CardDetailPanel. If a Planeswalker also has P/T both will be shown. --- res/cardsfolder/r/restrain.txt | 2 +- src/main/java/forge/gui/CardDetailPanel.java | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/res/cardsfolder/r/restrain.txt b/res/cardsfolder/r/restrain.txt index 22ac2004368..c3be5f4d212 100644 --- a/res/cardsfolder/r/restrain.txt +++ b/res/cardsfolder/r/restrain.txt @@ -2,7 +2,7 @@ Name:Restrain ManaCost:2 W Types:Instant A:SP$ Pump | Cost$ 2 W | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | IsCurse$ True | SubAbility$ DBDraw | SpellDescription$ Prevent all combat damage that would be dealt by target attacking creature this turn. Draw a card. -SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card. +SVar:DBDraw:DB$Draw | NumCards$ 1 SVar:Picture:http://www.wizards.com/global/images/magic/general/restrain.jpg Oracle:Prevent all combat damage that would be dealt by target attacking creature this turn.\nDraw a card. SetInfo:INV Common \ No newline at end of file diff --git a/src/main/java/forge/gui/CardDetailPanel.java b/src/main/java/forge/gui/CardDetailPanel.java index 539d123e34c..0f6741417b0 100644 --- a/src/main/java/forge/gui/CardDetailPanel.java +++ b/src/main/java/forge/gui/CardDetailPanel.java @@ -273,10 +273,28 @@ public class CardDetailPanel extends FPanel { this.typeLabel.setText("Creature"); } + StringBuilder ptText = new StringBuilder(); if (card.isCreature()) { - this.powerToughnessLabel.setText(card.getNetAttack() + " / " + card.getNetDefense()); + ptText.append(card.getNetAttack()).append(" / ").append(card.getNetDefense()); } + if (card.isPlaneswalker()) { + if (ptText.length() > 0) { + ptText.insert(0, "P/T: "); + ptText.append(" - ").append("Loy: "); + } else { + ptText.append("Loyalty: "); + } + + int loyalty = card.getCounters(CounterType.LOYALTY); + if (loyalty == 0) { + loyalty = card.getBaseLoyalty(); + } + ptText.append(loyalty); + } + + this.powerToughnessLabel.setText(ptText.toString()); + this.idLabel.setText("Card ID " + card.getUniqueNumber()); // fill the card text