From 3b5813ad1515e35d3d238b5d5d8baac5e9bc6991 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Mar 2013 13:21:16 +0000 Subject: [PATCH 1/8] - Added new card names to changes.txt. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index daa1fd0e820..092bb1a5221 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,6 +48,11 @@ Order // Chaos Pain // Suffering Spite // Malice Stand // Deliver +Boom // Bust +Crime // Punishment +Rise // Fall +Bound // Determined +Hit // Run New Phenomenons: From 744687ce886bec23be1162926354f4750b817965 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Mar 2013 15:39:42 +0000 Subject: [PATCH 2/8] - Fixed Crashing Boars. --- res/cardsfolder/c/crashing_boars.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/res/cardsfolder/c/crashing_boars.txt b/res/cardsfolder/c/crashing_boars.txt index 9ee56a0035b..a1a8ea3687c 100644 --- a/res/cardsfolder/c/crashing_boars.txt +++ b/res/cardsfolder/c/crashing_boars.txt @@ -1,7 +1,7 @@ Name:Crashing Boars -ManaCost:2 G -Types:Creature Snake Warrior -PT:1/3 +ManaCost:3 G G +Types:Creature Boar +PT:4/4 T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigChoose | TriggerDescription$ Whenever CARDNAME attacks, defending player chooses an untapped creature he or she controls. That creature blocks CARDNAME this turn if able. SVar:TrigChoose:AB$ ChooseCard | Cost$ 0 | Defined$ DefendingPlayer | Amount$ 1 | Choices$ Creature.untapped+DefenderCtrl | SubAbility$ DBMustBlock SVar:DBMustBlock:DB$ MustBlock | Defined$ ChosenCard | SpellDescription$ Target creature blocks CARDNAME this turn if able. From d34e00bd0011a613a26721c35c3db556f1149d8c Mon Sep 17 00:00:00 2001 From: Maxmtg Date: Fri, 8 Mar 2013 16:10:35 +0000 Subject: [PATCH 3/8] making isGameOver synchronized, isValid in InputProxy.java is also synchronized instead of being volatile --- .gitattributes | 1 + .../forge/game/GameInputUpdatesThread.java | 41 ++++++++++++++++++ src/main/java/forge/game/GameNew.java | 43 ------------------- src/main/java/forge/game/GameState.java | 4 +- src/main/java/forge/game/MatchController.java | 4 ++ src/main/java/forge/gui/InputProxy.java | 8 ++-- 6 files changed, 52 insertions(+), 49 deletions(-) create mode 100644 src/main/java/forge/game/GameInputUpdatesThread.java diff --git a/.gitattributes b/.gitattributes index 94a6f5830e9..8036e3a981a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14145,6 +14145,7 @@ src/main/java/forge/game/GameActionPlay.java -text src/main/java/forge/game/GameActionUtil.java svneol=native#text/plain src/main/java/forge/game/GameEndReason.java -text src/main/java/forge/game/GameFormat.java -text +src/main/java/forge/game/GameInputUpdatesThread.java -text src/main/java/forge/game/GameLossReason.java -text src/main/java/forge/game/GameNew.java -text src/main/java/forge/game/GameOutcome.java -text diff --git a/src/main/java/forge/game/GameInputUpdatesThread.java b/src/main/java/forge/game/GameInputUpdatesThread.java new file mode 100644 index 00000000000..ae3fb61336e --- /dev/null +++ b/src/main/java/forge/game/GameInputUpdatesThread.java @@ -0,0 +1,41 @@ +package forge.game; + +import forge.error.BugReporter; +import forge.gui.match.controllers.CMessage; + +/** + * TODO: Write javadoc for this type. + * + */ +public final class GameInputUpdatesThread extends Thread { + private final MatchController match; + private final GameState game; + private boolean wasChangedRecently; + + /** + * TODO: Write javadoc for Constructor. + * @param match + * @param game + */ + public GameInputUpdatesThread(MatchController match, GameState game) { + this.match = match; + this.game = game; + } + + public void run(){ + while(!game.isGameOver()) { + boolean needsNewInput = CMessage.SINGLETON_INSTANCE.getInputControl().isValid() == false; + if ( needsNewInput ) { + match.getInput().setNewInput(game); + wasChangedRecently = true; + } + try { + Thread.sleep(wasChangedRecently ? 2 : 40); + wasChangedRecently = false; + } catch (InterruptedException e) { + BugReporter.reportException(e); + break; + } + } + } +} \ No newline at end of file diff --git a/src/main/java/forge/game/GameNew.java b/src/main/java/forge/game/GameNew.java index 165d5c34013..98c15656cbd 100644 --- a/src/main/java/forge/game/GameNew.java +++ b/src/main/java/forge/game/GameNew.java @@ -26,7 +26,6 @@ import forge.card.trigger.TriggerType; import forge.deck.Deck; import forge.deck.CardPool; import forge.deck.DeckSection; -import forge.error.BugReporter; import forge.game.event.FlipCoinEvent; import forge.game.phase.PhaseHandler; import forge.game.player.AIPlayer; @@ -34,7 +33,6 @@ import forge.game.player.LobbyPlayer; import forge.game.player.Player; import forge.game.zone.PlayerZone; import forge.game.zone.ZoneType; -import forge.gui.match.controllers.CMessage; import forge.gui.match.views.VAntes; import forge.item.CardPrinted; import forge.item.IPaperCard; @@ -49,43 +47,6 @@ import forge.util.MyRandom; */ public class GameNew { - /** - * TODO: Write javadoc for this type. - * - */ - public static final class GameInputUpdatesThread extends Thread { - private final MatchController match; - private final GameState game; - private boolean wasChangedRecently; - - /** - * TODO: Write javadoc for Constructor. - * @param match - * @param game - */ - public GameInputUpdatesThread(MatchController match, GameState game) { - this.match = match; - this.game = game; - } - - public void run(){ - while(!game.isGameOver()) { - boolean needsNewInput = CMessage.SINGLETON_INSTANCE.getInputControl().isValid() == false; - if ( needsNewInput ) { - match.getInput().setNewInput(game); - wasChangedRecently = true; - } - try { - Thread.sleep(wasChangedRecently ? 2 : 40); - wasChangedRecently = false; - } catch (InterruptedException e) { - BugReporter.reportException(e); - break; - } - } - } - } - public static final ForgePreferences preferences = Singletons.getModel().getPreferences(); private static void preparePlayerLibrary(Player player, final ZoneType zoneType, CardPool secion, boolean canRandomFoil, Random generator) { @@ -235,10 +196,6 @@ public class GameNew { for (final Player p1 : game.getPlayers()) { p1.drawCards(p1.getMaxHandSize()); } - - Thread thGame = new GameInputUpdatesThread(match, game); - thGame.setName("Game input updater"); - thGame.start(); } // ultimate of Karn the Liberated diff --git a/src/main/java/forge/game/GameState.java b/src/main/java/forge/game/GameState.java index 88a1c9903f5..1cf4df89fff 100644 --- a/src/main/java/forge/game/GameState.java +++ b/src/main/java/forge/game/GameState.java @@ -287,7 +287,7 @@ public class GameState { /** * @return the gameOver */ - public boolean isGameOver() { + public synchronized boolean isGameOver() { return gameOver; } @@ -295,7 +295,7 @@ public class GameState { * @param reason * @param go the gameOver to set */ - public void setGameOver(GameEndReason reason) { + public synchronized void setGameOver(GameEndReason reason) { this.gameOver = true; for (Player p : roIngamePlayers) { p.onGameOver(); diff --git a/src/main/java/forge/game/MatchController.java b/src/main/java/forge/game/MatchController.java index 4f0e9455979..ea051d1e83d 100644 --- a/src/main/java/forge/game/MatchController.java +++ b/src/main/java/forge/game/MatchController.java @@ -160,6 +160,10 @@ public class MatchController { final boolean canRandomFoil = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_FOIL) && gameType == GameType.Constructed; GameNew.newGame(this, startConditions, currentGame, canRandomFoil); + Thread thGame = new GameInputUpdatesThread(this, currentGame); + thGame.setName("Game input updater"); + thGame.start(); + // TODO restore this functionality!!! //VMatchUI.SINGLETON_INSTANCE.getViewDevMode().getDocument().setVisible(Preferences.DEV_MODE); for (final VField field : VMatchUI.SINGLETON_INSTANCE.getFieldViews()) { diff --git a/src/main/java/forge/gui/InputProxy.java b/src/main/java/forge/gui/InputProxy.java index 8219cd50199..0d33017066e 100644 --- a/src/main/java/forge/gui/InputProxy.java +++ b/src/main/java/forge/gui/InputProxy.java @@ -38,10 +38,10 @@ public class InputProxy extends MyObservable implements Observer { /** The input. */ private Input input; - private volatile boolean valid = false; + private boolean valid = false; @Override - public final void update(final Observable observable, final Object obj) { + public final synchronized void update(final Observable observable, final Object obj) { valid = false; } /** @@ -52,7 +52,7 @@ public class InputProxy extends MyObservable implements Observer { * @param in * a {@link forge.control.input.Input} object. */ - public final void setInput(final Input in) { + public final synchronized void setInput(final Input in) { valid = true; this.input = in; this.input.showMessage(); // this call may invalidate the input by the time it returns @@ -114,7 +114,7 @@ public class InputProxy extends MyObservable implements Observer { } - public boolean isValid() { + public synchronized boolean isValid() { return valid; } } From 8d8d30e066938682aa444490ff67f6948982fcb4 Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 9 Mar 2013 02:00:29 +0000 Subject: [PATCH 4/8] - Add Taniwha --- .gitattributes | 1 + res/cardsfolder/t/taniwha.txt | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 res/cardsfolder/t/taniwha.txt diff --git a/.gitattributes b/.gitattributes index 8036e3a981a..7654882796d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10641,6 +10641,7 @@ res/cardsfolder/t/tanglebloom.txt svneol=native#text/plain res/cardsfolder/t/tangleroot.txt svneol=native#text/plain res/cardsfolder/t/tanglesap.txt -text res/cardsfolder/t/tanglewalker.txt svneol=native#text/plain +res/cardsfolder/t/taniwha.txt -text res/cardsfolder/t/taoist_hermit.txt svneol=native#text/plain res/cardsfolder/t/taoist_mystic.txt svneol=native#text/plain res/cardsfolder/t/tar_fiend.txt svneol=native#text/plain diff --git a/res/cardsfolder/t/taniwha.txt b/res/cardsfolder/t/taniwha.txt new file mode 100644 index 00000000000..90dab68bbb9 --- /dev/null +++ b/res/cardsfolder/t/taniwha.txt @@ -0,0 +1,11 @@ +Name:Taniwha +ManaCost:3 U U +Types:Legendary Creature Serpent +PT:7/7 +K:Trample +K:Phasing +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPhaseLands | TriggerDescription$ At the beginning of your upkeep, all lands you control phase out. +SVar:TrigPhaseLands:DB$ Phases | Defined$ Valid Land.YouCtrl +SVar:Picture:http://www.wizards.com/global/images/magic/general/taniwha.jpg +SetInfo:MIR Rare +Oracle:Trample\nPhasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)\nAt the beginning of your upkeep, all lands you control phase out. (They phase in before you untap during your next untap step.) From ede42d710aec0ae82af65973d51ed51dba0b74b7 Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 9 Mar 2013 03:41:30 +0000 Subject: [PATCH 5/8] - Added Natural Balance --- .gitattributes | 1 + res/cardsfolder/n/natural_balance.txt | 12 ++++++++++++ .../java/forge/card/ability/ai/RepeatEachAi.java | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 res/cardsfolder/n/natural_balance.txt diff --git a/.gitattributes b/.gitattributes index 7654882796d..c65e1045e79 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7038,6 +7038,7 @@ res/cardsfolder/n/nath_of_the_gilt_leaf.txt svneol=native#text/plain res/cardsfolder/n/naths_buffoon.txt svneol=native#text/plain res/cardsfolder/n/naths_elite.txt svneol=native#text/plain res/cardsfolder/n/natural_affinity.txt svneol=native#text/plain +res/cardsfolder/n/natural_balance.txt -text res/cardsfolder/n/natural_emergence.txt -text svneol=unset#text/plain res/cardsfolder/n/natural_end.txt -text res/cardsfolder/n/natural_order.txt svneol=native#text/plain diff --git a/res/cardsfolder/n/natural_balance.txt b/res/cardsfolder/n/natural_balance.txt new file mode 100644 index 00000000000..42c0bd771bf --- /dev/null +++ b/res/cardsfolder/n/natural_balance.txt @@ -0,0 +1,12 @@ +Name:Natural Balance +ManaCost:2 G G +Types:Sorcery +A:SP$ RepeatEach | Cost$ 2 G G | RepeatPlayers$ Player | RepeatSubAbility$ BalanceLands | AILogic$ BalanceLands | SpellDescription$ Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it. +SVar:BalanceLands:DB$ Sacrifice | SacValid$ Land | Amount$ SacX | Defined$ Remembered | ConditionCheckSVar$ SacX | ConditionSVarCompare$ GT0 | SubAbility$ FetchLands +SVar:FetchLands:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ FetchX | DefinedPlayer$ Remembered | ConditionCheckSVar$ FetchX | ConditionSVarCompare$ GT0 +SVar:LandsControlled:Count$Valid Land.RememberedPlayerCtrl +SVar:SacX:SVar$LandsControlled/Minus.5 +SVar:FetchX:Number$5/Minus.LandsControlled +SVar:Picture:http://www.wizards.com/global/images/magic/general/natural_balance.jpg +SetInfo:MIR Rare +Oracle:Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it. diff --git a/src/main/java/forge/card/ability/ai/RepeatEachAi.java b/src/main/java/forge/card/ability/ai/RepeatEachAi.java index 66184930fa2..aad1ce01446 100644 --- a/src/main/java/forge/card/ability/ai/RepeatEachAi.java +++ b/src/main/java/forge/card/ability/ai/RepeatEachAi.java @@ -86,6 +86,17 @@ public class RepeatEachAi extends SpellAbilityAi { } tgt.addTarget(list.get(0)); + } else if ("BalanceLands".equals(logic)) { + if (CardLists.filter(aiPlayer.getCardsIn(ZoneType.Battlefield), Presets.LANDS).size() >= 5) { + return false; + } + + List opponents = aiPlayer.getOpponents(); + for(Player opp : opponents) { + if (CardLists.filter(opp.getCardsIn(ZoneType.Battlefield), Presets.LANDS).size() < 4) { + return false; + } + } } // TODO Add some normal AI variability here From a1f1ae5c1d7b38edb42ddf84736fbf24f58def27 Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 9 Mar 2013 04:06:28 +0000 Subject: [PATCH 6/8] - Replacing the duplicate RememberedSize with the the Remembered Counter that already existed. --- res/cardsfolder/c/clockwork_hydra.txt | 2 +- res/cardsfolder/c/coalition_relic.txt | 2 +- res/cardsfolder/c/covenant_of_minds.txt | 2 +- res/cardsfolder/d/delaying_shield.txt | 2 +- res/cardsfolder/h/hex_parasite.txt | 2 +- res/cardsfolder/j/jaces_archivist.txt | 2 +- res/cardsfolder/m/magmasaur.txt | 2 +- res/cardsfolder/r/reviving_vapors.txt | 2 +- res/cardsfolder/w/whispering_madness.txt | 2 +- res/cardsfolder/w/windfall.txt | 2 +- res/cardsfolder/w/woeleecher.txt | 2 +- src/main/java/forge/card/cardfactory/CardFactoryUtil.java | 4 ---- 12 files changed, 11 insertions(+), 15 deletions(-) diff --git a/res/cardsfolder/c/clockwork_hydra.txt b/res/cardsfolder/c/clockwork_hydra.txt index 57e5c9aa645..2ad3d21ae4d 100644 --- a/res/cardsfolder/c/clockwork_hydra.txt +++ b/res/cardsfolder/c/clockwork_hydra.txt @@ -9,7 +9,7 @@ SVar:TrigClockworkRemoveCounter:AB$ RemoveCounter | Cost$ 0 | CounterType$ P1P1 SVar:DBClockworkDamage:DB$ DealDamage | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | ConditionCheckSVar$ ClockworkX | ConditionSVarCompare$ GE1 | SubAbility$ DBClockworkCleanup A:AB$ PutCounter | Cost$ T | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME. SVar:DBClockworkCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:ClockworkX:Count$RememberedSize +SVar:ClockworkX:Remembered$Amount SVar:Picture:http://www.wizards.com/global/images/magic/general/clockwork_hydra.jpg Oracle:Clockwork Hydra enters the battlefield with four +1/+1 counters on it.\nWhenever Clockwork Hydra attacks or blocks, remove a +1/+1 counter from it. If you do, Clockwork Hydra deals 1 damage to target creature or player.\n{T}: Put a +1/+1 counter on Clockwork Hydra. SetInfo:DDF Uncommon diff --git a/res/cardsfolder/c/coalition_relic.txt b/res/cardsfolder/c/coalition_relic.txt index c2d1f35e180..33b24eb03b6 100644 --- a/res/cardsfolder/c/coalition_relic.txt +++ b/res/cardsfolder/c/coalition_relic.txt @@ -7,7 +7,7 @@ T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Ex SVar:TrigRemove:AB$ RemoveCounter | Cost$ 0 | CounterType$ CHARGE | CounterNum$ All | RememberRemoved$ True | SubAbility$ TrigGetMana SVar:TrigGetMana:DB$ Mana | Produced$ Combo Any | Amount$ NumRemoved | References$ NumRemoved | AILogic$ MostProminentInComputerHand | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:NumRemoved:Count$RememberedSize +SVar:NumRemoved:Remembered$Amount SVar:Picture:http://www.wizards.com/global/images/magic/general/coalition_relic.jpg Oracle:{T}: Add one mana of any color to your mana pool.\n{T}: Put a charge counter on Coalition Relic.\nAt the beginning of your precombat main phase, remove all charge counters from Coalition Relic. Add one mana of any color to your mana pool for each charge counter removed this way. SetInfo:FUT Rare diff --git a/res/cardsfolder/c/covenant_of_minds.txt b/res/cardsfolder/c/covenant_of_minds.txt index 454e77ce876..0a63ad89bbd 100644 --- a/res/cardsfolder/c/covenant_of_minds.txt +++ b/res/cardsfolder/c/covenant_of_minds.txt @@ -6,7 +6,7 @@ SVar:DBChoice:DB$ GenericChoice | ValidTgts$ Opponent | Choices$ CovenantDraw,Co SVar:CovenantDraw:DB$ Draw | Defined$ SourceController | NumCards$ X | References$ X | ChoiceDescription$ You may choose to put those cards into that player's hand. SVar:CovenantMillDraw:DB$ Mill | Defined$ SourceController | NumCards$ X | References$ X | SubAbility$ DBDraw | ChoiceDescription$ If you don't, put those cards into that player's graveyard and that player draws five cards. SVar:DBDraw:DB$ Draw | Defined$ SourceController | NumCards$ 5 -SVar:X:Count$RememberedSize +SVar:X:Remembered$Amount SVar:Picture:http://www.wizards.com/global/images/magic/general/covenant_of_minds.jpg Oracle:Reveal the top three cards of your library. Target opponent may choose to put those cards into your hand. If he or she doesn't, put those cards into your graveyard and draw five cards. SetInfo:ALA Rare \ No newline at end of file diff --git a/res/cardsfolder/d/delaying_shield.txt b/res/cardsfolder/d/delaying_shield.txt index c90927fa52f..255c02deab2 100644 --- a/res/cardsfolder/d/delaying_shield.txt +++ b/res/cardsfolder/d/delaying_shield.txt @@ -9,7 +9,7 @@ SVar:RemoveCounters:AB$ RemoveCounter | Cost$ 0 | CounterType$ DELAY | CounterNu SVar:RepeatOnUpkeep:DB$ Repeat | MaxRepeat$ NumRemoved | References$ NumRemoved | RepeatSubAbility$ DBLoseLife | SubAbility$ DBCleanup SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ 1 | Defined$ You | UnlessCost$ 1 W | UnlessPayer$ You SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:NumRemoved:Count$RememberedSize +SVar:NumRemoved:Remembered$Amount SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/delaying_shield.jpg Oracle:If damage would be dealt to you, put that many delay counters on Delaying Shield instead.\nAt the beginning of your upkeep, remove all delay counters from Delaying Shield. For each delay counter removed this way, you lose 1 life unless you pay {1}{W}. diff --git a/res/cardsfolder/h/hex_parasite.txt b/res/cardsfolder/h/hex_parasite.txt index dac8494b273..d884e033458 100644 --- a/res/cardsfolder/h/hex_parasite.txt +++ b/res/cardsfolder/h/hex_parasite.txt @@ -6,7 +6,7 @@ A:AB$ RemoveCounter | Cost$ X PB | ValidTgts$ Permanent | TgtPrompt$ Select targ SVar:DBPump:DB$Pump | NumAtt$ +Y | Defined$ Self | SubAbility$ DBCleanup | References$ Y SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:Count$xPaid -SVar:Y:Count$RememberedSize +SVar:Y:Remembered$Amount SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/hex_parasite.jpg Oracle:{X}{B/P}: Remove up to X counters from target permanent. For each counter removed this way, Hex Parasite gets +1/+0 until end of turn. ({B/P} can be paid with either {B} or 2 life.) diff --git a/res/cardsfolder/j/jaces_archivist.txt b/res/cardsfolder/j/jaces_archivist.txt index 6e470612929..a68d1a75f2a 100644 --- a/res/cardsfolder/j/jaces_archivist.txt +++ b/res/cardsfolder/j/jaces_archivist.txt @@ -9,7 +9,7 @@ SVar:DBOppDiscard2:DB$ Discard | Cost$ 0 | Defined$ Opponent | ConditionCheckSVa SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw | References$ X SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup | References$ X SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$RememberedSize +SVar:X:Remembered$Amount SVar:HandSizeTest:Count$CardsInOppHand/Minus.X SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg Oracle:{U}, {T}: Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way. diff --git a/res/cardsfolder/m/magmasaur.txt b/res/cardsfolder/m/magmasaur.txt index 6c4b99a2010..ef7307a7e15 100644 --- a/res/cardsfolder/m/magmasaur.txt +++ b/res/cardsfolder/m/magmasaur.txt @@ -9,7 +9,7 @@ SVar:Shrink:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ SVar:SelfDestruct:DB$ Sacrifice | Defined$ Self | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SubAbility$ LetEmHaveIt | ChoiceDescription$ Sacrifice CARDNAME and it deals damage equal to the number of +1/+1 counters on it to each creature without flying and each player. SVar:LetEmHaveIt:DB$ DamageAll | ValidCards$ Creature.withoutFlying | ValidPlayers$ Each | NumDmg$ Y | References$ Y | SubAbility$ DBCleanup | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$RememberedSize +SVar:X:Remembered$Amount SVar:Y:Count$CardCounters.P1P1 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/magmasaur.jpg diff --git a/res/cardsfolder/r/reviving_vapors.txt b/res/cardsfolder/r/reviving_vapors.txt index 7e61aa057b5..df5741a7ddc 100644 --- a/res/cardsfolder/r/reviving_vapors.txt +++ b/res/cardsfolder/r/reviving_vapors.txt @@ -6,7 +6,7 @@ SVar:DBimprint:DB$ Pump | ImprintCards$ ValidHand Card.IsRemembered | StackDescr SVar:DBGainLife:DB$ GainLife | LifeAmount$ X | References$ X | SubAbility$ DBMill | StackDescription$ None SVar:X:Imprinted$CardManaCost SVar:DBMill:DB$ Mill | NumCards$ Y | References$ Y | SubAbility$ DBCleanup | StackDescription$ None -SVar:Y:Count$RememberedSize/Minus.1 +SVar:Y:Remembered$Amount/Minus.1 SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True SVar:Picture:http://www.wizards.com/global/images/magic/general/reviving_vapors.jpg Oracle:Reveal the top three cards of your library and put one of them into your hand. You gain life equal to that card's converted mana cost. Put all other cards revealed this way into your graveyard. diff --git a/res/cardsfolder/w/whispering_madness.txt b/res/cardsfolder/w/whispering_madness.txt index 780e8fc5b82..7adb8a68d76 100644 --- a/res/cardsfolder/w/whispering_madness.txt +++ b/res/cardsfolder/w/whispering_madness.txt @@ -9,7 +9,7 @@ SVar:MadnessDraw:DB$ Draw | Defined$ Each | NumCards$ MaxDiscard | SubAbility$ M SVar:MadnessReset:DB$ StoreSVar | SVar$ MaxDiscard | Type$ Number | Expression$ 0 | SubAbility$ Cipher SVar:Cipher:DB$ Encode | Defined$ Self | ConditionCheckSVar$ IsEncoded | ConditionSVarCompare$ EQ0 SVar:IsEncoded:Number$0 -SVar:NumDiscard:Count$RememberedSize/Minus.1 +SVar:NumDiscard:Remembered$Amount/Minus.1 SVar:MaxDiscard:Number$0 SVar:RemAIDeck:True SVar:RemRandomDeck:True diff --git a/res/cardsfolder/w/windfall.txt b/res/cardsfolder/w/windfall.txt index 0276d2f6cee..87c5269baf8 100644 --- a/res/cardsfolder/w/windfall.txt +++ b/res/cardsfolder/w/windfall.txt @@ -7,7 +7,7 @@ SVar:WindfallSaveAmount:DB$ StoreSVar | SVar$ MaxDiscard | Type$ CountSVar | Exp SVar:WindfallCleanUp:DB$ Cleanup | ClearRemembered$ True SVar:WindfallDraw:DB$ Draw | Defined$ Each | NumCards$ MaxDiscard | SubAbility$ WindfallReset SVar:WindfallReset:DB$ StoreSVar | SVar$ MaxDiscard | Type$ Number | Expression$ 0 -SVar:NumDiscard:Count$RememberedSize/Minus.1 +SVar:NumDiscard:Remembered$Amount/Minus.1 SVar:MaxDiscard:Number$0 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/windfall.jpg diff --git a/res/cardsfolder/w/woeleecher.txt b/res/cardsfolder/w/woeleecher.txt index 9f06ad77bf4..65196ef62bf 100644 --- a/res/cardsfolder/w/woeleecher.txt +++ b/res/cardsfolder/w/woeleecher.txt @@ -5,7 +5,7 @@ PT:3/5 A:AB$ RemoveCounter | Cost$ W T | ValidTgts$ Creature.counters_GE1_M1M1 | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | RememberRemoved$ True | SubAbility$ DBGainLife | SpellDescription$ Remove a -1/-1 counter from target creature. If you do, you gain 2 life. SVar:DBGainLife:DB$ GainLife | LifeAmount$ 2 | ConditionCheckSVar$ X | ConditonSVarCompare$ GE1 | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$RememberedSize +SVar:X:Remembered$Amount SVar:RemAIDeck:True SVar:RemRandomDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/woeleecher.jpg diff --git a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java index ac1e8a4becb..5fee5e71a09 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java @@ -1448,10 +1448,6 @@ public class CardFactoryUtil { return crdname.size(); } - if (l[0].startsWith("RememberedSize")) { - return CardFactoryUtil.doXMath(c.getRemembered().size(), m, c); - } - // Count$CountersAdded if (l[0].startsWith("CountersAdded")) { final String[] components = l[0].split(" ", 3); From 1d2c73df58faa2ab53687011e7e0d924a7cb21f8 Mon Sep 17 00:00:00 2001 From: swordshine Date: Sat, 9 Mar 2013 04:34:51 +0000 Subject: [PATCH 7/8] - Added Balancing Act --- .gitattributes | 1 + res/cardsfolder/b/balancing_act.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 res/cardsfolder/b/balancing_act.txt diff --git a/.gitattributes b/.gitattributes index c65e1045e79..25d892321b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -707,6 +707,7 @@ res/cardsfolder/b/bala_ged_scorpion.txt svneol=native#text/plain res/cardsfolder/b/bala_ged_thief.txt -text res/cardsfolder/b/balance.txt svneol=native#text/plain res/cardsfolder/b/balance_of_power.txt -text +res/cardsfolder/b/balancing_act.txt -text res/cardsfolder/b/balduvian_barbarians.txt svneol=native#text/plain res/cardsfolder/b/balduvian_bears.txt svneol=native#text/plain res/cardsfolder/b/balduvian_conjurer.txt svneol=native#text/plain diff --git a/res/cardsfolder/b/balancing_act.txt b/res/cardsfolder/b/balancing_act.txt new file mode 100644 index 00000000000..550ae088aa3 --- /dev/null +++ b/res/cardsfolder/b/balancing_act.txt @@ -0,0 +1,26 @@ +Name:Balancing Act +ManaCost:2 W W +Types:Sorcery +A:SP$ RepeatEach | Cost$ 2 W W | RepeatPlayers$ Player | RepeatSubAbility$ FindFewestPermanent | StackDescription$ SpellDescription | SubAbility$ DBChooseRepeat | SpellDescription$ Each player chooses a number of permanents he or she controls equal to the number of permanents controlled by the player who controls the fewest, then sacrifices the rest. Each player discards cards the same way. +SVar:FindFewestPermanent:DB$ StoreSVar | SVar$ MinPermanent | Type$ CountSVar | Expression$ NumPermanent | ConditionCheckSVar$ NumPermanent | ConditionSVarCompare$ LTMinPermanent +SVar:NumPermanent:Count$Valid Permanent.RememberedPlayerCtrl +SVar:MinPermanent:Number$9999 +SVar:DBChooseRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBChoose | StackDescription$ None | SubAbility$ SacAll +SVar:DBChoose:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Permanent.RememberedPlayerCtrl | Amount$ MinPermanent | References$ MinPermanent | ChoiceTitle$ Choose permanents you control | RememberChosen$ True +SVar:SacAll:DB$ SacrificeAll | ValidCards$ Permanent.IsNotRemembered | SubAbility$ DBCleanup1 | StackDescription$ None +SVar:DBCleanup1:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBFindFewestHand +SVar:DBFindFewestHand:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ FindFewestHand | StackDescription$ None | SubAbility$ DBChooseRepeat2 +SVar:FindFewestHand:DB$ StoreSVar | SVar$ MinHand | Type$ CountSVar | Expression$ NumHand | ConditionCheckSVar$ NumHand | ConditionSVarCompare$ LTMinHand +SVar:MinHand:Number$9999 +SVar:NumHand:Count$ValidHand Card.RememberedPlayerCtrl +SVar:DBChooseRepeat2:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBChooseHand | StackDescription$ None | SubAbility$ DisCardAll +SVar:DBChooseHand:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Card.RememberedPlayerCtrl | ChoiceZone$ Hand | Amount$ MinHand | References$ MinHand | ChoiceTitle$ Choose cards in your hand | RememberChosen$ True +SVar:DisCardAll:DB$ Discard | Mode$ Defined | DefinedCards$ ValidHand Card.IsNotRemembered | Defined$ Each | SubAbility$ DBCleanup2 +SVar:DBCleanup2:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBReset1 +SVar:DBReset1:DB$ StoreSVar | SVar$ MinPermanent | Type$ Number | Expression$ 9999 | SubAbility$ DBReset2 +SVar:DBReset2:DB$ StoreSVar | SVar$ MinHand | Type$ Number | Expression$ 9999 +SVar:Picture:http://www.wizards.com/global/images/magic/general/balancing_act.jpg +SVar:RemAIDeck:True +SVar:RemRandomDeck:True +SetInfo:ODY Rare +Oracle:Each player chooses a number of permanents he or she controls equal to the number of permanents controlled by the player who controls the fewest, then sacrifices the rest. Each player discards cards the same way. From be80c5582e13b281133917ea09694f4a8e6818c2 Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 9 Mar 2013 05:22:11 +0000 Subject: [PATCH 8/8] - Reverting RememberedSize, which isn't a great name if its only sposed to be used with counters --- res/cardsfolder/c/clockwork_hydra.txt | 2 +- res/cardsfolder/c/coalition_relic.txt | 2 +- res/cardsfolder/c/covenant_of_minds.txt | 2 +- res/cardsfolder/d/delaying_shield.txt | 2 +- res/cardsfolder/h/hex_parasite.txt | 2 +- res/cardsfolder/j/jaces_archivist.txt | 2 +- res/cardsfolder/m/magmasaur.txt | 2 +- res/cardsfolder/r/reviving_vapors.txt | 2 +- res/cardsfolder/w/whispering_madness.txt | 2 +- res/cardsfolder/w/windfall.txt | 2 +- res/cardsfolder/w/woeleecher.txt | 2 +- src/main/java/forge/card/cardfactory/CardFactoryUtil.java | 4 ++++ 12 files changed, 15 insertions(+), 11 deletions(-) diff --git a/res/cardsfolder/c/clockwork_hydra.txt b/res/cardsfolder/c/clockwork_hydra.txt index 2ad3d21ae4d..57e5c9aa645 100644 --- a/res/cardsfolder/c/clockwork_hydra.txt +++ b/res/cardsfolder/c/clockwork_hydra.txt @@ -9,7 +9,7 @@ SVar:TrigClockworkRemoveCounter:AB$ RemoveCounter | Cost$ 0 | CounterType$ P1P1 SVar:DBClockworkDamage:DB$ DealDamage | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | ConditionCheckSVar$ ClockworkX | ConditionSVarCompare$ GE1 | SubAbility$ DBClockworkCleanup A:AB$ PutCounter | Cost$ T | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME. SVar:DBClockworkCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:ClockworkX:Remembered$Amount +SVar:ClockworkX:Count$RememberedSize SVar:Picture:http://www.wizards.com/global/images/magic/general/clockwork_hydra.jpg Oracle:Clockwork Hydra enters the battlefield with four +1/+1 counters on it.\nWhenever Clockwork Hydra attacks or blocks, remove a +1/+1 counter from it. If you do, Clockwork Hydra deals 1 damage to target creature or player.\n{T}: Put a +1/+1 counter on Clockwork Hydra. SetInfo:DDF Uncommon diff --git a/res/cardsfolder/c/coalition_relic.txt b/res/cardsfolder/c/coalition_relic.txt index 33b24eb03b6..c2d1f35e180 100644 --- a/res/cardsfolder/c/coalition_relic.txt +++ b/res/cardsfolder/c/coalition_relic.txt @@ -7,7 +7,7 @@ T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Ex SVar:TrigRemove:AB$ RemoveCounter | Cost$ 0 | CounterType$ CHARGE | CounterNum$ All | RememberRemoved$ True | SubAbility$ TrigGetMana SVar:TrigGetMana:DB$ Mana | Produced$ Combo Any | Amount$ NumRemoved | References$ NumRemoved | AILogic$ MostProminentInComputerHand | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:NumRemoved:Remembered$Amount +SVar:NumRemoved:Count$RememberedSize SVar:Picture:http://www.wizards.com/global/images/magic/general/coalition_relic.jpg Oracle:{T}: Add one mana of any color to your mana pool.\n{T}: Put a charge counter on Coalition Relic.\nAt the beginning of your precombat main phase, remove all charge counters from Coalition Relic. Add one mana of any color to your mana pool for each charge counter removed this way. SetInfo:FUT Rare diff --git a/res/cardsfolder/c/covenant_of_minds.txt b/res/cardsfolder/c/covenant_of_minds.txt index 0a63ad89bbd..454e77ce876 100644 --- a/res/cardsfolder/c/covenant_of_minds.txt +++ b/res/cardsfolder/c/covenant_of_minds.txt @@ -6,7 +6,7 @@ SVar:DBChoice:DB$ GenericChoice | ValidTgts$ Opponent | Choices$ CovenantDraw,Co SVar:CovenantDraw:DB$ Draw | Defined$ SourceController | NumCards$ X | References$ X | ChoiceDescription$ You may choose to put those cards into that player's hand. SVar:CovenantMillDraw:DB$ Mill | Defined$ SourceController | NumCards$ X | References$ X | SubAbility$ DBDraw | ChoiceDescription$ If you don't, put those cards into that player's graveyard and that player draws five cards. SVar:DBDraw:DB$ Draw | Defined$ SourceController | NumCards$ 5 -SVar:X:Remembered$Amount +SVar:X:Count$RememberedSize SVar:Picture:http://www.wizards.com/global/images/magic/general/covenant_of_minds.jpg Oracle:Reveal the top three cards of your library. Target opponent may choose to put those cards into your hand. If he or she doesn't, put those cards into your graveyard and draw five cards. SetInfo:ALA Rare \ No newline at end of file diff --git a/res/cardsfolder/d/delaying_shield.txt b/res/cardsfolder/d/delaying_shield.txt index 255c02deab2..c90927fa52f 100644 --- a/res/cardsfolder/d/delaying_shield.txt +++ b/res/cardsfolder/d/delaying_shield.txt @@ -9,7 +9,7 @@ SVar:RemoveCounters:AB$ RemoveCounter | Cost$ 0 | CounterType$ DELAY | CounterNu SVar:RepeatOnUpkeep:DB$ Repeat | MaxRepeat$ NumRemoved | References$ NumRemoved | RepeatSubAbility$ DBLoseLife | SubAbility$ DBCleanup SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ 1 | Defined$ You | UnlessCost$ 1 W | UnlessPayer$ You SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:NumRemoved:Remembered$Amount +SVar:NumRemoved:Count$RememberedSize SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/delaying_shield.jpg Oracle:If damage would be dealt to you, put that many delay counters on Delaying Shield instead.\nAt the beginning of your upkeep, remove all delay counters from Delaying Shield. For each delay counter removed this way, you lose 1 life unless you pay {1}{W}. diff --git a/res/cardsfolder/h/hex_parasite.txt b/res/cardsfolder/h/hex_parasite.txt index d884e033458..dac8494b273 100644 --- a/res/cardsfolder/h/hex_parasite.txt +++ b/res/cardsfolder/h/hex_parasite.txt @@ -6,7 +6,7 @@ A:AB$ RemoveCounter | Cost$ X PB | ValidTgts$ Permanent | TgtPrompt$ Select targ SVar:DBPump:DB$Pump | NumAtt$ +Y | Defined$ Self | SubAbility$ DBCleanup | References$ Y SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:Count$xPaid -SVar:Y:Remembered$Amount +SVar:Y:Count$RememberedSize SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/hex_parasite.jpg Oracle:{X}{B/P}: Remove up to X counters from target permanent. For each counter removed this way, Hex Parasite gets +1/+0 until end of turn. ({B/P} can be paid with either {B} or 2 life.) diff --git a/res/cardsfolder/j/jaces_archivist.txt b/res/cardsfolder/j/jaces_archivist.txt index a68d1a75f2a..6e470612929 100644 --- a/res/cardsfolder/j/jaces_archivist.txt +++ b/res/cardsfolder/j/jaces_archivist.txt @@ -9,7 +9,7 @@ SVar:DBOppDiscard2:DB$ Discard | Cost$ 0 | Defined$ Opponent | ConditionCheckSVa SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBOppDraw | References$ X SVar:DBOppDraw:DB$ Draw | Defined$ Opponent | NumCards$ X | SubAbility$ DBCleanup | References$ X SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Remembered$Amount +SVar:X:Count$RememberedSize SVar:HandSizeTest:Count$CardsInOppHand/Minus.X SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_archivist.jpg Oracle:{U}, {T}: Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way. diff --git a/res/cardsfolder/m/magmasaur.txt b/res/cardsfolder/m/magmasaur.txt index ef7307a7e15..6c4b99a2010 100644 --- a/res/cardsfolder/m/magmasaur.txt +++ b/res/cardsfolder/m/magmasaur.txt @@ -9,7 +9,7 @@ SVar:Shrink:DB$ RemoveCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ SVar:SelfDestruct:DB$ Sacrifice | Defined$ Self | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SubAbility$ LetEmHaveIt | ChoiceDescription$ Sacrifice CARDNAME and it deals damage equal to the number of +1/+1 counters on it to each creature without flying and each player. SVar:LetEmHaveIt:DB$ DamageAll | ValidCards$ Creature.withoutFlying | ValidPlayers$ Each | NumDmg$ Y | References$ Y | SubAbility$ DBCleanup | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Remembered$Amount +SVar:X:Count$RememberedSize SVar:Y:Count$CardCounters.P1P1 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/magmasaur.jpg diff --git a/res/cardsfolder/r/reviving_vapors.txt b/res/cardsfolder/r/reviving_vapors.txt index df5741a7ddc..7e61aa057b5 100644 --- a/res/cardsfolder/r/reviving_vapors.txt +++ b/res/cardsfolder/r/reviving_vapors.txt @@ -6,7 +6,7 @@ SVar:DBimprint:DB$ Pump | ImprintCards$ ValidHand Card.IsRemembered | StackDescr SVar:DBGainLife:DB$ GainLife | LifeAmount$ X | References$ X | SubAbility$ DBMill | StackDescription$ None SVar:X:Imprinted$CardManaCost SVar:DBMill:DB$ Mill | NumCards$ Y | References$ Y | SubAbility$ DBCleanup | StackDescription$ None -SVar:Y:Remembered$Amount/Minus.1 +SVar:Y:Count$RememberedSize/Minus.1 SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True SVar:Picture:http://www.wizards.com/global/images/magic/general/reviving_vapors.jpg Oracle:Reveal the top three cards of your library and put one of them into your hand. You gain life equal to that card's converted mana cost. Put all other cards revealed this way into your graveyard. diff --git a/res/cardsfolder/w/whispering_madness.txt b/res/cardsfolder/w/whispering_madness.txt index 7adb8a68d76..780e8fc5b82 100644 --- a/res/cardsfolder/w/whispering_madness.txt +++ b/res/cardsfolder/w/whispering_madness.txt @@ -9,7 +9,7 @@ SVar:MadnessDraw:DB$ Draw | Defined$ Each | NumCards$ MaxDiscard | SubAbility$ M SVar:MadnessReset:DB$ StoreSVar | SVar$ MaxDiscard | Type$ Number | Expression$ 0 | SubAbility$ Cipher SVar:Cipher:DB$ Encode | Defined$ Self | ConditionCheckSVar$ IsEncoded | ConditionSVarCompare$ EQ0 SVar:IsEncoded:Number$0 -SVar:NumDiscard:Remembered$Amount/Minus.1 +SVar:NumDiscard:Count$RememberedSize/Minus.1 SVar:MaxDiscard:Number$0 SVar:RemAIDeck:True SVar:RemRandomDeck:True diff --git a/res/cardsfolder/w/windfall.txt b/res/cardsfolder/w/windfall.txt index 87c5269baf8..0276d2f6cee 100644 --- a/res/cardsfolder/w/windfall.txt +++ b/res/cardsfolder/w/windfall.txt @@ -7,7 +7,7 @@ SVar:WindfallSaveAmount:DB$ StoreSVar | SVar$ MaxDiscard | Type$ CountSVar | Exp SVar:WindfallCleanUp:DB$ Cleanup | ClearRemembered$ True SVar:WindfallDraw:DB$ Draw | Defined$ Each | NumCards$ MaxDiscard | SubAbility$ WindfallReset SVar:WindfallReset:DB$ StoreSVar | SVar$ MaxDiscard | Type$ Number | Expression$ 0 -SVar:NumDiscard:Remembered$Amount/Minus.1 +SVar:NumDiscard:Count$RememberedSize/Minus.1 SVar:MaxDiscard:Number$0 SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/windfall.jpg diff --git a/res/cardsfolder/w/woeleecher.txt b/res/cardsfolder/w/woeleecher.txt index 65196ef62bf..9f06ad77bf4 100644 --- a/res/cardsfolder/w/woeleecher.txt +++ b/res/cardsfolder/w/woeleecher.txt @@ -5,7 +5,7 @@ PT:3/5 A:AB$ RemoveCounter | Cost$ W T | ValidTgts$ Creature.counters_GE1_M1M1 | TgtPrompt$ Select target creature | CounterType$ M1M1 | CounterNum$ 1 | RememberRemoved$ True | SubAbility$ DBGainLife | SpellDescription$ Remove a -1/-1 counter from target creature. If you do, you gain 2 life. SVar:DBGainLife:DB$ GainLife | LifeAmount$ 2 | ConditionCheckSVar$ X | ConditonSVarCompare$ GE1 | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Remembered$Amount +SVar:X:Count$RememberedSize SVar:RemAIDeck:True SVar:RemRandomDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/woeleecher.jpg diff --git a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java index 5fee5e71a09..ac1e8a4becb 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java @@ -1448,6 +1448,10 @@ public class CardFactoryUtil { return crdname.size(); } + if (l[0].startsWith("RememberedSize")) { + return CardFactoryUtil.doXMath(c.getRemembered().size(), m, c); + } + // Count$CountersAdded if (l[0].startsWith("CountersAdded")) { final String[] components = l[0].split(" ", 3);