From 74c1cbf6d902b7615b6d2326fdfa97c4edee8ff8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 16 Jan 2019 15:11:14 -0500 Subject: [PATCH 1/9] begin fix for multiple copies of Krark's Thumb --- .../java/org/mage/test/player/TestPlayer.java | 10 +++ .../java/org/mage/test/stub/PlayerStub.java | 10 +++ Mage/src/main/java/mage/players/Player.java | 63 ++++++++++--------- .../main/java/mage/players/PlayerImpl.java | 14 +++++ 4 files changed, 68 insertions(+), 29 deletions(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 4842c49e6d2..9a2b439da03 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -2418,6 +2418,16 @@ public class TestPlayer implements Player { computerPlayer.setLoyaltyUsePerTurn(loyaltyUsePerTurn); } + @Override + public int getExtraCoinFlips() { + return computerPlayer.getExtraCoinFlips(); + } + + @Override + public void setExtraCoinFlips(int extraCoinFlips) { + computerPlayer.setExtraCoinFlips(extraCoinFlips); + } + @Override public int getMaxHandSize() { return computerPlayer.getMaxHandSize(); diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java index 384d89c21f1..99e0f8d2ecd 100644 --- a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -262,6 +262,16 @@ public class PlayerStub implements Player { } + @Override + public int getExtraCoinFlips() { + return 0; + } + + @Override + public void setExtraCoinFlips(int extraCoinFlips) { + + } + @Override public int getMaxHandSize() { return 0; diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index 0686edb5f4d..5816fe82311 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -74,7 +74,7 @@ public interface Player extends MageItem, Copyable { void setLife(int life, Game game, UUID sourceId); /** - * @param amount amount of life loss + * @param amount amount of life loss * @param game * @param atCombat was the source combat damage * @return @@ -141,6 +141,10 @@ public interface Player extends MageItem, Copyable { void setLoyaltyUsePerTurn(int loyaltyUsePerTurn); + int getExtraCoinFlips(); + + void setExtraCoinFlips(int getExtraCoinFlips); + int getMaxHandSize(); void setMaxHandSize(int maxHandSize); @@ -347,7 +351,7 @@ public interface Player extends MageItem, Copyable { * @param target * @param game * @param targetPlayerId player whose library will be searched - * @param triggerEvents whether searching will trigger any game events + * @param triggerEvents whether searching will trigger any game events * @return true if search was successful */ boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId, boolean triggerEvents); @@ -355,6 +359,7 @@ public interface Player extends MageItem, Copyable { /** * Reveals all players' libraries. Useful for abilities like Jace, Architect of Thought's -8 * that have effects that require information from all libraries. + * * @param source * @param game * @return @@ -366,23 +371,23 @@ public interface Player extends MageItem, Copyable { /** * Plays a card if possible * - * @param card the card that can be cast + * @param card the card that can be cast * @param game - * @param noMana if it's a spell i can be cast without paying mana + * @param noMana if it's a spell i can be cast without paying mana * @param ignoreTiming if it's cast during the resolution of another spell - * no sorcery or play land timing restriction are checked. For a land it has - * to be the turn of the player playing that card. - * @param reference mage object that allows to play the card + * no sorcery or play land timing restriction are checked. For a land it has + * to be the turn of the player playing that card. + * @param reference mage object that allows to play the card * @return */ boolean playCard(Card card, Game game, boolean noMana, boolean ignoreTiming, MageObjectReference reference); /** - * @param card the land card to play + * @param card the land card to play * @param game * @param ignoreTiming false - it won't be checked if the stack is empty and - * you are able to play a Sorcery. It's still checked, if you are able to - * play a land concerning the number of lands you already played. + * you are able to play a Sorcery. It's still checked, if you are able to + * play a land concerning the number of lands you already played. * @return */ boolean playLand(Card card, Game game, boolean ignoreTiming); @@ -528,11 +533,11 @@ public interface Player extends MageItem, Copyable { /** * Moves the cards from cards to the bottom of the players library. * - * @param cards - list of cards that have to be moved - * @param game - game + * @param cards - list of cards that have to be moved + * @param game - game * @param anyOrder - true if player can determine the order of the cards - * else random order - * @param source - source ability + * else random order + * @param source - source ability * @return */ boolean putCardsOnBottomOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder); @@ -553,10 +558,10 @@ public interface Player extends MageItem, Copyable { /** * Moves the cards from cards to the top of players library. * - * @param cards - list of cards that have to be moved - * @param game - game + * @param cards - list of cards that have to be moved + * @param game - game * @param anyOrder - true if player can determine the order of the cards - * @param source - source ability + * @param source - source ability * @return */ boolean putCardsOnTopOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder); @@ -582,8 +587,8 @@ public interface Player extends MageItem, Copyable { /** * Choose the order in which blockers get damage assigned to * - * @param blockers list of blockers where to choose the next one from - * @param combatGroup the concerning combat group + * @param blockers list of blockers where to choose the next one from + * @param combatGroup the concerning combat group * @param blockerOrder the already set order of blockers * @param game * @return blocker next to add to the blocker order @@ -722,11 +727,11 @@ public interface Player extends MageItem, Copyable { * @param toZone * @param source * @param game - * @param tapped the cards are tapped on the battlefield - * @param faceDown the cards are face down in the to zone - * @param byOwner the card is moved (or put onto battlefield) by the owner - * of the card and if target zone is battlefield controls the permanent - * (instead of the controller of the source) + * @param tapped the cards are tapped on the battlefield + * @param faceDown the cards are face down in the to zone + * @param byOwner the card is moved (or put onto battlefield) by the owner + * of the card and if target zone is battlefield controls the permanent + * (instead of the controller of the source) * @param appliedEffects * @return */ @@ -762,7 +767,7 @@ public interface Player extends MageItem, Copyable { * list of applied effects is not saved * * @param card - * @param exileId exile zone id (optional) + * @param exileId exile zone id (optional) * @param exileName name of exile zone (optional) * @param sourceId * @param game @@ -804,7 +809,7 @@ public interface Player extends MageItem, Copyable { * @param sourceId * @param game * @param fromZone if null, this info isn't postet - * @param toTop to the top of the library else to the bottom + * @param toTop to the top of the library else to the bottom * @param withName show the card name in the log * @return */ @@ -829,10 +834,10 @@ public interface Player extends MageItem, Copyable { * without mana (null) or the mana set to manaCosts instead of its normal * mana costs. * - * @param sourceId the source that can be cast without mana + * @param sourceId the source that can be cast without mana * @param manaCosts alternate ManaCost, null if it can be cast without mana - * cost - * @param costs alternate other costs you need to pay + * cost + * @param costs alternate other costs you need to pay */ void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts manaCosts, Costs costs); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index abf0db8c5bc..08c8b0d6bc5 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -98,6 +98,7 @@ public abstract class PlayerImpl implements Player, Serializable { protected int landsPlayed; protected int landsPerTurn = 1; protected int loyaltyUsePerTurn = 1; + protected int extraCoinFlips = 1; protected int maxHandSize = 7; protected int maxAttackedBy = Integer.MAX_VALUE; protected ManaPool manaPool; @@ -223,6 +224,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.landsPlayed = player.landsPlayed; this.landsPerTurn = player.landsPerTurn; this.loyaltyUsePerTurn = player.loyaltyUsePerTurn; + this.extraCoinFlips = player.extraCoinFlips; this.maxHandSize = player.maxHandSize; this.maxAttackedBy = player.maxAttackedBy; this.manaPool = player.manaPool.copy(); @@ -313,6 +315,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.landsPlayed = player.getLandsPlayed(); this.landsPerTurn = player.getLandsPerTurn(); this.loyaltyUsePerTurn = player.getLoyaltyUsePerTurn(); + this.extraCoinFlips = player.getExtraCoinFlips(); this.maxHandSize = player.getMaxHandSize(); this.maxAttackedBy = player.getMaxAttackedBy(); this.manaPool = player.getManaPool().copy(); @@ -433,6 +436,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.abilities.clear(); this.landsPerTurn = 1; this.loyaltyUsePerTurn = 1; + this.extraCoinFlips = 1; this.maxHandSize = 7; this.maxAttackedBy = Integer.MAX_VALUE; this.canGainLife = true; @@ -2079,6 +2083,16 @@ public abstract class PlayerImpl implements Player, Serializable { this.loyaltyUsePerTurn = loyaltyUsePerTurn; } + @Override + public int getExtraCoinFlips() { + return extraCoinFlips; + } + + @Override + public void setExtraCoinFlips(int extraCoinFlips) { + this.extraCoinFlips = extraCoinFlips; + } + @Override public int getMaxHandSize() { return maxHandSize; From 4736a608b191d28519fec5f215c064f440f94352 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 16 Jan 2019 15:23:01 -0500 Subject: [PATCH 2/9] Update Krark's Thumb --- Mage.Sets/src/mage/cards/k/KrarksThumb.java | 105 +++++++++++++------- 1 file changed, 68 insertions(+), 37 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KrarksThumb.java b/Mage.Sets/src/mage/cards/k/KrarksThumb.java index d5698826939..a0dbcc70614 100644 --- a/Mage.Sets/src/mage/cards/k/KrarksThumb.java +++ b/Mage.Sets/src/mage/cards/k/KrarksThumb.java @@ -3,16 +3,12 @@ package mage.cards.k; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.ContinuousEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.game.Game; -import mage.game.events.FlipCoinEvent; -import mage.game.events.GameEvent; import mage.players.Player; -import mage.util.CardUtil; -import mage.util.RandomUtil; import java.util.UUID; @@ -26,7 +22,7 @@ public final class KrarksThumb extends CardImpl { addSuperType(SuperType.LEGENDARY); // If you would flip a coin, instead flip two coins and ignore one. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KrarksThumbEffect())); + this.addAbility(new SimpleStaticAbility(new KrarksThumbEffect())); } private KrarksThumb(final KrarksThumb card) { @@ -39,11 +35,11 @@ public final class KrarksThumb extends CardImpl { } } -class KrarksThumbEffect extends ReplacementEffectImpl { +class KrarksThumbEffect extends ContinuousEffectImpl { KrarksThumbEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "If you would flip a coin, instead flip two coins and ignore one"; + staticText = "If you would flip a coin, instead flip two coins and ignore one."; } private KrarksThumbEffect(final KrarksThumbEffect effect) { @@ -51,36 +47,17 @@ class KrarksThumbEffect extends ReplacementEffectImpl { } @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player player = game.getPlayer(event.getPlayerId()); - if (player == null || !player.getId().equals(source.getControllerId())) { - return false; - } - FlipCoinEvent flipEvent = (FlipCoinEvent) event; - boolean secondFlip = RandomUtil.nextBoolean(); - game.informPlayers(player.getLogName() + " flipped a " + flipEvent.getResultName() - + " and a " + CardUtil.booleanToFlipName(secondFlip) - ); - boolean chosenFlip = player.chooseUse( - Outcome.Benefit, "Choose which coin you want", - (flipEvent.isWinnable() ? "(You chose " + flipEvent.getChosenName() + ")" : null), - flipEvent.getResultName(), CardUtil.booleanToFlipName(secondFlip), source, game - ); - if (!chosenFlip) { - flipEvent.setResult(secondFlip); - } - game.informPlayers(player.getLogName() + " chooses to keep " + flipEvent.getResultName()); - return false; + public KrarksThumbEffect copy() { + return new KrarksThumbEffect(this); } @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.FLIP_COIN; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - return source.isControlledBy(event.getPlayerId()); + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.setExtraCoinFlips(controller.getExtraCoinFlips() + 1); + } + return true; } @Override @@ -89,7 +66,61 @@ class KrarksThumbEffect extends ReplacementEffectImpl { } @Override - public KrarksThumbEffect copy() { - return new KrarksThumbEffect(this); + public boolean hasLayer(Layer layer) { + return layer == Layer.RulesEffects; } } +//class KrarksThumbEffect extends ReplacementEffectImpl { +// +// KrarksThumbEffect() { +// super(Duration.WhileOnBattlefield, Outcome.Benefit); +// staticText = "If you would flip a coin, instead flip two coins and ignore one"; +// } +// +// private KrarksThumbEffect(final KrarksThumbEffect effect) { +// super(effect); +// } +// +// @Override +// public boolean replaceEvent(GameEvent event, Ability source, Game game) { +// Player player = game.getPlayer(event.getPlayerId()); +// if (player == null || !player.getId().equals(source.getControllerId())) { +// return false; +// } +// FlipCoinEvent flipEvent = (FlipCoinEvent) event; +// boolean secondFlip = RandomUtil.nextBoolean(); +// game.informPlayers(player.getLogName() + " flipped a " + flipEvent.getResultName() +// + " and a " + CardUtil.booleanToFlipName(secondFlip) +// ); +// boolean chosenFlip = player.chooseUse( +// Outcome.Benefit, "Choose which coin you want", +// (flipEvent.isWinnable() ? "(You chose " + flipEvent.getChosenName() + ")" : null), +// flipEvent.getResultName(), CardUtil.booleanToFlipName(secondFlip), source, game +// ); +// if (!chosenFlip) { +// flipEvent.setResult(secondFlip); +// } +// game.informPlayers(player.getLogName() + " chooses to keep " + flipEvent.getResultName()); +// return false; +// } +// +// @Override +// public boolean checksEventType(GameEvent event, Game game) { +// return event.getType() == GameEvent.EventType.FLIP_COIN; +// } +// +// @Override +// public boolean applies(GameEvent event, Ability source, Game game) { +// return source.isControlledBy(event.getPlayerId()); +// } +// +// @Override +// public boolean apply(Game game, Ability source) { +// return false; +// } +// +// @Override +// public KrarksThumbEffect copy() { +// return new KrarksThumbEffect(this); +// } +//} From 1144bf3b4f1f6c62331ca8b3adc9f4c1f83616b4 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 16 Jan 2019 18:20:36 -0500 Subject: [PATCH 3/9] finished adding support for multiple copies of Krark's Thumb --- Mage.Sets/src/mage/cards/k/KrarksThumb.java | 2 +- .../main/java/mage/players/PlayerImpl.java | 25 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KrarksThumb.java b/Mage.Sets/src/mage/cards/k/KrarksThumb.java index a0dbcc70614..294cfec83ce 100644 --- a/Mage.Sets/src/mage/cards/k/KrarksThumb.java +++ b/Mage.Sets/src/mage/cards/k/KrarksThumb.java @@ -55,7 +55,7 @@ class KrarksThumbEffect extends ContinuousEffectImpl { public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - controller.setExtraCoinFlips(controller.getExtraCoinFlips() + 1); + controller.setExtraCoinFlips(2 * controller.getExtraCoinFlips()); } return true; } diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 08c8b0d6bc5..c603706f904 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -2587,13 +2587,34 @@ public abstract class PlayerImpl implements Player, Serializable { boolean chosen = false; if (winnable) { chosen = this.chooseUse(Outcome.Benefit, "Heads or tails?", "", "Heads", "Tails", source, game); - game.informPlayers(getLogName() + " chose " + (chosen ? "heads." : "tails.")); + game.informPlayers(getLogName() + " chose " + CardUtil.booleanToFlipName(chosen)); } boolean result = RandomUtil.nextBoolean(); FlipCoinEvent event = new FlipCoinEvent(playerId, source.getSourceId(), result, chosen, winnable); event.addAppliedEffects(appliedEffects); game.replaceEvent(event); - game.informPlayers(getLogName() + " got " + (event.getResult() ? "heads" : "tails")); + if (extraCoinFlips > 1) { + boolean canChooseHeads = event.getResult(); + boolean canChooseTails = !event.getResult(); + boolean tempFlip; + for (int i = 0; i < extraCoinFlips; i++) { + tempFlip = RandomUtil.nextBoolean(); + canChooseHeads = canChooseHeads || tempFlip; + canChooseTails = canChooseTails || !tempFlip; + game.informPlayers(getLogName() + " flipped " + CardUtil.booleanToFlipName(tempFlip)); + } + if (canChooseHeads && canChooseTails) { + event.setResult(chooseUse(Outcome.Benefit, "Choose which flip to keep", + (event.isWinnable() ? "(You called " + event.getChosenName() + ")" : null), + "Heads", "Tails", source, game + )); + } else if (canChooseHeads) { + event.setResult(true); + } else { + event.setResult(false); + } + } + game.informPlayers(getLogName() + " got " + CardUtil.booleanToFlipName(event.getResult())); if (event.isWinnable()) { game.informPlayers(getLogName() + " " + (event.getResult() == event.getChosen() ? "won" : "lost") + " the flip"); } From 191e9903bae6fc8bdf04647c71bcc378b8b9d36e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 16 Jan 2019 18:25:00 -0500 Subject: [PATCH 4/9] removed some vestigial commented code --- Mage.Sets/src/mage/cards/k/KrarksThumb.java | 59 --------------------- 1 file changed, 59 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KrarksThumb.java b/Mage.Sets/src/mage/cards/k/KrarksThumb.java index 294cfec83ce..4cca44bc8a4 100644 --- a/Mage.Sets/src/mage/cards/k/KrarksThumb.java +++ b/Mage.Sets/src/mage/cards/k/KrarksThumb.java @@ -64,63 +64,4 @@ class KrarksThumbEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { return false; } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.RulesEffects; - } } -//class KrarksThumbEffect extends ReplacementEffectImpl { -// -// KrarksThumbEffect() { -// super(Duration.WhileOnBattlefield, Outcome.Benefit); -// staticText = "If you would flip a coin, instead flip two coins and ignore one"; -// } -// -// private KrarksThumbEffect(final KrarksThumbEffect effect) { -// super(effect); -// } -// -// @Override -// public boolean replaceEvent(GameEvent event, Ability source, Game game) { -// Player player = game.getPlayer(event.getPlayerId()); -// if (player == null || !player.getId().equals(source.getControllerId())) { -// return false; -// } -// FlipCoinEvent flipEvent = (FlipCoinEvent) event; -// boolean secondFlip = RandomUtil.nextBoolean(); -// game.informPlayers(player.getLogName() + " flipped a " + flipEvent.getResultName() -// + " and a " + CardUtil.booleanToFlipName(secondFlip) -// ); -// boolean chosenFlip = player.chooseUse( -// Outcome.Benefit, "Choose which coin you want", -// (flipEvent.isWinnable() ? "(You chose " + flipEvent.getChosenName() + ")" : null), -// flipEvent.getResultName(), CardUtil.booleanToFlipName(secondFlip), source, game -// ); -// if (!chosenFlip) { -// flipEvent.setResult(secondFlip); -// } -// game.informPlayers(player.getLogName() + " chooses to keep " + flipEvent.getResultName()); -// return false; -// } -// -// @Override -// public boolean checksEventType(GameEvent event, Game game) { -// return event.getType() == GameEvent.EventType.FLIP_COIN; -// } -// -// @Override -// public boolean applies(GameEvent event, Ability source, Game game) { -// return source.isControlledBy(event.getPlayerId()); -// } -// -// @Override -// public boolean apply(Game game, Ability source) { -// return false; -// } -// -// @Override -// public KrarksThumbEffect copy() { -// return new KrarksThumbEffect(this); -// } -//} From 3b47dce117ae573585bd6666ad93d9c458cc6188 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 17 Jan 2019 09:02:08 -0500 Subject: [PATCH 5/9] fixed Price of Fame not receiving cost reduction --- Mage.Sets/src/mage/cards/p/PriceOfFame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/p/PriceOfFame.java b/Mage.Sets/src/mage/cards/p/PriceOfFame.java index 194d35fe996..0aefe57301c 100644 --- a/Mage.Sets/src/mage/cards/p/PriceOfFame.java +++ b/Mage.Sets/src/mage/cards/p/PriceOfFame.java @@ -12,7 +12,7 @@ import mage.constants.CardType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.target.common.TargetCreaturePermanent; @@ -24,7 +24,7 @@ import java.util.UUID; public final class PriceOfFame extends CardImpl { private static final FilterPermanent filter - = new FilterControlledCreaturePermanent("a legendary creature"); + = new FilterCreaturePermanent("a legendary creature"); static { filter.add(new SupertypePredicate(SuperType.LEGENDARY)); From 9b782ec16ce8a276708e6426bcfdf9d73d37ab6c Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 17 Jan 2019 09:09:49 -0600 Subject: [PATCH 6/9] - Added Seraph and Chaos Lord --- Mage.Sets/src/mage/cards/c/ChaosLord.java | 163 +++++++ Mage.Sets/src/mage/cards/s/Seraph.java | 140 ++++++ Mage.Sets/src/mage/sets/FifthEdition.java | 1 + Mage.Sets/src/mage/sets/IceAge.java | 2 + Mage.Sets/src/mage/sets/MastersEdition.java | 444 ++++++++++---------- 5 files changed, 529 insertions(+), 221 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/c/ChaosLord.java create mode 100644 Mage.Sets/src/mage/cards/s/Seraph.java diff --git a/Mage.Sets/src/mage/cards/c/ChaosLord.java b/Mage.Sets/src/mage/cards/c/ChaosLord.java new file mode 100644 index 00000000000..b7f2cca6ba3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChaosLord.java @@ -0,0 +1,163 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.SubType; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +/** + * + * @author jeffwadsworth + */ +public final class ChaosLord extends CardImpl { + + public ChaosLord(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}{R}"); + + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // At the beginning of your upkeep, target opponent gains control of Chaos Lord if the number of permanents is even. + Ability ability = new ChaosLordTriggeredAbility(); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + + // Chaos Lord can attack as though it had haste unless it entered the battlefield this turn. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ChaosLordEffect())); + + } + + private ChaosLord(final ChaosLord card) { + super(card); + } + + @Override + public ChaosLord copy() { + return new ChaosLord(this); + } +} + +class ChaosLordTriggeredAbility extends BeginningOfUpkeepTriggeredAbility { + + public ChaosLordTriggeredAbility() { + super(Zone.BATTLEFIELD, + new GainControlSourceEffect(), + TargetController.YOU, + false); + } + + public ChaosLordTriggeredAbility(ChaosLordTriggeredAbility ability) { + super(ability); + } + + @Override + public BeginningOfUpkeepTriggeredAbility copy() { + return new ChaosLordTriggeredAbility(this); + } + + @Override + public boolean checkInterveningIfClause(Game game) { + Condition condition = new ControlsPermanentsComparedToOpponentsCondition( + ComparisonType.EQUAL_TO, + new FilterPermanent()); + Player controller = game.getPlayer(controllerId); + if (controller != null + && condition.apply(game, this)) { + return super.checkInterveningIfClause(game); + } + return false; + } + + @Override + public String getRule() { + return "At the beginning of your upkeep, target opponent gains control of {this} if the number of permanents is even."; + } + +} + +class GainControlSourceEffect extends ContinuousEffectImpl { + + public GainControlSourceEffect() { + super(Duration.Custom, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + staticText = "target opponent gains control of {this}"; + } + + public GainControlSourceEffect(final GainControlSourceEffect effect) { + super(effect); + } + + @Override + public GainControlSourceEffect copy() { + return new GainControlSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game); + if (permanent != null) { + return permanent.changeControllerId(source.getFirstTarget(), game); + } else { + discard(); + } + return false; + } +} + +class ChaosLordEffect extends AsThoughEffectImpl { + + public ChaosLordEffect() { + super(AsThoughEffectType.ATTACK_AS_HASTE, Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "Chaos Lord can attack as though it had haste unless it entered the battlefield this turn"; + } + + public ChaosLordEffect(final ChaosLordEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ChaosLordEffect copy() { + return new ChaosLordEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + Permanent chaosLord = game.getPermanent(objectId); + return chaosLord != null + && objectId == source.getSourceId() + && chaosLord.getTurnsOnBattlefield() > 0; + } +} diff --git a/Mage.Sets/src/mage/cards/s/Seraph.java b/Mage.Sets/src/mage/cards/s/Seraph.java new file mode 100644 index 00000000000..b656237d5dd --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Seraph.java @@ -0,0 +1,140 @@ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.DealtDamageAndDiedTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author jeffwadsworth + */ +public final class Seraph extends CardImpl { + + public Seraph(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}"); + + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever a creature dealt damage by Seraph this turn dies, put that card onto the battlefield under your control at the beginning of the next end step. Sacrifice the creature when you lose control of Seraph. + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility( + new SeraphEffect())); + effect.setText("put that card onto the battlefield under your control at the beginning of the next end step. Sacrifice the creature when you lose control of {this}"); + this.addAbility(new DealtDamageAndDiedTriggeredAbility(effect)); + + } + + private Seraph(final Seraph card) { + super(card); + } + + @Override + public Seraph copy() { + return new Seraph(this); + } +} + +class SeraphEffect extends OneShotEffect { + + SeraphEffect() { + super(Outcome.Neutral); + staticText = "put that card onto the battlefield under your control. Sacrifice it when you lose control of {this}"; + } + + SeraphEffect(SeraphEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Card creatureCard = game.getCard(targetPointer.getFirst(game, source)); + if (controller != null + && creatureCard != null + && game.getState().getZone(creatureCard.getId()) == Zone.GRAVEYARD) { // must be still in the graveyard + controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game, false, false, false, null); + OneShotEffect effect = new SacrificeTargetEffect(); + effect.setText("Sacrifice this if Seraph leaves the battlefield or its current controller loses control of it."); + effect.setTargetPointer(new FixedTarget(creatureCard.getId())); + SeraphDelayedTriggeredAbility dTA = new SeraphDelayedTriggeredAbility(effect, source.getSourceId()); + game.addDelayedTriggeredAbility(dTA, source); + return true; + } + return false; + } + + @Override + public SeraphEffect copy() { + return new SeraphEffect(this); + } +} + +class SeraphDelayedTriggeredAbility extends DelayedTriggeredAbility { + + UUID seraph; + + SeraphDelayedTriggeredAbility(Effect effect, UUID seraph) { + super(effect, Duration.EndOfGame, true); + this.seraph = seraph; + } + + SeraphDelayedTriggeredAbility(SeraphDelayedTriggeredAbility ability) { + super(ability); + this.seraph = ability.seraph; + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.LOST_CONTROL + || event.getType() == EventType.ZONE_CHANGE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.LOST_CONTROL + && event.getSourceId().equals(seraph)) { + return true; + } + if (event.getType() == EventType.ZONE_CHANGE + && event.getTargetId().equals(seraph)) { + return true; + } + return false; + } + + @Override + public SeraphDelayedTriggeredAbility copy() { + return new SeraphDelayedTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Control of Seraph was lost, sacrifice this."; + } +} diff --git a/Mage.Sets/src/mage/sets/FifthEdition.java b/Mage.Sets/src/mage/sets/FifthEdition.java index 6d6e93dbc63..5c5fb5f6dfb 100644 --- a/Mage.Sets/src/mage/sets/FifthEdition.java +++ b/Mage.Sets/src/mage/sets/FifthEdition.java @@ -368,6 +368,7 @@ public final class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Seasinger", 121, Rarity.UNCOMMON, mage.cards.s.Seasinger.class)); cards.add(new SetCardInfo("Segovian Leviathan", 122, Rarity.UNCOMMON, mage.cards.s.SegovianLeviathan.class)); cards.add(new SetCardInfo("Sengir Autocrat", 193, Rarity.RARE, mage.cards.s.SengirAutocrat.class)); + cards.add(new SetCardInfo("Seraph", 59, Rarity.RARE, mage.cards.s.Seraph.class)); cards.add(new SetCardInfo("Serpent Generator", 397, Rarity.RARE, mage.cards.s.SerpentGenerator.class)); cards.add(new SetCardInfo("Serra Bestiary", 60, Rarity.UNCOMMON, mage.cards.s.SerraBestiary.class)); cards.add(new SetCardInfo("Serra Paladin", 61, Rarity.UNCOMMON, mage.cards.s.SerraPaladin.class)); diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index fa4f030febe..2856fd2a3f0 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -62,6 +62,7 @@ public final class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Caribou Range", 11, Rarity.RARE, mage.cards.c.CaribouRange.class)); cards.add(new SetCardInfo("Celestial Sword", 314, Rarity.RARE, mage.cards.c.CelestialSword.class)); cards.add(new SetCardInfo("Centaur Archer", 282, Rarity.UNCOMMON, mage.cards.c.CentaurArcher.class)); + cards.add(new SetCardInfo("Chaos Lord", 178, Rarity.RARE, mage.cards.c.ChaosLord.class)); cards.add(new SetCardInfo("Chaos Moon", 179, Rarity.RARE, mage.cards.c.ChaosMoon.class)); cards.add(new SetCardInfo("Chub Toad", 229, Rarity.COMMON, mage.cards.c.ChubToad.class)); cards.add(new SetCardInfo("Circle of Protection: Black", 12, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlack.class)); @@ -287,6 +288,7 @@ public final class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Scaled Wurm", 262, Rarity.COMMON, mage.cards.s.ScaledWurm.class)); cards.add(new SetCardInfo("Sea Spirit", 95, Rarity.UNCOMMON, mage.cards.s.SeaSpirit.class)); cards.add(new SetCardInfo("Seizures", 159, Rarity.COMMON, mage.cards.s.Seizures.class)); + cards.add(new SetCardInfo("Seraph", 51, Rarity.RARE, mage.cards.s.Seraph.class)); cards.add(new SetCardInfo("Shambling Strider", 263, Rarity.COMMON, mage.cards.s.ShamblingStrider.class)); cards.add(new SetCardInfo("Shatter", 216, Rarity.COMMON, mage.cards.s.Shatter.class)); cards.add(new SetCardInfo("Shield Bearer", 52, Rarity.COMMON, mage.cards.s.ShieldBearer.class)); diff --git a/Mage.Sets/src/mage/sets/MastersEdition.java b/Mage.Sets/src/mage/sets/MastersEdition.java index 99486fa7575..d4db191279d 100644 --- a/Mage.Sets/src/mage/sets/MastersEdition.java +++ b/Mage.Sets/src/mage/sets/MastersEdition.java @@ -1,222 +1,224 @@ - -package mage.sets; - -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * @author LevelX2 - */ -public final class MastersEdition extends ExpansionSet { - - private static final MastersEdition instance = new MastersEdition(); - - public static MastersEdition getInstance() { - return instance; - } - - private MastersEdition() { - super("Masters Edition", "MED", ExpansionSet.buildDate(2007, 9, 10), SetType.MAGIC_ONLINE); - this.hasBasicLands = true; - this.hasBoosters = true; - this.numBoosterLands = 1; - this.numBoosterCommon = 10; - this.numBoosterUncommon = 3; - this.numBoosterRare = 1; - this.ratioBoosterMythic = 0; - - cards.add(new SetCardInfo("Adun Oakenshield", 141, Rarity.RARE, mage.cards.a.AdunOakenshield.class)); - cards.add(new SetCardInfo("Amnesia", 29, Rarity.RARE, mage.cards.a.Amnesia.class)); - cards.add(new SetCardInfo("Angry Mob", 1, Rarity.UNCOMMON, mage.cards.a.AngryMob.class)); - cards.add(new SetCardInfo("Animate Dead", 57, Rarity.UNCOMMON, mage.cards.a.AnimateDead.class)); - cards.add(new SetCardInfo("Animate Wall", 2, Rarity.UNCOMMON, mage.cards.a.AnimateWall.class)); - cards.add(new SetCardInfo("Ankh of Mishra", 151, Rarity.RARE, mage.cards.a.AnkhOfMishra.class)); - cards.add(new SetCardInfo("Apprentice Wizard", 30, Rarity.COMMON, mage.cards.a.ApprenticeWizard.class)); - cards.add(new SetCardInfo("Arcane Denial", 31, Rarity.COMMON, mage.cards.a.ArcaneDenial.class)); - cards.add(new SetCardInfo("Argivian Archaeologist", 3, Rarity.RARE, mage.cards.a.ArgivianArchaeologist.class)); - cards.add(new SetCardInfo("Armageddon", 4, Rarity.RARE, mage.cards.a.Armageddon.class)); - cards.add(new SetCardInfo("Artifact Blast", 85, Rarity.COMMON, mage.cards.a.ArtifactBlast.class)); - cards.add(new SetCardInfo("Ashnod's Transmogrant", 152, Rarity.COMMON, mage.cards.a.AshnodsTransmogrant.class)); - cards.add(new SetCardInfo("Autumn Willow", 113, Rarity.RARE, mage.cards.a.AutumnWillow.class)); - cards.add(new SetCardInfo("Balduvian Horde", 86, Rarity.RARE, mage.cards.b.BalduvianHorde.class)); - cards.add(new SetCardInfo("Ball Lightning", 87, Rarity.RARE, mage.cards.b.BallLightning.class)); - cards.add(new SetCardInfo("Baron Sengir", 58, Rarity.RARE, mage.cards.b.BaronSengir.class)); - cards.add(new SetCardInfo("Basal Thrull", 59, Rarity.COMMON, mage.cards.b.BasalThrull.class)); - cards.add(new SetCardInfo("Benalish Hero", 5, Rarity.COMMON, mage.cards.b.BenalishHero.class)); - cards.add(new SetCardInfo("Berserk", 114, Rarity.RARE, mage.cards.b.Berserk.class)); - cards.add(new SetCardInfo("Bestial Fury", 88, Rarity.COMMON, mage.cards.b.BestialFury.class)); - cards.add(new SetCardInfo("Black Knight", 60, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); - cards.add(new SetCardInfo("Blight", 61, Rarity.UNCOMMON, mage.cards.b.Blight.class)); - cards.add(new SetCardInfo("Breeding Pit", 62, Rarity.UNCOMMON, mage.cards.b.BreedingPit.class)); - cards.add(new SetCardInfo("Brothers of Fire", 89, Rarity.COMMON, mage.cards.b.BrothersOfFire.class)); - cards.add(new SetCardInfo("Carnivorous Plant", 115, Rarity.UNCOMMON, mage.cards.c.CarnivorousPlant.class)); - cards.add(new SetCardInfo("Centaur Archer", 142, Rarity.UNCOMMON, mage.cards.c.CentaurArcher.class)); - cards.add(new SetCardInfo("Chains of Mephistopheles", 63, Rarity.RARE, mage.cards.c.ChainsOfMephistopheles.class)); - cards.add(new SetCardInfo("Chub Toad", 116, Rarity.COMMON, mage.cards.c.ChubToad.class)); - cards.add(new SetCardInfo("Clockwork Beast", 153, Rarity.UNCOMMON, mage.cards.c.ClockworkBeast.class)); - cards.add(new SetCardInfo("Contagion", 64, Rarity.RARE, mage.cards.c.Contagion.class)); - cards.add(new SetCardInfo("Copper Tablet", 154, Rarity.UNCOMMON, mage.cards.c.CopperTablet.class)); - cards.add(new SetCardInfo("Crookshank Kobolds", 90, Rarity.COMMON, mage.cards.c.CrookshankKobolds.class)); - cards.add(new SetCardInfo("Crusade", 6, Rarity.RARE, mage.cards.c.Crusade.class)); - cards.add(new SetCardInfo("Cuombajj Witches", 65, Rarity.COMMON, mage.cards.c.CuombajjWitches.class)); - cards.add(new SetCardInfo("Cursed Rack", 155, Rarity.UNCOMMON, mage.cards.c.CursedRack.class)); - cards.add(new SetCardInfo("Dakkon Blackblade", 143, Rarity.RARE, mage.cards.d.DakkonBlackblade.class)); - cards.add(new SetCardInfo("Death Speakers", 7, Rarity.COMMON, mage.cards.d.DeathSpeakers.class)); - cards.add(new SetCardInfo("Death Ward", 8, Rarity.COMMON, mage.cards.d.DeathWard.class)); - cards.add(new SetCardInfo("Derelor", 66, Rarity.UNCOMMON, mage.cards.d.Derelor.class)); - cards.add(new SetCardInfo("Diamond Valley", 175, Rarity.RARE, mage.cards.d.DiamondValley.class)); - cards.add(new SetCardInfo("Diminishing Returns", 32, Rarity.RARE, mage.cards.d.DiminishingReturns.class)); - cards.add(new SetCardInfo("Divine Transformation", 9, Rarity.UNCOMMON, mage.cards.d.DivineTransformation.class)); - cards.add(new SetCardInfo("Dragon Engine", 156, Rarity.COMMON, mage.cards.d.DragonEngine.class)); - cards.add(new SetCardInfo("Dust to Dust", 10, Rarity.COMMON, mage.cards.d.DustToDust.class)); - cards.add(new SetCardInfo("Dwarven Catapult", 91, Rarity.UNCOMMON, mage.cards.d.DwarvenCatapult.class)); - cards.add(new SetCardInfo("Dwarven Soldier", 92, Rarity.COMMON, mage.cards.d.DwarvenSoldier.class)); - cards.add(new SetCardInfo("Eater of the Dead", 67, Rarity.UNCOMMON, mage.cards.e.EaterOfTheDead.class)); - cards.add(new SetCardInfo("Elder Land Wurm", 11, Rarity.UNCOMMON, mage.cards.e.ElderLandWurm.class)); - cards.add(new SetCardInfo("Erg Raiders", 68, Rarity.COMMON, mage.cards.e.ErgRaiders.class)); - cards.add(new SetCardInfo("Eureka", 117, Rarity.RARE, mage.cards.e.Eureka.class)); - cards.add(new SetCardInfo("Exile", 12, Rarity.COMMON, mage.cards.e.Exile.class)); - cards.add(new SetCardInfo("The Fallen", 69, Rarity.UNCOMMON, mage.cards.t.TheFallen.class)); - cards.add(new SetCardInfo("Feast or Famine", 70, Rarity.COMMON, mage.cards.f.FeastOrFamine.class)); - cards.add(new SetCardInfo("Fire Covenant", 145, Rarity.UNCOMMON, mage.cards.f.FireCovenant.class)); - cards.add(new SetCardInfo("Fissure", 93, Rarity.COMMON, mage.cards.f.Fissure.class)); - cards.add(new SetCardInfo("Forcefield", 157, Rarity.RARE, mage.cards.f.Forcefield.class)); - cards.add(new SetCardInfo("Force of Will", 33, Rarity.RARE, mage.cards.f.ForceOfWill.class)); - cards.add(new SetCardInfo("Forest", 193, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 194, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 195, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Fyndhorn Elves", 118, Rarity.COMMON, mage.cards.f.FyndhornElves.class)); - cards.add(new SetCardInfo("Ghazban Ogre", 120, Rarity.COMMON, mage.cards.g.GhazbanOgre.class)); - cards.add(new SetCardInfo("Giant Tortoise", 34, Rarity.COMMON, mage.cards.g.GiantTortoise.class)); - cards.add(new SetCardInfo("Goblin Chirurgeon", 94, Rarity.COMMON, mage.cards.g.GoblinChirurgeon.class)); - cards.add(new SetCardInfo("Goblin Grenade", 95, Rarity.UNCOMMON, mage.cards.g.GoblinGrenade.class)); - cards.add(new SetCardInfo("Goblin Mutant", 96, Rarity.UNCOMMON, mage.cards.g.GoblinMutant.class)); - cards.add(new SetCardInfo("Goblins of the Flarg", 98, Rarity.COMMON, mage.cards.g.GoblinsOfTheFlarg.class)); - cards.add(new SetCardInfo("Goblin Wizard", 97, Rarity.RARE, mage.cards.g.GoblinWizard.class)); - cards.add(new SetCardInfo("Granite Gargoyle", 99, Rarity.UNCOMMON, mage.cards.g.GraniteGargoyle.class)); - cards.add(new SetCardInfo("Greater Realm of Preservation", 13, Rarity.UNCOMMON, mage.cards.g.GreaterRealmOfPreservation.class)); - cards.add(new SetCardInfo("Hallowed Ground", 14, Rarity.UNCOMMON, mage.cards.h.HallowedGround.class)); - cards.add(new SetCardInfo("Hand of Justice", 15, Rarity.RARE, mage.cards.h.HandOfJustice.class)); - cards.add(new SetCardInfo("Hecatomb", 71, Rarity.RARE, mage.cards.h.Hecatomb.class)); - cards.add(new SetCardInfo("High Tide", 35, Rarity.UNCOMMON, mage.cards.h.HighTide.class)); - cards.add(new SetCardInfo("Holy Light", 16, Rarity.COMMON, mage.cards.h.HolyLight.class)); - cards.add(new SetCardInfo("Homarid Spawning Bed", 36, Rarity.UNCOMMON, mage.cards.h.HomaridSpawningBed.class)); - cards.add(new SetCardInfo("Hungry Mist", 121, Rarity.COMMON, mage.cards.h.HungryMist.class)); - cards.add(new SetCardInfo("Hyalopterous Lemure", 72, Rarity.COMMON, mage.cards.h.HyalopterousLemure.class)); - cards.add(new SetCardInfo("Hydroblast", 37, Rarity.COMMON, mage.cards.h.Hydroblast.class)); - cards.add(new SetCardInfo("Hymn of Rebirth", 146, Rarity.UNCOMMON, mage.cards.h.HymnOfRebirth.class)); - cards.add(new SetCardInfo("Hymn to Tourach", 73, Rarity.UNCOMMON, mage.cards.h.HymnToTourach.class)); - cards.add(new SetCardInfo("Icatian Lieutenant", 17, Rarity.COMMON, mage.cards.i.IcatianLieutenant.class)); - cards.add(new SetCardInfo("Icatian Town", 18, Rarity.UNCOMMON, mage.cards.i.IcatianTown.class)); - cards.add(new SetCardInfo("Ice Storm", 122, Rarity.UNCOMMON, mage.cards.i.IceStorm.class)); - cards.add(new SetCardInfo("Ifh-Biff Efreet", 123, Rarity.RARE, mage.cards.i.IfhBiffEfreet.class)); - cards.add(new SetCardInfo("Illusionary Forces", 38, Rarity.UNCOMMON, mage.cards.i.IllusionaryForces.class)); - cards.add(new SetCardInfo("Illusionary Wall", 39, Rarity.COMMON, mage.cards.i.IllusionaryWall.class)); - cards.add(new SetCardInfo("Illusions of Grandeur", 40, Rarity.RARE, mage.cards.i.IllusionsOfGrandeur.class)); - cards.add(new SetCardInfo("Island", 184, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 185, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 186, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island of Wak-Wak", 176, Rarity.RARE, mage.cards.i.IslandOfWakWak.class)); - cards.add(new SetCardInfo("Ivory Tower", 158, Rarity.RARE, mage.cards.i.IvoryTower.class)); - cards.add(new SetCardInfo("Jacques le Vert", 147, Rarity.RARE, mage.cards.j.JacquesLeVert.class)); - cards.add(new SetCardInfo("Jokulhaups", 100, Rarity.RARE, mage.cards.j.Jokulhaups.class)); - cards.add(new SetCardInfo("Juxtapose", 41, Rarity.UNCOMMON, mage.cards.j.Juxtapose.class)); - cards.add(new SetCardInfo("Juzam Djinn", 74, Rarity.RARE, mage.cards.j.JuzamDjinn.class)); - cards.add(new SetCardInfo("Keldon Warlord", 101, Rarity.UNCOMMON, mage.cards.k.KeldonWarlord.class)); - cards.add(new SetCardInfo("Khabal Ghoul", 75, Rarity.RARE, mage.cards.k.KhabalGhoul.class)); - cards.add(new SetCardInfo("Knights of Thorn", 19, Rarity.COMMON, mage.cards.k.KnightsOfThorn.class)); - cards.add(new SetCardInfo("Lake of the Dead", 177, Rarity.RARE, mage.cards.l.LakeOfTheDead.class)); - cards.add(new SetCardInfo("Lightning Bolt", 102, Rarity.COMMON, mage.cards.l.LightningBolt.class)); - cards.add(new SetCardInfo("Lim-Dul's Vault", 148, Rarity.UNCOMMON, mage.cards.l.LimDulsVault.class)); - cards.add(new SetCardInfo("Lord of Tresserhorn", 149, Rarity.RARE, mage.cards.l.LordOfTresserhorn.class)); - cards.add(new SetCardInfo("Mana Flare", 103, Rarity.RARE, mage.cards.m.ManaFlare.class)); - cards.add(new SetCardInfo("Marton Stromgald", 104, Rarity.RARE, mage.cards.m.MartonStromgald.class)); - cards.add(new SetCardInfo("Mesa Pegasus", 20, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); - cards.add(new SetCardInfo("Mindstab Thrull", 76, Rarity.COMMON, mage.cards.m.MindstabThrull.class)); - cards.add(new SetCardInfo("Mirror Universe", 159, Rarity.RARE, mage.cards.m.MirrorUniverse.class)); - cards.add(new SetCardInfo("Mishra's Factory", 178, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class)); - cards.add(new SetCardInfo("Moat", 21, Rarity.RARE, mage.cards.m.Moat.class)); - cards.add(new SetCardInfo("Mountain", 190, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 191, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 192, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain Yeti", 105, Rarity.COMMON, mage.cards.m.MountainYeti.class)); - cards.add(new SetCardInfo("Mystic Remora", 42, Rarity.UNCOMMON, mage.cards.m.MysticRemora.class)); - cards.add(new SetCardInfo("Nature's Lore", 124, Rarity.COMMON, mage.cards.n.NaturesLore.class)); - cards.add(new SetCardInfo("Nether Shadow", 77, Rarity.UNCOMMON, mage.cards.n.NetherShadow.class)); - cards.add(new SetCardInfo("Nevinyrral's Disk", 160, Rarity.RARE, mage.cards.n.NevinyrralsDisk.class)); - cards.add(new SetCardInfo("Onulet", 161, Rarity.COMMON, mage.cards.o.Onulet.class)); - cards.add(new SetCardInfo("Orcish Mechanics", 106, Rarity.UNCOMMON, mage.cards.o.OrcishMechanics.class)); - cards.add(new SetCardInfo("Order of Leitbur", 22, Rarity.COMMON, mage.cards.o.OrderOfLeitbur.class)); - cards.add(new SetCardInfo("Order of the Ebon Hand", 78, Rarity.COMMON, mage.cards.o.OrderOfTheEbonHand.class)); - cards.add(new SetCardInfo("Oubliette", 79, Rarity.COMMON, mage.cards.o.Oubliette.class)); - cards.add(new SetCardInfo("Paralyze", 80, Rarity.COMMON, mage.cards.p.Paralyze.class)); - cards.add(new SetCardInfo("Petra Sphinx", 23, Rarity.RARE, mage.cards.p.PetraSphinx.class)); - cards.add(new SetCardInfo("Phantom Monster", 43, Rarity.COMMON, mage.cards.p.PhantomMonster.class)); - cards.add(new SetCardInfo("Phelddagrif", 150, Rarity.RARE, mage.cards.p.Phelddagrif.class)); - cards.add(new SetCardInfo("Phyrexian Boon", 81, Rarity.COMMON, mage.cards.p.PhyrexianBoon.class)); - cards.add(new SetCardInfo("Phyrexian War Beast", 162, Rarity.UNCOMMON, mage.cards.p.PhyrexianWarBeast.class)); - cards.add(new SetCardInfo("Plains", 181, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 182, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 183, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Polar Kraken", 44, Rarity.RARE, mage.cards.p.PolarKraken.class)); - cards.add(new SetCardInfo("Pox", 82, Rarity.RARE, mage.cards.p.Pox.class)); - cards.add(new SetCardInfo("Preacher", 24, Rarity.RARE, mage.cards.p.Preacher.class)); - cards.add(new SetCardInfo("Primal Order", 125, Rarity.RARE, mage.cards.p.PrimalOrder.class)); - cards.add(new SetCardInfo("Psychic Purge", 45, Rarity.UNCOMMON, mage.cards.p.PsychicPurge.class)); - cards.add(new SetCardInfo("Psychic Venom", 46, Rarity.COMMON, mage.cards.p.PsychicVenom.class)); - cards.add(new SetCardInfo("Pyroblast", 107, Rarity.COMMON, mage.cards.p.Pyroblast.class)); - cards.add(new SetCardInfo("Rabid Wombat", 126, Rarity.UNCOMMON, mage.cards.r.RabidWombat.class)); - cards.add(new SetCardInfo("Rainbow Vale", 179, Rarity.RARE, mage.cards.r.RainbowVale.class)); - cards.add(new SetCardInfo("Righteous Avengers", 25, Rarity.COMMON, mage.cards.r.RighteousAvengers.class)); - cards.add(new SetCardInfo("Ring of Ma'ruf", 163, Rarity.RARE, mage.cards.r.RingOfMaruf.class)); - cards.add(new SetCardInfo("River Merfolk", 47, Rarity.COMMON, mage.cards.r.RiverMerfolk.class)); - cards.add(new SetCardInfo("Roots", 127, Rarity.COMMON, mage.cards.r.Roots.class)); - cards.add(new SetCardInfo("Scryb Sprites", 128, Rarity.COMMON, mage.cards.s.ScrybSprites.class)); - cards.add(new SetCardInfo("Seasinger", 49, Rarity.UNCOMMON, mage.cards.s.Seasinger.class)); - cards.add(new SetCardInfo("Sea Sprite", 48, Rarity.COMMON, mage.cards.s.SeaSprite.class)); - cards.add(new SetCardInfo("Serendib Efreet", 50, Rarity.RARE, mage.cards.s.SerendibEfreet.class)); - cards.add(new SetCardInfo("Serpent Generator", 164, Rarity.RARE, mage.cards.s.SerpentGenerator.class)); - cards.add(new SetCardInfo("Shambling Strider", 129, Rarity.COMMON, mage.cards.s.ShamblingStrider.class)); - cards.add(new SetCardInfo("Shield of the Ages", 165, Rarity.UNCOMMON, mage.cards.s.ShieldOfTheAges.class)); - cards.add(new SetCardInfo("Shield Sphere", 166, Rarity.COMMON, mage.cards.s.ShieldSphere.class)); - cards.add(new SetCardInfo("Singing Tree", 130, Rarity.UNCOMMON, mage.cards.s.SingingTree.class)); - cards.add(new SetCardInfo("Spectral Bears", 131, Rarity.UNCOMMON, mage.cards.s.SpectralBears.class)); - cards.add(new SetCardInfo("Spinal Villain", 108, Rarity.UNCOMMON, mage.cards.s.SpinalVillain.class)); - cards.add(new SetCardInfo("Stone Calendar", 167, Rarity.UNCOMMON, mage.cards.s.StoneCalendar.class)); - cards.add(new SetCardInfo("Stone Giant", 109, Rarity.UNCOMMON, mage.cards.s.StoneGiant.class)); - cards.add(new SetCardInfo("Storm Seeker", 132, Rarity.UNCOMMON, mage.cards.s.StormSeeker.class)); - cards.add(new SetCardInfo("Su-Chi", 168, Rarity.RARE, mage.cards.s.SuChi.class)); - cards.add(new SetCardInfo("Sunken City", 51, Rarity.UNCOMMON, mage.cards.s.SunkenCity.class)); - cards.add(new SetCardInfo("Swamp", 187, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 188, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 189, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Sylvan Library", 133, Rarity.RARE, mage.cards.s.SylvanLibrary.class)); - cards.add(new SetCardInfo("Tawnos's Coffin", 169, Rarity.RARE, mage.cards.t.TawnossCoffin.class)); - cards.add(new SetCardInfo("Telekinesis", 52, Rarity.COMMON, mage.cards.t.Telekinesis.class)); - cards.add(new SetCardInfo("Thawing Glaciers", 180, Rarity.RARE, mage.cards.t.ThawingGlaciers.class)); - cards.add(new SetCardInfo("Thicket Basilisk", 134, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); - cards.add(new SetCardInfo("Thorn Thallid", 135, Rarity.COMMON, mage.cards.t.ThornThallid.class)); - cards.add(new SetCardInfo("Thrull Champion", 83, Rarity.RARE, mage.cards.t.ThrullChampion.class)); - cards.add(new SetCardInfo("Thrull Retainer", 84, Rarity.COMMON, mage.cards.t.ThrullRetainer.class)); - cards.add(new SetCardInfo("Thunder Spirit", 27, Rarity.UNCOMMON, mage.cards.t.ThunderSpirit.class)); - cards.add(new SetCardInfo("Time Elemental", 53, Rarity.RARE, mage.cards.t.TimeElemental.class)); - cards.add(new SetCardInfo("Tivadar's Crusade", 28, Rarity.UNCOMMON, mage.cards.t.TivadarsCrusade.class)); - cards.add(new SetCardInfo("Tornado", 136, Rarity.RARE, mage.cards.t.Tornado.class)); - cards.add(new SetCardInfo("Urza's Bauble", 170, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); - cards.add(new SetCardInfo("Urza's Chalice", 171, Rarity.COMMON, mage.cards.u.UrzasChalice.class)); - cards.add(new SetCardInfo("Varchild's War-Riders", 110, Rarity.RARE, mage.cards.v.VarchildsWarRiders.class)); - cards.add(new SetCardInfo("Vesuvan Doppelganger", 54, Rarity.RARE, mage.cards.v.VesuvanDoppelganger.class)); - cards.add(new SetCardInfo("Vodalian Knights", 55, Rarity.UNCOMMON, mage.cards.v.VodalianKnights.class)); - cards.add(new SetCardInfo("Walking Wall", 172, Rarity.UNCOMMON, mage.cards.w.WalkingWall.class)); - cards.add(new SetCardInfo("Wanderlust", 137, Rarity.COMMON, mage.cards.w.Wanderlust.class)); - cards.add(new SetCardInfo("Winds of Change", 111, Rarity.UNCOMMON, mage.cards.w.WindsOfChange.class)); - cards.add(new SetCardInfo("Winter Blast", 138, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); - cards.add(new SetCardInfo("Winter Orb", 173, Rarity.RARE, mage.cards.w.WinterOrb.class)); - cards.add(new SetCardInfo("Word of Undoing", 56, Rarity.COMMON, mage.cards.w.WordOfUndoing.class)); - cards.add(new SetCardInfo("Wyluli Wolf", 139, Rarity.COMMON, mage.cards.w.WyluliWolf.class)); - cards.add(new SetCardInfo("Yavimaya Ants", 140, Rarity.UNCOMMON, mage.cards.y.YavimayaAnts.class)); - cards.add(new SetCardInfo("Ydwen Efreet", 112, Rarity.RARE, mage.cards.y.YdwenEfreet.class)); - cards.add(new SetCardInfo("Zuran Orb", 174, Rarity.UNCOMMON, mage.cards.z.ZuranOrb.class)); - } + +package mage.sets; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * @author LevelX2 + */ +public final class MastersEdition extends ExpansionSet { + + private static final MastersEdition instance = new MastersEdition(); + + public static MastersEdition getInstance() { + return instance; + } + + private MastersEdition() { + super("Masters Edition", "MED", ExpansionSet.buildDate(2007, 9, 10), SetType.MAGIC_ONLINE); + this.hasBasicLands = true; + this.hasBoosters = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 10; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 0; + + cards.add(new SetCardInfo("Adun Oakenshield", 141, Rarity.RARE, mage.cards.a.AdunOakenshield.class)); + cards.add(new SetCardInfo("Amnesia", 29, Rarity.RARE, mage.cards.a.Amnesia.class)); + cards.add(new SetCardInfo("Angry Mob", 1, Rarity.UNCOMMON, mage.cards.a.AngryMob.class)); + cards.add(new SetCardInfo("Animate Dead", 57, Rarity.UNCOMMON, mage.cards.a.AnimateDead.class)); + cards.add(new SetCardInfo("Animate Wall", 2, Rarity.UNCOMMON, mage.cards.a.AnimateWall.class)); + cards.add(new SetCardInfo("Ankh of Mishra", 151, Rarity.RARE, mage.cards.a.AnkhOfMishra.class)); + cards.add(new SetCardInfo("Apprentice Wizard", 30, Rarity.COMMON, mage.cards.a.ApprenticeWizard.class)); + cards.add(new SetCardInfo("Arcane Denial", 31, Rarity.COMMON, mage.cards.a.ArcaneDenial.class)); + cards.add(new SetCardInfo("Argivian Archaeologist", 3, Rarity.RARE, mage.cards.a.ArgivianArchaeologist.class)); + cards.add(new SetCardInfo("Armageddon", 4, Rarity.RARE, mage.cards.a.Armageddon.class)); + cards.add(new SetCardInfo("Artifact Blast", 85, Rarity.COMMON, mage.cards.a.ArtifactBlast.class)); + cards.add(new SetCardInfo("Ashnod's Transmogrant", 152, Rarity.COMMON, mage.cards.a.AshnodsTransmogrant.class)); + cards.add(new SetCardInfo("Autumn Willow", 113, Rarity.RARE, mage.cards.a.AutumnWillow.class)); + cards.add(new SetCardInfo("Balduvian Horde", 86, Rarity.RARE, mage.cards.b.BalduvianHorde.class)); + cards.add(new SetCardInfo("Ball Lightning", 87, Rarity.RARE, mage.cards.b.BallLightning.class)); + cards.add(new SetCardInfo("Baron Sengir", 58, Rarity.RARE, mage.cards.b.BaronSengir.class)); + cards.add(new SetCardInfo("Basal Thrull", 59, Rarity.COMMON, mage.cards.b.BasalThrull.class)); + cards.add(new SetCardInfo("Benalish Hero", 5, Rarity.COMMON, mage.cards.b.BenalishHero.class)); + cards.add(new SetCardInfo("Berserk", 114, Rarity.RARE, mage.cards.b.Berserk.class)); + cards.add(new SetCardInfo("Bestial Fury", 88, Rarity.COMMON, mage.cards.b.BestialFury.class)); + cards.add(new SetCardInfo("Black Knight", 60, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); + cards.add(new SetCardInfo("Blight", 61, Rarity.UNCOMMON, mage.cards.b.Blight.class)); + cards.add(new SetCardInfo("Breeding Pit", 62, Rarity.UNCOMMON, mage.cards.b.BreedingPit.class)); + cards.add(new SetCardInfo("Brothers of Fire", 89, Rarity.COMMON, mage.cards.b.BrothersOfFire.class)); + cards.add(new SetCardInfo("Carnivorous Plant", 115, Rarity.UNCOMMON, mage.cards.c.CarnivorousPlant.class)); + cards.add(new SetCardInfo("Centaur Archer", 142, Rarity.UNCOMMON, mage.cards.c.CentaurArcher.class)); + cards.add(new SetCardInfo("Chains of Mephistopheles", 63, Rarity.RARE, mage.cards.c.ChainsOfMephistopheles.class)); + cards.add(new SetCardInfo("Chub Toad", 116, Rarity.COMMON, mage.cards.c.ChubToad.class)); + cards.add(new SetCardInfo("Clockwork Beast", 153, Rarity.UNCOMMON, mage.cards.c.ClockworkBeast.class)); + cards.add(new SetCardInfo("Contagion", 64, Rarity.RARE, mage.cards.c.Contagion.class)); + cards.add(new SetCardInfo("Copper Tablet", 154, Rarity.UNCOMMON, mage.cards.c.CopperTablet.class)); + cards.add(new SetCardInfo("Crookshank Kobolds", 90, Rarity.COMMON, mage.cards.c.CrookshankKobolds.class)); + cards.add(new SetCardInfo("Crusade", 6, Rarity.RARE, mage.cards.c.Crusade.class)); + cards.add(new SetCardInfo("Cuombajj Witches", 65, Rarity.COMMON, mage.cards.c.CuombajjWitches.class)); + cards.add(new SetCardInfo("Cursed Rack", 155, Rarity.UNCOMMON, mage.cards.c.CursedRack.class)); + cards.add(new SetCardInfo("Dakkon Blackblade", 143, Rarity.RARE, mage.cards.d.DakkonBlackblade.class)); + cards.add(new SetCardInfo("Death Speakers", 7, Rarity.COMMON, mage.cards.d.DeathSpeakers.class)); + cards.add(new SetCardInfo("Death Ward", 8, Rarity.COMMON, mage.cards.d.DeathWard.class)); + cards.add(new SetCardInfo("Derelor", 66, Rarity.UNCOMMON, mage.cards.d.Derelor.class)); + cards.add(new SetCardInfo("Diamond Valley", 175, Rarity.RARE, mage.cards.d.DiamondValley.class)); + cards.add(new SetCardInfo("Diminishing Returns", 32, Rarity.RARE, mage.cards.d.DiminishingReturns.class)); + cards.add(new SetCardInfo("Divine Transformation", 9, Rarity.UNCOMMON, mage.cards.d.DivineTransformation.class)); + cards.add(new SetCardInfo("Dragon Engine", 156, Rarity.COMMON, mage.cards.d.DragonEngine.class)); + cards.add(new SetCardInfo("Dust to Dust", 10, Rarity.COMMON, mage.cards.d.DustToDust.class)); + cards.add(new SetCardInfo("Dwarven Catapult", 91, Rarity.UNCOMMON, mage.cards.d.DwarvenCatapult.class)); + cards.add(new SetCardInfo("Dwarven Soldier", 92, Rarity.COMMON, mage.cards.d.DwarvenSoldier.class)); + cards.add(new SetCardInfo("Eater of the Dead", 67, Rarity.UNCOMMON, mage.cards.e.EaterOfTheDead.class)); + cards.add(new SetCardInfo("Elder Land Wurm", 11, Rarity.UNCOMMON, mage.cards.e.ElderLandWurm.class)); + cards.add(new SetCardInfo("Erg Raiders", 68, Rarity.COMMON, mage.cards.e.ErgRaiders.class)); + cards.add(new SetCardInfo("Eureka", 117, Rarity.RARE, mage.cards.e.Eureka.class)); + cards.add(new SetCardInfo("Exile", 12, Rarity.COMMON, mage.cards.e.Exile.class)); + cards.add(new SetCardInfo("Seraph", 26, Rarity.RARE, mage.cards.s.Seraph.class)); + cards.add(new SetCardInfo("The Fallen", 69, Rarity.UNCOMMON, mage.cards.t.TheFallen.class)); + cards.add(new SetCardInfo("Feast or Famine", 70, Rarity.COMMON, mage.cards.f.FeastOrFamine.class)); + cards.add(new SetCardInfo("Fire Covenant", 145, Rarity.UNCOMMON, mage.cards.f.FireCovenant.class)); + cards.add(new SetCardInfo("Fissure", 93, Rarity.COMMON, mage.cards.f.Fissure.class)); + cards.add(new SetCardInfo("Forcefield", 157, Rarity.RARE, mage.cards.f.Forcefield.class)); + cards.add(new SetCardInfo("Force of Will", 33, Rarity.RARE, mage.cards.f.ForceOfWill.class)); + cards.add(new SetCardInfo("Forest", 193, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 194, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 195, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Fyndhorn Elves", 118, Rarity.COMMON, mage.cards.f.FyndhornElves.class)); + cards.add(new SetCardInfo("Ghazban Ogre", 120, Rarity.COMMON, mage.cards.g.GhazbanOgre.class)); + cards.add(new SetCardInfo("Giant Tortoise", 34, Rarity.COMMON, mage.cards.g.GiantTortoise.class)); + cards.add(new SetCardInfo("Goblin Chirurgeon", 94, Rarity.COMMON, mage.cards.g.GoblinChirurgeon.class)); + cards.add(new SetCardInfo("Goblin Grenade", 95, Rarity.UNCOMMON, mage.cards.g.GoblinGrenade.class)); + cards.add(new SetCardInfo("Goblin Mutant", 96, Rarity.UNCOMMON, mage.cards.g.GoblinMutant.class)); + cards.add(new SetCardInfo("Goblins of the Flarg", 98, Rarity.COMMON, mage.cards.g.GoblinsOfTheFlarg.class)); + cards.add(new SetCardInfo("Goblin Wizard", 97, Rarity.RARE, mage.cards.g.GoblinWizard.class)); + cards.add(new SetCardInfo("Granite Gargoyle", 99, Rarity.UNCOMMON, mage.cards.g.GraniteGargoyle.class)); + cards.add(new SetCardInfo("Greater Realm of Preservation", 13, Rarity.UNCOMMON, mage.cards.g.GreaterRealmOfPreservation.class)); + cards.add(new SetCardInfo("Hallowed Ground", 14, Rarity.UNCOMMON, mage.cards.h.HallowedGround.class)); + cards.add(new SetCardInfo("Hand of Justice", 15, Rarity.RARE, mage.cards.h.HandOfJustice.class)); + cards.add(new SetCardInfo("Hecatomb", 71, Rarity.RARE, mage.cards.h.Hecatomb.class)); + cards.add(new SetCardInfo("High Tide", 35, Rarity.UNCOMMON, mage.cards.h.HighTide.class)); + cards.add(new SetCardInfo("Holy Light", 16, Rarity.COMMON, mage.cards.h.HolyLight.class)); + cards.add(new SetCardInfo("Homarid Spawning Bed", 36, Rarity.UNCOMMON, mage.cards.h.HomaridSpawningBed.class)); + cards.add(new SetCardInfo("Hungry Mist", 121, Rarity.COMMON, mage.cards.h.HungryMist.class)); + cards.add(new SetCardInfo("Hyalopterous Lemure", 72, Rarity.COMMON, mage.cards.h.HyalopterousLemure.class)); + cards.add(new SetCardInfo("Hydroblast", 37, Rarity.COMMON, mage.cards.h.Hydroblast.class)); + cards.add(new SetCardInfo("Hymn of Rebirth", 146, Rarity.UNCOMMON, mage.cards.h.HymnOfRebirth.class)); + cards.add(new SetCardInfo("Hymn to Tourach", 73, Rarity.UNCOMMON, mage.cards.h.HymnToTourach.class)); + cards.add(new SetCardInfo("Icatian Lieutenant", 17, Rarity.COMMON, mage.cards.i.IcatianLieutenant.class)); + cards.add(new SetCardInfo("Icatian Town", 18, Rarity.UNCOMMON, mage.cards.i.IcatianTown.class)); + cards.add(new SetCardInfo("Ice Storm", 122, Rarity.UNCOMMON, mage.cards.i.IceStorm.class)); + cards.add(new SetCardInfo("Ifh-Biff Efreet", 123, Rarity.RARE, mage.cards.i.IfhBiffEfreet.class)); + cards.add(new SetCardInfo("Illusionary Forces", 38, Rarity.UNCOMMON, mage.cards.i.IllusionaryForces.class)); + cards.add(new SetCardInfo("Illusionary Wall", 39, Rarity.COMMON, mage.cards.i.IllusionaryWall.class)); + cards.add(new SetCardInfo("Illusions of Grandeur", 40, Rarity.RARE, mage.cards.i.IllusionsOfGrandeur.class)); + cards.add(new SetCardInfo("Island", 184, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 185, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 186, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island of Wak-Wak", 176, Rarity.RARE, mage.cards.i.IslandOfWakWak.class)); + cards.add(new SetCardInfo("Ivory Tower", 158, Rarity.RARE, mage.cards.i.IvoryTower.class)); + cards.add(new SetCardInfo("Jacques le Vert", 147, Rarity.RARE, mage.cards.j.JacquesLeVert.class)); + cards.add(new SetCardInfo("Jokulhaups", 100, Rarity.RARE, mage.cards.j.Jokulhaups.class)); + cards.add(new SetCardInfo("Juxtapose", 41, Rarity.UNCOMMON, mage.cards.j.Juxtapose.class)); + cards.add(new SetCardInfo("Juzam Djinn", 74, Rarity.RARE, mage.cards.j.JuzamDjinn.class)); + cards.add(new SetCardInfo("Keldon Warlord", 101, Rarity.UNCOMMON, mage.cards.k.KeldonWarlord.class)); + cards.add(new SetCardInfo("Khabal Ghoul", 75, Rarity.RARE, mage.cards.k.KhabalGhoul.class)); + cards.add(new SetCardInfo("Knights of Thorn", 19, Rarity.COMMON, mage.cards.k.KnightsOfThorn.class)); + cards.add(new SetCardInfo("Lake of the Dead", 177, Rarity.RARE, mage.cards.l.LakeOfTheDead.class)); + cards.add(new SetCardInfo("Lightning Bolt", 102, Rarity.COMMON, mage.cards.l.LightningBolt.class)); + cards.add(new SetCardInfo("Lim-Dul's Vault", 148, Rarity.UNCOMMON, mage.cards.l.LimDulsVault.class)); + cards.add(new SetCardInfo("Lord of Tresserhorn", 149, Rarity.RARE, mage.cards.l.LordOfTresserhorn.class)); + cards.add(new SetCardInfo("Mana Flare", 103, Rarity.RARE, mage.cards.m.ManaFlare.class)); + cards.add(new SetCardInfo("Marton Stromgald", 104, Rarity.RARE, mage.cards.m.MartonStromgald.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 20, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); + cards.add(new SetCardInfo("Mindstab Thrull", 76, Rarity.COMMON, mage.cards.m.MindstabThrull.class)); + cards.add(new SetCardInfo("Mirror Universe", 159, Rarity.RARE, mage.cards.m.MirrorUniverse.class)); + cards.add(new SetCardInfo("Mishra's Factory", 178, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class)); + cards.add(new SetCardInfo("Moat", 21, Rarity.RARE, mage.cards.m.Moat.class)); + cards.add(new SetCardInfo("Mountain", 190, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 191, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 192, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain Yeti", 105, Rarity.COMMON, mage.cards.m.MountainYeti.class)); + cards.add(new SetCardInfo("Mystic Remora", 42, Rarity.UNCOMMON, mage.cards.m.MysticRemora.class)); + cards.add(new SetCardInfo("Nature's Lore", 124, Rarity.COMMON, mage.cards.n.NaturesLore.class)); + cards.add(new SetCardInfo("Nether Shadow", 77, Rarity.UNCOMMON, mage.cards.n.NetherShadow.class)); + cards.add(new SetCardInfo("Nevinyrral's Disk", 160, Rarity.RARE, mage.cards.n.NevinyrralsDisk.class)); + cards.add(new SetCardInfo("Onulet", 161, Rarity.COMMON, mage.cards.o.Onulet.class)); + cards.add(new SetCardInfo("Orcish Mechanics", 106, Rarity.UNCOMMON, mage.cards.o.OrcishMechanics.class)); + cards.add(new SetCardInfo("Order of Leitbur", 22, Rarity.COMMON, mage.cards.o.OrderOfLeitbur.class)); + cards.add(new SetCardInfo("Order of the Ebon Hand", 78, Rarity.COMMON, mage.cards.o.OrderOfTheEbonHand.class)); + cards.add(new SetCardInfo("Oubliette", 79, Rarity.COMMON, mage.cards.o.Oubliette.class)); + cards.add(new SetCardInfo("Paralyze", 80, Rarity.COMMON, mage.cards.p.Paralyze.class)); + cards.add(new SetCardInfo("Petra Sphinx", 23, Rarity.RARE, mage.cards.p.PetraSphinx.class)); + cards.add(new SetCardInfo("Phantom Monster", 43, Rarity.COMMON, mage.cards.p.PhantomMonster.class)); + cards.add(new SetCardInfo("Phelddagrif", 150, Rarity.RARE, mage.cards.p.Phelddagrif.class)); + cards.add(new SetCardInfo("Phyrexian Boon", 81, Rarity.COMMON, mage.cards.p.PhyrexianBoon.class)); + cards.add(new SetCardInfo("Phyrexian War Beast", 162, Rarity.UNCOMMON, mage.cards.p.PhyrexianWarBeast.class)); + cards.add(new SetCardInfo("Plains", 181, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 182, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 183, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Polar Kraken", 44, Rarity.RARE, mage.cards.p.PolarKraken.class)); + cards.add(new SetCardInfo("Pox", 82, Rarity.RARE, mage.cards.p.Pox.class)); + cards.add(new SetCardInfo("Preacher", 24, Rarity.RARE, mage.cards.p.Preacher.class)); + cards.add(new SetCardInfo("Primal Order", 125, Rarity.RARE, mage.cards.p.PrimalOrder.class)); + cards.add(new SetCardInfo("Psychic Purge", 45, Rarity.UNCOMMON, mage.cards.p.PsychicPurge.class)); + cards.add(new SetCardInfo("Psychic Venom", 46, Rarity.COMMON, mage.cards.p.PsychicVenom.class)); + cards.add(new SetCardInfo("Pyroblast", 107, Rarity.COMMON, mage.cards.p.Pyroblast.class)); + cards.add(new SetCardInfo("Rabid Wombat", 126, Rarity.UNCOMMON, mage.cards.r.RabidWombat.class)); + cards.add(new SetCardInfo("Rainbow Vale", 179, Rarity.RARE, mage.cards.r.RainbowVale.class)); + cards.add(new SetCardInfo("Righteous Avengers", 25, Rarity.COMMON, mage.cards.r.RighteousAvengers.class)); + cards.add(new SetCardInfo("Ring of Ma'ruf", 163, Rarity.RARE, mage.cards.r.RingOfMaruf.class)); + cards.add(new SetCardInfo("River Merfolk", 47, Rarity.COMMON, mage.cards.r.RiverMerfolk.class)); + cards.add(new SetCardInfo("Roots", 127, Rarity.COMMON, mage.cards.r.Roots.class)); + cards.add(new SetCardInfo("Scryb Sprites", 128, Rarity.COMMON, mage.cards.s.ScrybSprites.class)); + cards.add(new SetCardInfo("Seasinger", 49, Rarity.UNCOMMON, mage.cards.s.Seasinger.class)); + cards.add(new SetCardInfo("Sea Sprite", 48, Rarity.COMMON, mage.cards.s.SeaSprite.class)); + cards.add(new SetCardInfo("Seraph", 26, Rarity.RARE, mage.cards.s.Seraph.class)); + cards.add(new SetCardInfo("Serendib Efreet", 50, Rarity.RARE, mage.cards.s.SerendibEfreet.class)); + cards.add(new SetCardInfo("Serpent Generator", 164, Rarity.RARE, mage.cards.s.SerpentGenerator.class)); + cards.add(new SetCardInfo("Shambling Strider", 129, Rarity.COMMON, mage.cards.s.ShamblingStrider.class)); + cards.add(new SetCardInfo("Shield of the Ages", 165, Rarity.UNCOMMON, mage.cards.s.ShieldOfTheAges.class)); + cards.add(new SetCardInfo("Shield Sphere", 166, Rarity.COMMON, mage.cards.s.ShieldSphere.class)); + cards.add(new SetCardInfo("Singing Tree", 130, Rarity.UNCOMMON, mage.cards.s.SingingTree.class)); + cards.add(new SetCardInfo("Spectral Bears", 131, Rarity.UNCOMMON, mage.cards.s.SpectralBears.class)); + cards.add(new SetCardInfo("Spinal Villain", 108, Rarity.UNCOMMON, mage.cards.s.SpinalVillain.class)); + cards.add(new SetCardInfo("Stone Calendar", 167, Rarity.UNCOMMON, mage.cards.s.StoneCalendar.class)); + cards.add(new SetCardInfo("Stone Giant", 109, Rarity.UNCOMMON, mage.cards.s.StoneGiant.class)); + cards.add(new SetCardInfo("Storm Seeker", 132, Rarity.UNCOMMON, mage.cards.s.StormSeeker.class)); + cards.add(new SetCardInfo("Su-Chi", 168, Rarity.RARE, mage.cards.s.SuChi.class)); + cards.add(new SetCardInfo("Sunken City", 51, Rarity.UNCOMMON, mage.cards.s.SunkenCity.class)); + cards.add(new SetCardInfo("Swamp", 187, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 188, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 189, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sylvan Library", 133, Rarity.RARE, mage.cards.s.SylvanLibrary.class)); + cards.add(new SetCardInfo("Tawnos's Coffin", 169, Rarity.RARE, mage.cards.t.TawnossCoffin.class)); + cards.add(new SetCardInfo("Telekinesis", 52, Rarity.COMMON, mage.cards.t.Telekinesis.class)); + cards.add(new SetCardInfo("Thawing Glaciers", 180, Rarity.RARE, mage.cards.t.ThawingGlaciers.class)); + cards.add(new SetCardInfo("Thicket Basilisk", 134, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); + cards.add(new SetCardInfo("Thorn Thallid", 135, Rarity.COMMON, mage.cards.t.ThornThallid.class)); + cards.add(new SetCardInfo("Thrull Champion", 83, Rarity.RARE, mage.cards.t.ThrullChampion.class)); + cards.add(new SetCardInfo("Thrull Retainer", 84, Rarity.COMMON, mage.cards.t.ThrullRetainer.class)); + cards.add(new SetCardInfo("Thunder Spirit", 27, Rarity.UNCOMMON, mage.cards.t.ThunderSpirit.class)); + cards.add(new SetCardInfo("Time Elemental", 53, Rarity.RARE, mage.cards.t.TimeElemental.class)); + cards.add(new SetCardInfo("Tivadar's Crusade", 28, Rarity.UNCOMMON, mage.cards.t.TivadarsCrusade.class)); + cards.add(new SetCardInfo("Tornado", 136, Rarity.RARE, mage.cards.t.Tornado.class)); + cards.add(new SetCardInfo("Urza's Bauble", 170, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); + cards.add(new SetCardInfo("Urza's Chalice", 171, Rarity.COMMON, mage.cards.u.UrzasChalice.class)); + cards.add(new SetCardInfo("Varchild's War-Riders", 110, Rarity.RARE, mage.cards.v.VarchildsWarRiders.class)); + cards.add(new SetCardInfo("Vesuvan Doppelganger", 54, Rarity.RARE, mage.cards.v.VesuvanDoppelganger.class)); + cards.add(new SetCardInfo("Vodalian Knights", 55, Rarity.UNCOMMON, mage.cards.v.VodalianKnights.class)); + cards.add(new SetCardInfo("Walking Wall", 172, Rarity.UNCOMMON, mage.cards.w.WalkingWall.class)); + cards.add(new SetCardInfo("Wanderlust", 137, Rarity.COMMON, mage.cards.w.Wanderlust.class)); + cards.add(new SetCardInfo("Winds of Change", 111, Rarity.UNCOMMON, mage.cards.w.WindsOfChange.class)); + cards.add(new SetCardInfo("Winter Blast", 138, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); + cards.add(new SetCardInfo("Winter Orb", 173, Rarity.RARE, mage.cards.w.WinterOrb.class)); + cards.add(new SetCardInfo("Word of Undoing", 56, Rarity.COMMON, mage.cards.w.WordOfUndoing.class)); + cards.add(new SetCardInfo("Wyluli Wolf", 139, Rarity.COMMON, mage.cards.w.WyluliWolf.class)); + cards.add(new SetCardInfo("Yavimaya Ants", 140, Rarity.UNCOMMON, mage.cards.y.YavimayaAnts.class)); + cards.add(new SetCardInfo("Ydwen Efreet", 112, Rarity.RARE, mage.cards.y.YdwenEfreet.class)); + cards.add(new SetCardInfo("Zuran Orb", 174, Rarity.UNCOMMON, mage.cards.z.ZuranOrb.class)); + } } \ No newline at end of file From 837503d8f407e1c56c644a2b9aca38e8be0e3a35 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 17 Jan 2019 10:32:02 -0500 Subject: [PATCH 7/9] reworked coin doubling again for some reason --- Mage.Sets/src/mage/cards/k/KrarksThumb.java | 32 +++++++++++++------ .../java/org/mage/test/player/TestPlayer.java | 10 ------ .../java/org/mage/test/stub/PlayerStub.java | 10 ------ .../java/mage/game/events/FlipCoinEvent.java | 9 ++++++ Mage/src/main/java/mage/players/Player.java | 4 --- .../main/java/mage/players/PlayerImpl.java | 21 ++---------- 6 files changed, 34 insertions(+), 52 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KrarksThumb.java b/Mage.Sets/src/mage/cards/k/KrarksThumb.java index 4cca44bc8a4..09f0427eb2b 100644 --- a/Mage.Sets/src/mage/cards/k/KrarksThumb.java +++ b/Mage.Sets/src/mage/cards/k/KrarksThumb.java @@ -3,12 +3,16 @@ package mage.cards.k; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; import mage.game.Game; -import mage.players.Player; +import mage.game.events.FlipCoinEvent; +import mage.game.events.GameEvent; import java.util.UUID; @@ -35,7 +39,7 @@ public final class KrarksThumb extends CardImpl { } } -class KrarksThumbEffect extends ContinuousEffectImpl { +class KrarksThumbEffect extends ReplacementEffectImpl { KrarksThumbEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); @@ -52,12 +56,20 @@ class KrarksThumbEffect extends ContinuousEffectImpl { } @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.setExtraCoinFlips(2 * controller.getExtraCoinFlips()); - } - return true; + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + FlipCoinEvent flipCoinEvent = (FlipCoinEvent) event; + flipCoinEvent.setFlipCount(2 * flipCoinEvent.getFlipCount()); + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.FLIP_COIN; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.isControlledBy(event.getPlayerId()); } @Override diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 9a2b439da03..4842c49e6d2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -2418,16 +2418,6 @@ public class TestPlayer implements Player { computerPlayer.setLoyaltyUsePerTurn(loyaltyUsePerTurn); } - @Override - public int getExtraCoinFlips() { - return computerPlayer.getExtraCoinFlips(); - } - - @Override - public void setExtraCoinFlips(int extraCoinFlips) { - computerPlayer.setExtraCoinFlips(extraCoinFlips); - } - @Override public int getMaxHandSize() { return computerPlayer.getMaxHandSize(); diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java index 99e0f8d2ecd..384d89c21f1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -262,16 +262,6 @@ public class PlayerStub implements Player { } - @Override - public int getExtraCoinFlips() { - return 0; - } - - @Override - public void setExtraCoinFlips(int extraCoinFlips) { - - } - @Override public int getMaxHandSize() { return 0; diff --git a/Mage/src/main/java/mage/game/events/FlipCoinEvent.java b/Mage/src/main/java/mage/game/events/FlipCoinEvent.java index c2dceaa73e9..3dc799ad4ec 100644 --- a/Mage/src/main/java/mage/game/events/FlipCoinEvent.java +++ b/Mage/src/main/java/mage/game/events/FlipCoinEvent.java @@ -11,6 +11,7 @@ public class FlipCoinEvent extends GameEvent { private boolean result; private final boolean chosen; private final boolean winnable; + private int flipCount = 1; public FlipCoinEvent(UUID playerId, UUID sourceId, boolean result, boolean chosen, boolean winnable) { super(EventType.FLIP_COIN, playerId, sourceId, playerId); @@ -43,6 +44,14 @@ public class FlipCoinEvent extends GameEvent { return winnable; } + public int getFlipCount() { + return flipCount; + } + + public void setFlipCount(int flipCount) { + this.flipCount = flipCount; + } + public CoinFlippedEvent getFlippedEvent() { return new CoinFlippedEvent(playerId, sourceId, result, chosen, winnable); } diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index 5816fe82311..286b98f5acc 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -141,10 +141,6 @@ public interface Player extends MageItem, Copyable { void setLoyaltyUsePerTurn(int loyaltyUsePerTurn); - int getExtraCoinFlips(); - - void setExtraCoinFlips(int getExtraCoinFlips); - int getMaxHandSize(); void setMaxHandSize(int maxHandSize); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index c603706f904..fd777f1e11e 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -98,7 +98,6 @@ public abstract class PlayerImpl implements Player, Serializable { protected int landsPlayed; protected int landsPerTurn = 1; protected int loyaltyUsePerTurn = 1; - protected int extraCoinFlips = 1; protected int maxHandSize = 7; protected int maxAttackedBy = Integer.MAX_VALUE; protected ManaPool manaPool; @@ -224,7 +223,6 @@ public abstract class PlayerImpl implements Player, Serializable { this.landsPlayed = player.landsPlayed; this.landsPerTurn = player.landsPerTurn; this.loyaltyUsePerTurn = player.loyaltyUsePerTurn; - this.extraCoinFlips = player.extraCoinFlips; this.maxHandSize = player.maxHandSize; this.maxAttackedBy = player.maxAttackedBy; this.manaPool = player.manaPool.copy(); @@ -315,7 +313,6 @@ public abstract class PlayerImpl implements Player, Serializable { this.landsPlayed = player.getLandsPlayed(); this.landsPerTurn = player.getLandsPerTurn(); this.loyaltyUsePerTurn = player.getLoyaltyUsePerTurn(); - this.extraCoinFlips = player.getExtraCoinFlips(); this.maxHandSize = player.getMaxHandSize(); this.maxAttackedBy = player.getMaxAttackedBy(); this.manaPool = player.getManaPool().copy(); @@ -436,7 +433,6 @@ public abstract class PlayerImpl implements Player, Serializable { this.abilities.clear(); this.landsPerTurn = 1; this.loyaltyUsePerTurn = 1; - this.extraCoinFlips = 1; this.maxHandSize = 7; this.maxAttackedBy = Integer.MAX_VALUE; this.canGainLife = true; @@ -2083,16 +2079,6 @@ public abstract class PlayerImpl implements Player, Serializable { this.loyaltyUsePerTurn = loyaltyUsePerTurn; } - @Override - public int getExtraCoinFlips() { - return extraCoinFlips; - } - - @Override - public void setExtraCoinFlips(int extraCoinFlips) { - this.extraCoinFlips = extraCoinFlips; - } - @Override public int getMaxHandSize() { return maxHandSize; @@ -2593,12 +2579,11 @@ public abstract class PlayerImpl implements Player, Serializable { FlipCoinEvent event = new FlipCoinEvent(playerId, source.getSourceId(), result, chosen, winnable); event.addAppliedEffects(appliedEffects); game.replaceEvent(event); - if (extraCoinFlips > 1) { + if (event.getFlipCount() > 1) { boolean canChooseHeads = event.getResult(); boolean canChooseTails = !event.getResult(); - boolean tempFlip; - for (int i = 0; i < extraCoinFlips; i++) { - tempFlip = RandomUtil.nextBoolean(); + for (int i = 1; i < event.getFlipCount(); i++) { + boolean tempFlip = RandomUtil.nextBoolean(); canChooseHeads = canChooseHeads || tempFlip; canChooseTails = canChooseTails || !tempFlip; game.informPlayers(getLogName() + " flipped " + CardUtil.booleanToFlipName(tempFlip)); From 39d21f22e72a1e31a06aabdadbd16c614d3873bc Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 17 Jan 2019 09:34:01 -0600 Subject: [PATCH 8/9] - removed a duplicate of Seraph in masters edition set --- Mage.Sets/src/mage/sets/MastersEdition.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/MastersEdition.java b/Mage.Sets/src/mage/sets/MastersEdition.java index d4db191279d..17317b3cd8a 100644 --- a/Mage.Sets/src/mage/sets/MastersEdition.java +++ b/Mage.Sets/src/mage/sets/MastersEdition.java @@ -77,7 +77,6 @@ public final class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Erg Raiders", 68, Rarity.COMMON, mage.cards.e.ErgRaiders.class)); cards.add(new SetCardInfo("Eureka", 117, Rarity.RARE, mage.cards.e.Eureka.class)); cards.add(new SetCardInfo("Exile", 12, Rarity.COMMON, mage.cards.e.Exile.class)); - cards.add(new SetCardInfo("Seraph", 26, Rarity.RARE, mage.cards.s.Seraph.class)); cards.add(new SetCardInfo("The Fallen", 69, Rarity.UNCOMMON, mage.cards.t.TheFallen.class)); cards.add(new SetCardInfo("Feast or Famine", 70, Rarity.COMMON, mage.cards.f.FeastOrFamine.class)); cards.add(new SetCardInfo("Fire Covenant", 145, Rarity.UNCOMMON, mage.cards.f.FireCovenant.class)); From cbc814d38e9314cdfb2f6851e123a02c3e6a0fc5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 17 Jan 2019 10:57:53 -0500 Subject: [PATCH 9/9] some log message changes --- Mage/src/main/java/mage/players/PlayerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index fd777f1e11e..155f74ceccc 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -2579,6 +2579,7 @@ public abstract class PlayerImpl implements Player, Serializable { FlipCoinEvent event = new FlipCoinEvent(playerId, source.getSourceId(), result, chosen, winnable); event.addAppliedEffects(appliedEffects); game.replaceEvent(event); + game.informPlayers(getLogName() + " flipped " + CardUtil.booleanToFlipName(event.getResult())); if (event.getFlipCount() > 1) { boolean canChooseHeads = event.getResult(); boolean canChooseTails = !event.getResult(); @@ -2598,8 +2599,8 @@ public abstract class PlayerImpl implements Player, Serializable { } else { event.setResult(false); } + game.informPlayers(getLogName() + " chose to keep " + CardUtil.booleanToFlipName(event.getResult())); } - game.informPlayers(getLogName() + " got " + CardUtil.booleanToFlipName(event.getResult())); if (event.isWinnable()) { game.informPlayers(getLogName() + " " + (event.getResult() == event.getChosen() ? "won" : "lost") + " the flip"); }