From bda10ed04cd07ec7fa8bac4da1322efb41ca7135 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 29 Aug 2018 01:15:29 +0200 Subject: [PATCH 01/17] Implemented Unglued cards --- .../src/mage/cards/c/ChecksAndBalances.java | 119 ++++++++++++++ Mage.Sets/src/mage/cards/c/ClamIAm.java | 92 +++++++++++ Mage.Sets/src/mage/cards/c/Clambassadors.java | 102 ++++++++++++ Mage.Sets/src/mage/cards/d/Denied.java | 80 +++++++++ .../src/mage/cards/f/FlockOfRabidSheep.java | 71 ++++++++ .../src/mage/cards/f/FreeRangeChicken.java | 135 +++++++++++++++ .../src/mage/cards/g/GoblinBowlingTeam.java | 110 +++++++++++++ Mage.Sets/src/mage/cards/r/Ricochet.java | 154 ++++++++++++++++++ .../src/mage/cards/s/SpatulaOfTheAges.java | 56 +++++++ .../src/mage/cards/t/TempOfTheDamned.java | 107 ++++++++++++ Mage.Sets/src/mage/sets/Unglued.java | 13 +- .../src/main/java/mage/constants/SubType.java | 1 + .../main/java/mage/counters/CounterType.java | 1 + .../game/permanent/token/RabidSheepToken.java | 22 +++ 14 files changed, 1062 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/c/ChecksAndBalances.java create mode 100644 Mage.Sets/src/mage/cards/c/ClamIAm.java create mode 100644 Mage.Sets/src/mage/cards/c/Clambassadors.java create mode 100644 Mage.Sets/src/mage/cards/d/Denied.java create mode 100644 Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java create mode 100644 Mage.Sets/src/mage/cards/f/FreeRangeChicken.java create mode 100644 Mage.Sets/src/mage/cards/g/GoblinBowlingTeam.java create mode 100644 Mage.Sets/src/mage/cards/r/Ricochet.java create mode 100644 Mage.Sets/src/mage/cards/s/SpatulaOfTheAges.java create mode 100644 Mage.Sets/src/mage/cards/t/TempOfTheDamned.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java diff --git a/Mage.Sets/src/mage/cards/c/ChecksAndBalances.java b/Mage.Sets/src/mage/cards/c/ChecksAndBalances.java new file mode 100644 index 0000000000..183ef31141 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChecksAndBalances.java @@ -0,0 +1,119 @@ + +package mage.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CastOnlyIfConditionIsTrueAbility; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.filter.FilterSpell; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author L_J + */ +public final class ChecksAndBalances extends CardImpl { + + public ChecksAndBalances(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); + + // Cast this spell only if there are three or more players in the game. + this.addAbility(new CastOnlyIfConditionIsTrueAbility(ChecksAndBalancesCondition.instance, "Cast this spell only if there are three or more players in the game")); + + // Whenever a player casts a spell, each of that player’s opponents may discard a card. If they do, counter that spell. + this.addAbility(new SpellCastAllTriggeredAbility(new ChecksAndBalancesEffect(), new FilterSpell("a spell"), false, SetTargetPointer.SPELL)); + } + + public ChecksAndBalances(final ChecksAndBalances card) { + super(card); + } + + @Override + public ChecksAndBalances copy() { + return new ChecksAndBalances(this); + } +} + +enum ChecksAndBalancesCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + return game.getPlayerList().size() >= 3; + } + + @Override + public String toString() { + return "there are three or more players in the game"; + } +} + +class ChecksAndBalancesEffect extends OneShotEffect { + + public ChecksAndBalancesEffect() { + super(Outcome.Detriment); + staticText = "each of that player’s opponents may discard a card. If they do, counter that spell"; + } + + public ChecksAndBalancesEffect(final ChecksAndBalancesEffect effect) { + super(effect); + } + + @Override + public ChecksAndBalancesEffect copy() { + return new ChecksAndBalancesEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); + if (spell != null) { + for (UUID uuid : game.getOpponents(spell.getControllerId())) { + Player player = game.getPlayer(uuid); + if (player != null) { + if (player.getHand().isEmpty()) { + game.informPlayers(player.getLogName() + " doesn't have a card in hand to discard to counter " + spell.getLogName() + ", effect aborted."); + return true; + } + } + } + for (UUID uuid : game.getOpponents(spell.getControllerId())) { + Player player = game.getPlayer(uuid); + if (player != null) { + if (!player.chooseUse(outcome, "Do you wish to discard a card to counter " + spell.getLogName() + '?', source, game)) { + game.informPlayers(player.getLogName() + " refuses to discard a card to counter " + spell.getLogName()); + return true; + } else { + game.informPlayers(player.getLogName() + " agrees to discard a card to counter " + spell.getLogName()); + } + } + } + for (UUID uuid : game.getOpponents(spell.getControllerId())) { + Player player = game.getPlayer(uuid); + if (player != null && !player.getHand().isEmpty()) { + TargetCardInHand target = new TargetCardInHand(); + if (player.choose(Outcome.Discard, target, source.getSourceId(), game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + player.discard(card, source, game); + } + } + } + } + game.getStack().counter(spell.getId(), source.getSourceId(), game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/ClamIAm.java b/Mage.Sets/src/mage/cards/c/ClamIAm.java new file mode 100644 index 0000000000..5ac727a7c2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ClamIAm.java @@ -0,0 +1,92 @@ + +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class ClamIAm extends CardImpl { + + public ClamIAm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.subtype.add(SubType.CLAMFOLK); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // If you roll a 3 on a six-sided die, you may reroll that die. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ClamIAmEffect())); + } + + public ClamIAm(final ClamIAm card) { + super(card); + } + + @Override + public ClamIAm copy() { + return new ClamIAm(this); + } +} + +class ClamIAmEffect extends ReplacementEffectImpl { + + ClamIAmEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If you roll a 3 on a six-sided die, you may reroll that die"; + } + + ClamIAmEffect(final ClamIAmEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player player = game.getPlayer(event.getPlayerId()); + if (player != null) { + String data = event.getData(); + int numSides = Integer.parseInt(data); + if (numSides == 6 && event.getAmount() == 3) { + if (player.chooseUse(outcome, "Reroll the die?", source, game)) { + game.informPlayers(player.getLogName() + " chose to reroll the die."); + event.setAmount(player.rollDice(game, 6)); + } + } + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ROLL_DICE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.getControllerId().equals(event.getPlayerId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public ClamIAmEffect copy() { + return new ClamIAmEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/Clambassadors.java b/Mage.Sets/src/mage/cards/c/Clambassadors.java new file mode 100644 index 0000000000..20bd836355 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Clambassadors.java @@ -0,0 +1,102 @@ + +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetControlledPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public final class Clambassadors extends CardImpl { + + public Clambassadors(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.subtype.add(SubType.CLAMFOLK); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Clambassadors deals damage to a player, choose an artifact, creature, or land you control. That player gains control of that permanent. + this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new ClambassadorsEffect(), false, true)); + } + + public Clambassadors(final Clambassadors card) { + super(card); + } + + @Override + public Clambassadors copy() { + return new Clambassadors(this); + } +} + + +class ClambassadorsEffect extends OneShotEffect { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact, creature, or land you control"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); + } + + public ClambassadorsEffect() { + super(Outcome.Detriment); + this.staticText = "choose an artifact, creature, or land you control. That player gains control of that permanent"; + } + + public ClambassadorsEffect(final ClambassadorsEffect effect) { + super(effect); + } + + @Override + public ClambassadorsEffect copy() { + return new ClambassadorsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Target target = new TargetControlledPermanent(1, 1, filter, true); + if (target.canChoose(source.getSourceId(), controller.getId(), game)) { + while (!target.isChosen() && target.canChoose(controller.getId(), game) && controller.canRespond()) { + controller.chooseTarget(outcome, target, source, game); + } + } + Permanent permanent = game.getPermanent(target.getFirstTarget()); + Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (permanent != null && opponent != null) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, true, opponent.getId()); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + game.informPlayers(opponent.getLogName() + " has gained control of " + permanent.getLogName()); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/Denied.java b/Mage.Sets/src/mage/cards/d/Denied.java new file mode 100644 index 0000000000..534d1a1a5f --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/Denied.java @@ -0,0 +1,80 @@ + +package mage.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author L_J + */ +public final class Denied extends CardImpl { + + public Denied(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); + + // Choose a card name, then target spell's controller reveals their hand. If a card with the chosen name is revealed this way, counter that spell. + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new DeniedEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public Denied(final Denied card) { + super(card); + } + + @Override + public Denied copy() { + return new Denied(this); + } +} + +class DeniedEffect extends OneShotEffect { + + public DeniedEffect() { + super(Outcome.Detriment); + staticText = "Choose a card name, then target spell's controller reveals their hand. If a card with the chosen name is revealed this way, counter that spell"; + } + + public DeniedEffect(final DeniedEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); + if (targetSpell == null) { + return true; + } + Player player = game.getPlayer(targetSpell.getControllerId()); + Object object = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); + if (player != null && object instanceof String) { + player.revealCards("Denied!", player.getHand(), game, true); + String namedCard = (String) object; + for (Card card : player.getHand().getCards(game)) { + if (card != null && card.getName().equals(namedCard)) { + game.getStack().counter(targetSpell.getId(), source.getSourceId(), game); + break; + } + } + return true; + } + return false; + } + + @Override + public DeniedEffect copy() { + return new DeniedEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java b/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java new file mode 100644 index 0000000000..dca7f6524a --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java @@ -0,0 +1,71 @@ + +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.token.SoldierToken; +import mage.players.Player; + +/** + * + * @author L_J + */ +public class FlockOfRabidSheep extends CardImpl { + + public FlockOfRabidSheep(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}{G}"); + + // Flip X coins. For each flip you win, create a 2/2 green Sheep creature token named Rabid Sheep. + this.getSpellAbility().addEffect(new FlockOfRabidSheepEffect()); + } + + public FlockOfRabidSheep(final FlockOfRabidSheep card) { + super(card); + } + + @Override + public FlockOfRabidSheep copy() { + return new FlockOfRabidSheep(this); + } +} + +class FlockOfRabidSheepEffect extends OneShotEffect { + + public FlockOfRabidSheepEffect() { + super(Outcome.LoseLife); + this.staticText = "Flip X coins. For each flip you win, create a 2/2 green Sheep creature token named Rabid Sheep"; + } + + public FlockOfRabidSheepEffect(final FlockOfRabidSheepEffect effect) { + super(effect); + } + + @Override + public FlockOfRabidSheepEffect copy() { + return new FlockOfRabidSheepEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int repeat = source.getManaCostsToPay().getX(); + int wonCount = 0; + for (int i = 1; i <= repeat; i++) { + if (controller.flipCoin(game)) { + wonCount++; + } + } + new CreateTokenEffect(new RabidSheepToken(), wonCount).apply(game, source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java b/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java new file mode 100644 index 0000000000..47310ccc4b --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FreeRangeChicken.java @@ -0,0 +1,135 @@ + +package mage.cards.f; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.watchers.Watcher; + +/** + * + * @author L_J + */ +public final class FreeRangeChicken extends CardImpl { + + public FreeRangeChicken(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.CHICKEN); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {1}{G}: Roll two six-sided dice. If both results are the same, Free-Range Chicken gets +X/+X until end of turn, where X is that result. If the total of those results is equal to any other total you have rolled this turn for Free-Range Chicken, sacrifice it. (For example, if you roll two 3s, Free-Range Chicken gets +3/+3. If you roll a total of 6 for Free-Range Chicken later that turn, sacrifice it.) + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new FreeRangeChickenEffect(), new ManaCostsImpl("{1}{G}")), new FreeRangeChickenWatcher()); + } + + public FreeRangeChicken(final FreeRangeChicken card) { + super(card); + } + + @Override + public FreeRangeChicken copy() { + return new FreeRangeChicken(this); + } +} + +class FreeRangeChickenEffect extends OneShotEffect { + + public FreeRangeChickenEffect() { + super(Outcome.BoostCreature); + this.staticText = "Roll two six-sided dice. If both results are the same, Free-Range Chicken gets +X/+X until end of turn, where X is that result. If the total of those results is equal to any other total you have rolled this turn for Free-Range Chicken, sacrifice it"; + } + + public FreeRangeChickenEffect(final FreeRangeChickenEffect effect) { + super(effect); + } + + @Override + public FreeRangeChickenEffect copy() { + return new FreeRangeChickenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int firstRoll = controller.rollDice(game, 6); + int secondRoll = controller.rollDice(game, 6); + if (firstRoll == secondRoll) { + game.addEffect(new BoostSourceEffect(firstRoll, firstRoll, Duration.EndOfTurn), source); + } + FreeRangeChickenWatcher watcher = (FreeRangeChickenWatcher) game.getState().getWatchers().get(FreeRangeChickenWatcher.class.getSimpleName()); + if (watcher != null) { + int totalRoll = firstRoll + secondRoll; + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + if (sourcePermanent != null) { + if (watcher.rolledThisTurn(sourcePermanent.getId(), totalRoll)) { + sourcePermanent.sacrifice(source.getSourceId(), game); + } else { + watcher.addRoll(sourcePermanent.getId(), totalRoll); + } + } + } + return true; + } + return false; + } +} + +class FreeRangeChickenWatcher extends Watcher { + + private final Map totalRolls = new HashMap<>(); + + public FreeRangeChickenWatcher() { + super(FreeRangeChickenWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public FreeRangeChickenWatcher(final FreeRangeChickenWatcher watcher) { + super(watcher); + for (Map.Entry entry : watcher.totalRolls.entrySet()) { + this.totalRolls.put(entry.getKey(), entry.getValue()); + } + } + + @Override + public void watch(GameEvent event, Game game) { + } + + @Override + public void reset() { + totalRolls.clear(); + } + + @Override + public FreeRangeChickenWatcher copy() { + return new FreeRangeChickenWatcher(this); + } + + public void addRoll(UUID sourceId, int roll) { + totalRolls.put(sourceId, roll); + } + + public boolean rolledThisTurn(UUID sourceId, int roll) { + if (totalRolls.get(sourceId) != null) { + return totalRolls.get(sourceId) == roll; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoblinBowlingTeam.java b/Mage.Sets/src/mage/cards/g/GoblinBowlingTeam.java new file mode 100644 index 0000000000..663449e3ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinBowlingTeam.java @@ -0,0 +1,110 @@ + +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamageEvent; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author L_J + */ +public final class GoblinBowlingTeam extends CardImpl { + + public GoblinBowlingTeam(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + this.subtype.add(SubType.GOBLIN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // If Goblin Bowling Team would deal damage to a permanent or player, it deals that much damage plus the result of a six-sided die roll to that permanent or player instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GoblinBowlingTeamEffect())); + + } + + public GoblinBowlingTeam(final GoblinBowlingTeam card) { + super(card); + } + + @Override + public GoblinBowlingTeam copy() { + return new GoblinBowlingTeam(this); + } +} + +class GoblinBowlingTeamEffect extends ReplacementEffectImpl { + + public GoblinBowlingTeamEffect() { + super(Duration.WhileOnBattlefield, Outcome.Damage); + staticText = "If {this} would deal damage to a permanent or player, it deals that much damage plus the result of a six-sided die roll to that permanent or player instead"; + } + + public GoblinBowlingTeamEffect(final GoblinBowlingTeamEffect effect) { + super(effect); + } + + @Override + public GoblinBowlingTeamEffect copy() { + return new GoblinBowlingTeamEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + switch (event.getType()) { + case DAMAGE_CREATURE: + case DAMAGE_PLAYER: + case DAMAGE_PLANESWALKER: + return true; + default: + return false; + } + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return event.getSourceId().equals(source.getSourceId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + DamageEvent damageEvent = (DamageEvent) event; + if (damageEvent.getType() == EventType.DAMAGE_PLAYER) { + Player targetPlayer = game.getPlayer(event.getTargetId()); + if (targetPlayer != null) { + targetPlayer.damage(CardUtil.addWithOverflowCheck(damageEvent.getAmount(), controller.rollDice(game, 6)), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); + return true; + } + } else { + Permanent targetPermanent = game.getPermanent(event.getTargetId()); + if (targetPermanent != null) { + targetPermanent.damage(CardUtil.addWithOverflowCheck(damageEvent.getAmount(), controller.rollDice(game, 6)), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/Ricochet.java b/Mage.Sets/src/mage/cards/r/Ricochet.java new file mode 100644 index 0000000000..f52a37caad --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Ricochet.java @@ -0,0 +1,154 @@ + +package mage.cards.r; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.filter.FilterSpell; +import mage.filter.predicate.ObjectPlayer; +import mage.filter.predicate.ObjectPlayerPredicate; +import mage.filter.predicate.mageobject.NumberOfTargetsPredicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.Target; +import mage.target.Targets; +import mage.util.TargetAddress; + +/** + * + * @author L_J + */ +public final class Ricochet extends CardImpl { + + protected static final FilterSpell filter = new FilterSpell("a spell that targets a single player"); + + static { + filter.add(new NumberOfTargetsPredicate(1)); + filter.add(new SpellWithOnlyPlayerTargetsPredicate()); + } + + public Ricochet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); + + // Whenever a player casts a spell that targets a single player, each player rolls a six-sided die. Change the target of that spell to the player with the lowest result. Reroll to break ties, if necessary. + this.addAbility(new SpellCastAllTriggeredAbility(new RicochetEffect(), filter, false, SetTargetPointer.SPELL)); + } + + public Ricochet(final Ricochet card) { + super(card); + } + + @Override + public Ricochet copy() { + return new Ricochet(this); + } +} + +class SpellWithOnlyPlayerTargetsPredicate implements ObjectPlayerPredicate> { + + @Override + public boolean apply(ObjectPlayer input, Game game) { + Spell spell = input.getObject(); + if (spell == null) { + return false; + } + for (TargetAddress addr : TargetAddress.walk(spell)) { + Target targetInstance = addr.getTarget(spell); + for (UUID targetId : targetInstance.getTargets()) { + if (game.getPlayer(targetId) == null) { + return false; + } + } + } + return true; + } +} + +class RicochetEffect extends OneShotEffect { + + public RicochetEffect() { + super(Outcome.Detriment); + staticText = "each player rolls a six-sided die. Change the target of that spell to the player with the lowest result. Reroll to break ties, if necessary"; + } + + public RicochetEffect(final RicochetEffect effect) { + super(effect); + } + + @Override + public RicochetEffect copy() { + return new RicochetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); + if (spell != null) { + Targets targets = new Targets(); + Ability sourceAbility = spell.getSpellAbility(); + for (UUID modeId : sourceAbility.getModes().getSelectedModes()) { + Mode mode = sourceAbility.getModes().get(modeId); + targets.addAll(mode.getTargets()); + } + if (targets.size() != 1 || targets.get(0).getTargets().size() != 1) { + return false; + } + + Map playerRolls = new HashMap<>(); + for (UUID playerId : game.getPlayerList().copy()) { + Player player = game.getPlayer(playerId); + if (player != null) { + playerRolls.put(player, 7); + } + } + do { + for (Player player : playerRolls.keySet()) { + playerRolls.put(player, player.rollDice(game, 6)); + } + int minValueInMap = Collections.min(playerRolls.values()); + for (Map.Entry mapEntry : new HashSet<>(playerRolls.entrySet())) { + if (mapEntry.getValue() > minValueInMap) { + playerRolls.remove(mapEntry.getKey()); + } + } + } while (playerRolls.size() > 1); + + if (playerRolls.size() == 1) { + Player loser = (Player) playerRolls.keySet().toArray()[0]; + UUID loserId = loser.getId(); + Target target = targets.get(0); + if (target.getFirstTarget().equals(loserId)) { + return true; + } + String oldTargetName = null; + if (target.canTarget(spell.getControllerId(), loserId, sourceAbility, game)) { + Player oldPlayer = game.getPlayer(targets.getFirstTarget()); + if (oldPlayer != null) { + oldTargetName = oldPlayer.getLogName(); + } + target.clearChosen(); + target.addTarget(loserId, sourceAbility, game); + } + MageObject sourceObject = game.getObject(source.getSourceId()); + if (oldTargetName != null && sourceObject != null) { + game.informPlayers(sourceObject.getLogName() + ": Changed target of " + spell.getLogName() + " from " + oldTargetName + " to " + loser.getLogName()); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpatulaOfTheAges.java b/Mage.Sets/src/mage/cards/s/SpatulaOfTheAges.java new file mode 100644 index 0000000000..c6ece6f912 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpatulaOfTheAges.java @@ -0,0 +1,56 @@ + +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.filter.predicate.other.ExpansionSetPredicate; + +/** + * + * @author L_J + */ +public final class SpatulaOfTheAges extends CardImpl { + + private static final FilterPermanentCard filter = new FilterPermanentCard("a silver-bordered permanent card"); + + static { + filter.add(Predicates.and( + Predicates.not(new SupertypePredicate(SuperType.BASIC)), // all Un-set basic lands are black bordered cards, and thus illegal choices + Predicates.not(new NamePredicate("Steamflogger Boss")), // printed in Unstable with a black border + Predicates.or(new ExpansionSetPredicate("UGL"), new ExpansionSetPredicate("UNH"), new ExpansionSetPredicate("UST")) + )); + } + + public SpatulaOfTheAges(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + + // {4}, {T}, Sacrifice Spatula of the Ages: You may put a silver-bordered permanent card from your hand onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(filter), new ManaCostsImpl("{4}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public SpatulaOfTheAges(final SpatulaOfTheAges card) { + super(card); + } + + @Override + public SpatulaOfTheAges copy() { + return new SpatulaOfTheAges(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TempOfTheDamned.java b/Mage.Sets/src/mage/cards/t/TempOfTheDamned.java new file mode 100644 index 0000000000..8d1249e920 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TempOfTheDamned.java @@ -0,0 +1,107 @@ + +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class TempOfTheDamned extends CardImpl { + + public TempOfTheDamned(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // As Temp of the Damned enters the battlefield, roll a six-sided die. Temp of the Damned enters the battlefield with a number of funk counters on it equal to the result. + this.addAbility(new AsEntersBattlefieldAbility(new TempOfTheDamnedEffect())); + + // At the beginning of your upkeep, remove a funk counter from Temp of the Damned. If you can't, sacrifice it. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TempOfTheDamnedUpkeepEffect(), TargetController.YOU, false)); + } + + public TempOfTheDamned(final TempOfTheDamned card) { + super(card); + } + + @Override + public TempOfTheDamned copy() { + return new TempOfTheDamned(this); + } +} + +class TempOfTheDamnedEffect extends OneShotEffect { + + public TempOfTheDamnedEffect() { + super(Outcome.Neutral); + staticText = "roll a six-sided die. {this} enters the battlefield with a number of funk counters on it equal to the result"; + } + + public TempOfTheDamnedEffect(final TempOfTheDamnedEffect effect) { + super(effect); + } + + @Override + public TempOfTheDamnedEffect copy() { + return new TempOfTheDamnedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + return new AddCountersSourceEffect(CounterType.FUNK.createInstance(controller.rollDice(game, 6))).apply(game, source); + } + return false; + } +} + +class TempOfTheDamnedUpkeepEffect extends OneShotEffect { + + TempOfTheDamnedUpkeepEffect() { + super(Outcome.Sacrifice); + staticText = "remove a funk counter from {this}. If you can't, sacrifice it"; + } + + TempOfTheDamnedUpkeepEffect(final TempOfTheDamnedUpkeepEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + int amount = permanent.getCounters(game).getCount(CounterType.FUNK); + if (amount > 0) { + permanent.removeCounters(CounterType.FUNK.createInstance(), game); + } else { + permanent.sacrifice(source.getSourceId(), game); + } + return true; + } + return false; + } + + @Override + public TempOfTheDamnedUpkeepEffect copy() { + return new TempOfTheDamnedUpkeepEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Unglued.java b/Mage.Sets/src/mage/sets/Unglued.java index 524cae92c9..1a9c250908 100644 --- a/Mage.Sets/src/mage/sets/Unglued.java +++ b/Mage.Sets/src/mage/sets/Unglued.java @@ -21,12 +21,20 @@ public final class Unglued extends ExpansionSet { private Unglued() { super("Unglued", "UGL", ExpansionSet.buildDate(1998, 8, 11), SetType.JOKESET); - cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); + cards.add(new SetCardInfo("Checks and Balances", 16, Rarity.UNCOMMON, mage.cards.c.ChecksAndBalances.class)); cards.add(new SetCardInfo("Chicken a la King", 17, Rarity.RARE, mage.cards.c.ChickenALaKing.class)); + cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); + cards.add(new SetCardInfo("Clambassadors", 18, Rarity.COMMON, mage.cards.c.Clambassadors.class)); + cards.add(new SetCardInfo("Clam-I-Am", 19, Rarity.COMMON, mage.cards.c.ClamIAm.class)); + cards.add(new SetCardInfo("Denied!", 22, Rarity.COMMON, mage.cards.d.Denied.class)); cards.add(new SetCardInfo("Elvish Impersonators", 56, Rarity.COMMON, mage.cards.e.ElvishImpersonators.class)); + cards.add(new SetCardInfo("Flock of Rabid Sheep", 57, Rarity.UNCOMMON, mage.cards.f.FlockOfRabidSheep.class)); cards.add(new SetCardInfo("Forest", 88, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false))); cards.add(new SetCardInfo("Fowl Play", 24, Rarity.COMMON, mage.cards.f.FowlPlay.class)); + cards.add(new SetCardInfo("Free-for-All", 25, Rarity.RARE, mage.cards.f.FreeForAll.class)); + cards.add(new SetCardInfo("Free-Range Chicken", 58, Rarity.COMMON, mage.cards.f.FreeRangeChicken.class)); cards.add(new SetCardInfo("Gerrymandering", 59, Rarity.UNCOMMON, mage.cards.g.Gerrymandering.class)); + cards.add(new SetCardInfo("Goblin Bowling Team", 44, Rarity.COMMON, mage.cards.g.GoblinBowlingTeam.class)); cards.add(new SetCardInfo("Goblin Tutor", 45, Rarity.UNCOMMON, mage.cards.g.GoblinTutor.class)); cards.add(new SetCardInfo("Growth Spurt", 61, Rarity.COMMON, mage.cards.g.GrowthSpurt.class)); cards.add(new SetCardInfo("Hungry Hungry Heifer", 63, Rarity.UNCOMMON, mage.cards.h.HungryHungryHeifer.class)); @@ -41,11 +49,14 @@ public final class Unglued extends ExpansionSet { cards.add(new SetCardInfo("Paper Tiger", 78, Rarity.COMMON, mage.cards.p.PaperTiger.class)); cards.add(new SetCardInfo("Plains", 84, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false))); cards.add(new SetCardInfo("Poultrygeist", 37, Rarity.COMMON, mage.cards.p.Poultrygeist.class)); + cards.add(new SetCardInfo("Ricochet", 50, Rarity.UNCOMMON, mage.cards.r.Ricochet.class)); cards.add(new SetCardInfo("Rock Lobster", 79, Rarity.COMMON, mage.cards.r.RockLobster.class)); cards.add(new SetCardInfo("Scissors Lizard", 80, Rarity.COMMON, mage.cards.s.ScissorsLizard.class)); cards.add(new SetCardInfo("Spark Fiend", 51, Rarity.RARE, mage.cards.s.SparkFiend.class)); + cards.add(new SetCardInfo("Spatula of the Ages", 81, Rarity.UNCOMMON, mage.cards.s.SpatulaOfTheAges.class)); cards.add(new SetCardInfo("Strategy, Schmategy", 52, Rarity.RARE, mage.cards.s.StrategySchmategy.class)); cards.add(new SetCardInfo("Swamp", 86, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false))); + cards.add(new SetCardInfo("Temp of the Damned", 38, Rarity.COMMON, mage.cards.t.TempOfTheDamned.class)); cards.add(new SetCardInfo("The Cheese Stands Alone", 2, Rarity.RARE, mage.cards.t.TheCheeseStandsAlone.class)); cards.add(new SetCardInfo("Timmy, Power Gamer", 68, Rarity.RARE, mage.cards.t.TimmyPowerGamer.class)); cards.add(new SetCardInfo("Urza's Science Fair Project", 83, Rarity.UNCOMMON, mage.cards.u.UrzasScienceFairProject.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index fef2c75e13..468874b9d5 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -93,6 +93,7 @@ public enum SubType { CHIMERA("Chimera", SubTypeSet.CreatureType), CHISS("Chiss", SubTypeSet.CreatureType, true), CITIZEN("Citizen", SubTypeSet.CreatureType), + CLAMFOLK("Clamfolk", SubTypeSet.CreatureType, true), // Unglued CLERIC("Cleric", SubTypeSet.CreatureType), COCKATRICE("Cockatrice", SubTypeSet.CreatureType), CONSTRUCT("Construct", SubTypeSet.CreatureType), diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 2ded9a796b..2d4eea8e4b 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -45,6 +45,7 @@ public enum CounterType { FEATHER("feather"), FILIBUSTER("filibuster"), FLOOD("flood"), + FUNK("funk"), FURY("fury"), FUNGUS("fungus"), FUSE("fuse"), diff --git a/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java b/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java new file mode 100644 index 0000000000..ff10951d3a --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java @@ -0,0 +1,22 @@ + +package mage.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; + +/** + * + * @author L_J + */ +public class RabidSheepToken extends Token { + + public RabidSheepToken() { + super("Rabid Sheep", "2/2 green Sheep creature token named Rabid Sheep"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.SHEEP); + color.setGreen(true); + power = new MageInt(2); + toughness = new MageInt(2); + } +} From 50dacf3533be7e4d9218dfd29dc35e3f5b968c33 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 28 Aug 2018 23:21:48 +0000 Subject: [PATCH 02/17] Fixed token import for Flock of Rabid Sheep --- Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java b/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java index dca7f6524a..79ac3e5e97 100644 --- a/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java +++ b/Mage.Sets/src/mage/cards/f/FlockOfRabidSheep.java @@ -10,7 +10,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.game.Game; -import mage.game.permanent.token.SoldierToken; +import mage.game.permanent.token.RabidSheepToken; import mage.players.Player; /** From 96d14c59ec5c564f63e70b0fe944c2916ab6ad87 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 28 Aug 2018 23:24:36 +0000 Subject: [PATCH 03/17] Implemented Free-For-All --- Mage.Sets/src/mage/cards/f/FreeForAll.java | 144 +++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FreeForAll.java diff --git a/Mage.Sets/src/mage/cards/f/FreeForAll.java b/Mage.Sets/src/mage/cards/f/FreeForAll.java new file mode 100644 index 0000000000..631cc6bcd9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FreeForAll.java @@ -0,0 +1,144 @@ + +package mage.cards.f; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class FreeForAll extends CardImpl { + + public FreeForAll(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}"); + + // When Free-for-All enters the battlefield, exile all creatures face down. + this.addAbility(new EntersBattlefieldTriggeredAbility(new FreeForAllExileAllEffect())); + + // At the beginning of each player's upkeep, that player chooses a card exiled with Free-for-All at random and puts it onto the battlefield. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new FreeForAllReturnFromExileEffect(), TargetController.ANY, false, true)); + + // When Free-for-All leaves the battlefield, put all cards exiled with it into their owners' graveyards. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new FreeForAllLeavesBattlefieldEffect(), false)); + } + + public FreeForAll(final FreeForAll card) { + super(card); + } + + @Override + public FreeForAll copy() { + return new FreeForAll(this); + } +} + +class FreeForAllExileAllEffect extends OneShotEffect { + + public FreeForAllExileAllEffect() { + super(Outcome.Exile); + staticText = "exile all creatures face down"; + } + + public FreeForAllExileAllEffect(final FreeForAllExileAllEffect effect) { + super(effect); + } + + @Override + public FreeForAllExileAllEffect copy() { + return new FreeForAllExileAllEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List permanents = game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game); + for (Permanent permanent : permanents) { + Card card = game.getCard(permanent.getId()); + permanent.moveToExile(source.getSourceId(), "Free-for-All", source.getSourceId(), game); + if (card != null) { + card.setFaceDown(true, game); + } + } + return true; + } +} + +class FreeForAllReturnFromExileEffect extends OneShotEffect { + + public FreeForAllReturnFromExileEffect() { + super(Outcome.PutCardInPlay); + staticText = "that player chooses a card exiled with Free-for-All at random and puts it onto the battlefield"; + } + + public FreeForAllReturnFromExileEffect(final FreeForAllReturnFromExileEffect effect) { + super(effect); + } + + @Override + public FreeForAllReturnFromExileEffect copy() { + return new FreeForAllReturnFromExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + ExileZone exZone = game.getExile().getExileZone(source.getSourceId()); + if (exZone != null) { + Cards exiledCards = new CardsImpl(exZone.getCards(game)); + return player.moveCards(exiledCards.getRandom(game), Zone.BATTLEFIELD, source, game); + } + return true; + } + return false; + } +} + +class FreeForAllLeavesBattlefieldEffect extends OneShotEffect { + + public FreeForAllLeavesBattlefieldEffect() { + super(Outcome.Detriment); + this.staticText = "put all cards exiled with it into their owners' graveyards"; + } + + public FreeForAllLeavesBattlefieldEffect(final FreeForAllLeavesBattlefieldEffect effect) { + super(effect); + } + + @Override + public FreeForAllLeavesBattlefieldEffect copy() { + return new FreeForAllLeavesBattlefieldEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ExileZone exZone = game.getExile().getExileZone(source.getSourceId()); + if (exZone != null) { + return controller.moveCards(exZone.getCards(game), Zone.GRAVEYARD, source, game, false, false, true, null); + } + return true; + } + return false; + } +} From bce19d31af9bf0b3b74a61322f9e498c34f92aa1 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 28 Aug 2018 23:35:53 +0000 Subject: [PATCH 04/17] Rabid Sheep token fix --- .../mage/game/permanent/token/RabidSheepToken.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java b/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java index ff10951d3a..e3912f9f2b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RabidSheepToken.java @@ -9,7 +9,7 @@ import mage.MageInt; * * @author L_J */ -public class RabidSheepToken extends Token { +public final class RabidSheepToken extends TokenImpl { public RabidSheepToken() { super("Rabid Sheep", "2/2 green Sheep creature token named Rabid Sheep"); @@ -19,4 +19,12 @@ public class RabidSheepToken extends Token { power = new MageInt(2); toughness = new MageInt(2); } + + public RabidSheepToken(final RabidSheepToken token) { + super(token); + } + + public RabidSheepToken copy() { + return new RabidSheepToken(this); + } } From ff29761cbb9b06726a115f570420720f6813934c Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 30 Sep 2018 12:19:54 +0200 Subject: [PATCH 05/17] Implemented Unhinged cards --- Mage.Sets/src/mage/cards/a/AchHansRun.java | 107 ++++++++++ Mage.Sets/src/mage/cards/b/BINGO.java | 186 ++++++++++++++++ .../src/mage/cards/b/BlastFromThePast.java | 57 +++++ Mage.Sets/src/mage/cards/b/Bloodletter.java | 110 ++++++++++ Mage.Sets/src/mage/cards/b/BoosterTutor.java | 106 ++++++++++ Mage.Sets/src/mage/cards/d/DoubleHeader.java | 94 +++++++++ .../mage/cards/f/FirstComeFirstServed.java | 74 +++++++ .../src/mage/cards/f/FormOfTheSquirrel.java | 122 +++++++++++ .../src/mage/cards/g/GoblinSecretAgent.java | 83 ++++++++ Mage.Sets/src/mage/cards/m/ManaScrew.java | 96 +++++++++ Mage.Sets/src/mage/cards/m/Mise.java | 75 +++++++ .../src/mage/cards/m/MonkeyMonkeyMonkey.java | 150 +++++++++++++ .../src/mage/cards/n/NowIKnowMyABCs.java | 69 ++++++ Mage.Sets/src/mage/cards/r/RareBGone.java | 119 +++++++++++ Mage.Sets/src/mage/cards/s/SixyBeast.java | 95 +++++++++ Mage.Sets/src/mage/cards/s/SymbolStatus.java | 65 ++++++ .../src/mage/cards/t/TheFallenApart.java | 186 ++++++++++++++++ Mage.Sets/src/mage/cards/t/Togglodyte.java | 199 ++++++++++++++++++ Mage.Sets/src/mage/cards/u/UktabiKong.java | 62 ++++++ Mage.Sets/src/mage/cards/u/UrzasHotTub.java | 130 ++++++++++++ .../mage/cards/w/WhenFluffyBunniesAttack.java | 101 +++++++++ Mage.Sets/src/mage/cards/w/Wordmail.java | 90 ++++++++ .../src/mage/cards/w/WorldBottlingKit.java | 94 +++++++++ Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java | 82 ++++++++ Mage.Sets/src/mage/sets/Unhinged.java | 24 +++ .../src/main/java/mage/constants/SubType.java | 1 + .../main/java/mage/counters/CounterType.java | 1 + .../permanent/token/ExpansionSymbolToken.java | 29 +++ .../permanent/token/UktabiKongApeToken.java | 30 +++ 29 files changed, 2637 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AchHansRun.java create mode 100644 Mage.Sets/src/mage/cards/b/BINGO.java create mode 100644 Mage.Sets/src/mage/cards/b/BlastFromThePast.java create mode 100644 Mage.Sets/src/mage/cards/b/Bloodletter.java create mode 100644 Mage.Sets/src/mage/cards/b/BoosterTutor.java create mode 100644 Mage.Sets/src/mage/cards/d/DoubleHeader.java create mode 100644 Mage.Sets/src/mage/cards/f/FirstComeFirstServed.java create mode 100644 Mage.Sets/src/mage/cards/f/FormOfTheSquirrel.java create mode 100644 Mage.Sets/src/mage/cards/g/GoblinSecretAgent.java create mode 100644 Mage.Sets/src/mage/cards/m/ManaScrew.java create mode 100644 Mage.Sets/src/mage/cards/m/Mise.java create mode 100644 Mage.Sets/src/mage/cards/m/MonkeyMonkeyMonkey.java create mode 100644 Mage.Sets/src/mage/cards/n/NowIKnowMyABCs.java create mode 100644 Mage.Sets/src/mage/cards/r/RareBGone.java create mode 100644 Mage.Sets/src/mage/cards/s/SixyBeast.java create mode 100644 Mage.Sets/src/mage/cards/s/SymbolStatus.java create mode 100644 Mage.Sets/src/mage/cards/t/TheFallenApart.java create mode 100644 Mage.Sets/src/mage/cards/t/Togglodyte.java create mode 100644 Mage.Sets/src/mage/cards/u/UktabiKong.java create mode 100644 Mage.Sets/src/mage/cards/u/UrzasHotTub.java create mode 100644 Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java create mode 100644 Mage.Sets/src/mage/cards/w/Wordmail.java create mode 100644 Mage.Sets/src/mage/cards/w/WorldBottlingKit.java create mode 100644 Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/ExpansionSymbolToken.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/UktabiKongApeToken.java diff --git a/Mage.Sets/src/mage/cards/a/AchHansRun.java b/Mage.Sets/src/mage/cards/a/AchHansRun.java new file mode 100644 index 0000000000..14a0b6d200 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AchHansRun.java @@ -0,0 +1,107 @@ + +package mage.cards.a; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.repository.CardRepository; +import mage.choices.ChoiceImpl; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public final class AchHansRun extends CardImpl { + + public AchHansRun(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}{G}{G}"); + + // At the beginning of your upkeep, you may say "Ach! Hans, run! It’s the …" and the name of a creature card. If you do, search your library for a card with that name, put it onto the battlefield, then shuffle your library. That creature gains haste. Exile it at the beginning of the next end step. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AchHansRunEffect(), TargetController.YOU, true)); + } + + public AchHansRun(final AchHansRun card) { + super(card); + } + + @Override + public AchHansRun copy() { + return new AchHansRun(this); + } +} + +class AchHansRunEffect extends OneShotEffect { + + public AchHansRunEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "you may say \"Ach! Hans, run! It’s the …\" and the name of a creature card. If you do, search your library for a card with that name, put it onto the battlefield, then shuffle your library. That creature gains haste. Exile it at the beginning of the next end step"; + } + + public AchHansRunEffect(final AchHansRunEffect effect) { + super(effect); + } + + @Override + public AchHansRunEffect copy() { + return new AchHansRunEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ChoiceImpl cardChoice = new ChoiceImpl(true); + cardChoice.setChoices(CardRepository.instance.getCreatureNames()); + cardChoice.setMessage("Choose a creature card name"); + if (controller.choose(Outcome.Detriment, cardChoice, game)) { + String cardName = cardChoice.getChoice(); + if (!game.isSimulation()) { + game.informPlayers(controller.getLogName() + ": \"Ach! Hans, run! It's the " + cardName + "!\""); + } + FilterCard nameFilter = new FilterCard(); + nameFilter.add(new NamePredicate(cardName)); + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, nameFilter); + if (controller.searchLibrary(target, game)) { + Card card = controller.getLibrary().remove(target.getFirstTarget(), game); + if (card != null) { + if (card != null && controller.moveCards(card, Zone.BATTLEFIELD, source, game)) { + Permanent creature = game.getPermanent(card.getId()); + if (creature != null) { + // gains haste + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + // Exile at begin of next end step + ExileTargetEffect exileEffect = new ExileTargetEffect(null, null, Zone.BATTLEFIELD); + exileEffect.setTargetPointer(new FixedTarget(creature, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + game.addDelayedTriggeredAbility(delayedAbility, source); + } + } + } + controller.shuffleLibrary(source, game); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BINGO.java b/Mage.Sets/src/mage/cards/b/BINGO.java new file mode 100644 index 0000000000..185acbd19d --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BINGO.java @@ -0,0 +1,186 @@ + +package mage.cards.b; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.util.CardUtil; + +/** + * + * @author L_J + */ +public final class BINGO extends CardImpl { + + public BINGO(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + this.subtype.add(SubType.HOUND); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever a player casts a spell, put a chip counter on its converted mana cost. + this.addAbility(new SpellCastAllTriggeredAbility(new BingoEffect(), new FilterSpell("a spell"), false, SetTargetPointer.SPELL)); + + // B-I-N-G-O gets +9/+9 for each set of three numbers in a row with chip counters on them. + BingoCount count = new BingoCount(); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); + } + + public BINGO(final BINGO card) { + super(card); + } + + @Override + public BINGO copy() { + return new BINGO(this); + } +} + +class BingoEffect extends OneShotEffect { + + public BingoEffect() { + super(Outcome.Neutral); + staticText = "put a chip counter on its converted mana cost"; + } + + public BingoEffect(final BingoEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(this.getTargetPointer().getFirst(game, source)); + if (spell != null) { + if (spell.getConvertedManaCost() > 9) { + return true; + } + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + Map chipCounters = new HashMap<>(); // Map + if (game.getState().getValue(mageObject.getId() + "_chip") != null) { + chipCounters.putAll((Map) game.getState().getValue(mageObject.getId() + "_chip")); + } + chipCounters.putIfAbsent(spell.getConvertedManaCost(), 0); + chipCounters.put(spell.getConvertedManaCost(), chipCounters.get(spell.getConvertedManaCost()) + 1); + game.getState().setValue(mageObject.getId() + "_chip", chipCounters); + if (mageObject instanceof Permanent) { + StringBuilder sb = new StringBuilder(); + int i = 0; + for (Map.Entry entry : chipCounters.entrySet()) { + i++; + sb.append(entry.getKey()); + if (i < chipCounters.size()) { + sb.append(", "); + } + } + ((Permanent) mageObject).addInfo("chip counters", CardUtil.addToolTipMarkTags("Chip counters at: " + sb), game); + new AddCountersSourceEffect(CounterType.CHIP.createInstance()).apply(game, source); + } + return true; + } + } + return false; + } + + @Override + public BingoEffect copy() { + return new BingoEffect(this); + } +} + +class BingoCount implements DynamicValue { + + public BingoCount() { + } + + public BingoCount(final BingoCount countersCount) { + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + MageObject mageObject = game.getObject(sourceAbility.getSourceId()); + if (mageObject instanceof Permanent) { + Permanent permanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId()); + if (permanent != null && game.getState().getValue(mageObject.getId() + "_chip") != null) { + int rows = 0; + Set nums = ((Map) game.getState().getValue(mageObject.getId() + "_chip")).keySet(); + // if (nums.size() <= permanent.getCounters(game).getCount(CounterType.CHIP)) { + + // 1 4 7 + // 8 5 3 + // 2 0 6 + + if (nums.contains(1) && nums.contains(4) && nums.contains(7)) { + rows++; + } + if (nums.contains(1) && nums.contains(8) && nums.contains(2)) { + rows++; + } + if (nums.contains(1) && nums.contains(5) && nums.contains(6)) { + rows++; + } + if (nums.contains(8) && nums.contains(5) && nums.contains(3)) { + rows++; + } + if (nums.contains(4) && nums.contains(5) && nums.contains(0)) { + rows++; + } + if (nums.contains(2) && nums.contains(0) && nums.contains(6)) { + rows++; + } + if (nums.contains(7) && nums.contains(3) && nums.contains(6)) { + rows++; + } + if (nums.contains(2) && nums.contains(5) && nums.contains(7)) { + rows++; + } + return rows * 9; + // } + } + } + return 0; + } + + @Override + public BingoCount copy() { + return new BingoCount(this); + } + + @Override + public String toString() { + return "9"; + } + + @Override + public String getMessage() { + return "set of three numbers in a row with chip counters on them"; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BlastFromThePast.java b/Mage.Sets/src/mage/cards/b/BlastFromThePast.java new file mode 100644 index 0000000000..72af5d013e --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BlastFromThePast.java @@ -0,0 +1,57 @@ + +package mage.cards.b; + +import java.util.UUID; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.abilities.keyword.CyclingAbility; +import mage.abilities.keyword.FlashbackAbility; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.MadnessAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TimingRule; +import mage.game.permanent.token.GoblinToken; +import mage.target.common.TargetAnyTarget; + +/** + * + * @author L_J + */ +public final class BlastFromThePast extends CardImpl { + + public BlastFromThePast (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + + // Madness {R} + this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{R}"))); + // Cycling {1}{R} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{R}"))); + // Kicker {2}{R} + this.addAbility(new KickerAbility("{2}{R}")); + // Flashback {3}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.INSTANT)); + // Buyback {4}{R} + this.addAbility(new BuybackAbility("{4}{R}")); + + // Blast from the Past deals 2 damage to any target. If this spell was kicked, create a 1/1 red Goblin creature token. + this.getSpellAbility().addEffect(new DamageTargetEffect(2)); + this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateTokenEffect(new GoblinToken()), KickedCondition.instance)); + } + + public BlastFromThePast (final BlastFromThePast card) { + super(card); + } + + @Override + public BlastFromThePast copy() { + return new BlastFromThePast(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/b/Bloodletter.java b/Mage.Sets/src/mage/cards/b/Bloodletter.java new file mode 100644 index 0000000000..779050d889 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Bloodletter.java @@ -0,0 +1,110 @@ + +package mage.cards.b; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.StateTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterNonlandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public final class Bloodletter extends CardImpl { + + public Bloodletter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{B}"); + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When the names of three or more nonland permanents begin with the same letter, sacrifice Bloodletter. If you do, it deals 2 damage to each creature and each player. + this.addAbility(new BloodletterStateTriggeredAbility()); + } + + public Bloodletter(final Bloodletter card) { + super(card); + } + + @Override + public Bloodletter copy() { + return new Bloodletter(this); + } +} + +class BloodletterStateTriggeredAbility extends StateTriggeredAbility { + + public BloodletterStateTriggeredAbility() { + super(Zone.BATTLEFIELD, new BloodletterEffect()); + } + + public BloodletterStateTriggeredAbility(final BloodletterStateTriggeredAbility ability) { + super(ability); + } + + @Override + public BloodletterStateTriggeredAbility copy() { + return new BloodletterStateTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Map initialCount = new HashMap<>(); + for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterNonlandPermanent(), getControllerId(), getSourceId(), game)) { + Character initial = permanent.getName().charAt(0); + initialCount.putIfAbsent(initial, 0); + initialCount.put(initial, initialCount.get(initial) + 1); + } + for (Map.Entry entry : initialCount.entrySet()) { + if (entry.getValue() >= 3) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "When the names of three or more nonland permanents begin with the same letter, " + super.getRule(); + } +} + +class BloodletterEffect extends OneShotEffect { + + public BloodletterEffect() { + super(Outcome.Sacrifice); + staticText = "sacrifice {this}. If you do, it deals 2 damage to each creature and each player"; + } + + public BloodletterEffect(final BloodletterEffect effect) { + super(effect); + } + + @Override + public BloodletterEffect copy() { + return new BloodletterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && permanent.sacrifice(source.getSourceId(), game)) { + return new DamageEverythingEffect(2).apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BoosterTutor.java b/Mage.Sets/src/mage/cards/b/BoosterTutor.java new file mode 100644 index 0000000000..78d2d21b08 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BoosterTutor.java @@ -0,0 +1,106 @@ + +package mage.cards.b; + +import java.util.HashSet; +import java.util.Set; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ChooseExpansionSetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.cards.ExpansionSet; +import mage.cards.Sets; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author spjspj & L_J + */ +public final class BoosterTutor extends CardImpl { + + public BoosterTutor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); + + // Open a sealed Magic booster pack, reveal the cards, and put one of those cards into your hand. + this.getSpellAbility().addEffect(new BoosterTutorEffect()); + } + + public BoosterTutor(final BoosterTutor card) { + super(card); + } + + @Override + public BoosterTutor copy() { + return new BoosterTutor(this); + } +} + +class BoosterTutorEffect extends OneShotEffect { + + public BoosterTutorEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Open a sealed Magic booster pack, reveal the cards, and put one of those cards into your hand"; + } + + public BoosterTutorEffect(final BoosterTutorEffect effect) { + super(effect); + } + + @Override + public BoosterTutorEffect copy() { + return new BoosterTutorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + ChooseExpansionSetEffect effect = new ChooseExpansionSetEffect(Outcome.UnboostCreature); + effect.apply(game, source); + Player controller = game.getPlayer(source.getControllerId()); + + String setChosen = null; + if (effect.getValue("setchosen") != null) { + setChosen = (String) effect.getValue("setchosen"); + } else if (game.getState().getValue(this.getId() + "_set") != null) { + setChosen = (String) game.getState().getValue(this.getId() + "_set"); + } + + if (setChosen != null && controller != null) { + //ExpansionInfo set = ExpansionRepository.instance.getSetByName(setChosen); + ExpansionSet expansionSet = Sets.findSet(setChosen); + if (expansionSet != null) { + List boosterPack = expansionSet.create15CardBooster(); + if (boosterPack != null) { + StringBuilder message = new StringBuilder(controller.getLogName()).append(" opened: "); + for (Card card : boosterPack) { + message.append(card.getName()).append(" "); + } + game.informPlayers(message.toString()); + + TargetCard targetCard = new TargetCard(Zone.ALL, new FilterCard()); + Set cardsToLoad = new HashSet(boosterPack); + game.loadCards(cardsToLoad, controller.getId()); + CardsImpl cards = new CardsImpl(); + cards.addAll(boosterPack); + if (controller.choose(Outcome.Benefit, cards, targetCard, game)) { + Card card = game.getCard(targetCard.getFirstTarget()); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + } + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DoubleHeader.java b/Mage.Sets/src/mage/cards/d/DoubleHeader.java new file mode 100644 index 0000000000..917cf7fced --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DoubleHeader.java @@ -0,0 +1,94 @@ + +package mage.cards.d; + +import java.util.UUID; +import java.util.regex.Pattern; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SpellAbilityType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.TargetPermanent; + +/** + * + * @author L_J + */ +public final class DoubleHeader extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("permanent with a two-word name"); + + static { + filter.add(new DoubleHeaderPredicate()); + } + + public DoubleHeader(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); + this.subtype.add(SubType.JELLYFISH); + + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Double Header enters the battlefield, you may return target permanent with a two-word name to its owner’s hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public DoubleHeader(final DoubleHeader card) { + super(card); + } + + @Override + public DoubleHeader copy() { + return new DoubleHeader(this); + } +} + +class DoubleHeaderPredicate implements Predicate { + + public DoubleHeaderPredicate() { + } + + @Override + public boolean apply(MageObject input, Game game) { + String name = input.getName(); + if (input instanceof SplitCard) { + return hasTwoWords(((SplitCard)input).getLeftHalfCard().getName()) || hasTwoWords(((SplitCard)input).getRightHalfCard().getName()); + } else if (input instanceof Spell && ((Spell) input).getSpellAbility().getSpellAbilityType() == SpellAbilityType.SPLIT_FUSED){ + SplitCard card = (SplitCard) ((Spell)input).getCard(); + return hasTwoWords(card.getLeftHalfCard().getName()) || hasTwoWords(card.getRightHalfCard().getName()); + } else { + if (name.contains(" // ")) { + String leftName = name.substring(0, name.indexOf(" // ")); + String rightName = name.substring(name.indexOf(" // ") + 4, name.length()); + return hasTwoWords(leftName) || hasTwoWords(rightName); + } else { + return hasTwoWords(name); + } + } + } + + private boolean hasTwoWords(String str) { + return Pattern.compile("\\s+").split(str).length == 2; + } + + @Override + public String toString() { + return ""; + } +} diff --git a/Mage.Sets/src/mage/cards/f/FirstComeFirstServed.java b/Mage.Sets/src/mage/cards/f/FirstComeFirstServed.java new file mode 100644 index 0000000000..3f3fa1c97c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FirstComeFirstServed.java @@ -0,0 +1,74 @@ + +package mage.cards.f; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterAttackingOrBlockingCreature; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.PermanentCard; + +/** + * + * @author L_J + */ +public final class FirstComeFirstServed extends CardImpl { + + private static final FilterAttackingOrBlockingCreature filter = new FilterAttackingOrBlockingCreature("Each attacking or blocking creature with the lowest collector number among attacking or blocking creatures"); + + static { + filter.add(new FirstComeFirstServedPredicate()); + } + + public FirstComeFirstServed(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); + + // Each attacking or blocking creature with the lowest collector number among attacking or blocking creatures has first strike. + GainAbilityAllEffect gainEffect = new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, false); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, gainEffect)); + } + + public FirstComeFirstServed(final FirstComeFirstServed card) { + super(card); + } + + @Override + public FirstComeFirstServed copy() { + return new FirstComeFirstServed(this); + } +} + +class FirstComeFirstServedPredicate implements Predicate { + + @Override + public boolean apply(Permanent input, Game game) { + if (input instanceof PermanentCard) { + int lowestNumber = Integer.MAX_VALUE; + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterAttackingOrBlockingCreature(), game)) { + int number = parseCardNumber(permanent); + if (lowestNumber > number) { + lowestNumber = number; + } + } + return parseCardNumber(input) == lowestNumber; + } + return false; + } + + public int parseCardNumber(Permanent input) { + String str = input.getCardNumber(); + Matcher matcher = Pattern.compile("\\d+").matcher(str); + matcher.find(); + return Integer.valueOf(matcher.group()); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FormOfTheSquirrel.java b/Mage.Sets/src/mage/cards/f/FormOfTheSquirrel.java new file mode 100644 index 0000000000..f41bb741d9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FormOfTheSquirrel.java @@ -0,0 +1,122 @@ + +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.LoseGameTargetPlayerEffect; +import mage.abilities.effects.common.combat.CantAttackYouAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.token.SquirrelToken; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public final class FormOfTheSquirrel extends CardImpl { + + public FormOfTheSquirrel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); + + // As Form of the Squirrel enters the battlefield, create a 1/1 green Squirrel creature token. You lose the game when that creature leaves the battlefield. + this.addAbility(new AsEntersBattlefieldAbility(new FormOfTheSquirrelCreateTokenEffect())); + + // Creatures can't attack you. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield))); + + // You have shroud. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance()))); + + // You can't cast spells. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FormOfTheSquirrelCantCastEffect())); + } + + public FormOfTheSquirrel(final FormOfTheSquirrel card) { + super(card); + } + + @Override + public FormOfTheSquirrel copy() { + return new FormOfTheSquirrel(this); + } +} + +class FormOfTheSquirrelCreateTokenEffect extends OneShotEffect { + + public FormOfTheSquirrelCreateTokenEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "create a 1/1 green Squirrel creature token. You lose the game when that creature leaves the battlefield"; + } + + public FormOfTheSquirrelCreateTokenEffect(final FormOfTheSquirrelCreateTokenEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player sourceController = game.getPlayer(source.getControllerId()); + if (sourceController != null) { + CreateTokenEffect effect = new CreateTokenEffect(new SquirrelToken()); + effect.apply(game, source); + game.getState().setValue(source.getSourceId() + "_token", effect.getLastAddedTokenIds()); + for (UUID addedTokenId : effect.getLastAddedTokenIds()) { + Effect loseGameEffect = new LoseGameTargetPlayerEffect(); + loseGameEffect.setTargetPointer(new FixedTarget(sourceController.getId(), game)); + LeavesBattlefieldTriggeredAbility triggerAbility = new LeavesBattlefieldTriggeredAbility(loseGameEffect, false); + ContinuousEffect continuousEffect = new GainAbilityTargetEffect(triggerAbility, Duration.WhileOnBattlefield); + continuousEffect.setTargetPointer(new FixedTarget(addedTokenId, game)); + game.addEffect(continuousEffect, source); + } + return true; + } + return false; + } + + @Override + public FormOfTheSquirrelCreateTokenEffect copy() { + return new FormOfTheSquirrelCreateTokenEffect(this); + } +} + +class FormOfTheSquirrelCantCastEffect extends ContinuousRuleModifyingEffectImpl { + + public FormOfTheSquirrelCantCastEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "You can't cast spells"; + } + + public FormOfTheSquirrelCantCastEffect(final FormOfTheSquirrelCantCastEffect effect) { + super(effect); + } + + @Override + public FormOfTheSquirrelCantCastEffect copy() { + return new FormOfTheSquirrelCantCastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return event.getType() == GameEvent.EventType.CAST_SPELL && event.getPlayerId().equals(source.getControllerId()); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoblinSecretAgent.java b/Mage.Sets/src/mage/cards/g/GoblinSecretAgent.java new file mode 100644 index 0000000000..3599c2e2c7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinSecretAgent.java @@ -0,0 +1,83 @@ + +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.players.Player; +/** + * + * @author L_J + */ +public final class GoblinSecretAgent extends CardImpl { + + public GoblinSecretAgent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // At the beginning of your upkeep, reveal a card from your hand at random. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GoblinSecretAgentEffect(), TargetController.YOU, false)); + } + + public GoblinSecretAgent(final GoblinSecretAgent card) { + super(card); + } + + @Override + public GoblinSecretAgent copy() { + return new GoblinSecretAgent(this); + } +} + +class GoblinSecretAgentEffect extends OneShotEffect { + + public GoblinSecretAgentEffect() { + super(Outcome.Detriment); + this.staticText = "reveal a card from your hand at random"; + } + + public GoblinSecretAgentEffect(final GoblinSecretAgentEffect effect) { + super(effect); + } + + @Override + public GoblinSecretAgentEffect copy() { + return new GoblinSecretAgentEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller != null && sourceObject != null) { + if (!controller.getHand().isEmpty()) { + CardsImpl randomCard = new CardsImpl(); + Card card = controller.getHand().getRandom(game); + randomCard.add(card); + controller.revealCards(sourceObject.getIdName(), randomCard, game); + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/m/ManaScrew.java b/Mage.Sets/src/mage/cards/m/ManaScrew.java new file mode 100644 index 0000000000..f2228b428b --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/ManaScrew.java @@ -0,0 +1,96 @@ + +package mage.cards.m; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.mana.BasicManaEffect; +import mage.abilities.mana.ActivatedManaAbilityImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class ManaScrew extends CardImpl { + + public ManaScrew(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + // {1}: Flip a coin. If you win the flip, add {C}{C}. Activate this ability only any time you could cast an instant. + this.addAbility(new ManaScrewAbility()); + } + + public ManaScrew(final ManaScrew card) { + super(card); + } + + @Override + public ManaScrew copy() { + return new ManaScrew(this); + } +} + +class ManaScrewAbility extends ActivatedManaAbilityImpl { + + public ManaScrewAbility() { + super(Zone.BATTLEFIELD, new ManaScrewEffect(), new GenericManaCost(1)); + this.netMana.add(new Mana(0, 0, 0, 0, 0, 2, 0, 0)); + } + + public ManaScrewAbility(final ManaScrewAbility ability) { + super(ability); + } + + @Override + public ActivationStatus canActivate(UUID playerId, Game game) { + Player player = game.getPlayer(playerId); + if (player != null && !player.isInPayManaMode()) { + return super.canActivate(playerId, game); + } + return ActivationStatus.getFalse(); + } + + @Override + public ManaScrewAbility copy() { + return new ManaScrewAbility(this); + } + + @Override + public String getRule() { + return super.getRule() + " Activate this ability only any time you could cast an instant."; + } +} + +class ManaScrewEffect extends BasicManaEffect { + + public ManaScrewEffect() { + super(Mana.ColorlessMana(2)); + this.staticText = "Flip a coin. If you win the flip, add {C}{C}"; + } + + public ManaScrewEffect(final ManaScrewEffect effect) { + super(effect); + this.manaTemplate = effect.manaTemplate.copy(); + } + + @Override + public ManaScrewEffect copy() { + return new ManaScrewEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null && player.flipCoin(game)) { + player.getManaPool().addMana(getMana(game, source), game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/m/Mise.java b/Mage.Sets/src/mage/cards/m/Mise.java new file mode 100644 index 0000000000..23cdc07e72 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/Mise.java @@ -0,0 +1,75 @@ + +package mage.cards.m; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class Mise extends CardImpl { + + public Mise(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); + + // Choose a nonland card name, then reveal the top card of your library. If that card has the chosen name, you draw three cards. + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME)); + this.getSpellAbility().addEffect(new MiseEffect()); + } + + public Mise(final Mise card) { + super(card); + } + + @Override + public Mise copy() { + return new Mise(this); + } +} + +class MiseEffect extends OneShotEffect { + + public MiseEffect() { + super(Outcome.Detriment); + staticText = "then reveal the top card of your library. If that card has the chosen name, you draw three cards"; + } + + public MiseEffect(final MiseEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Object object = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); + if (player != null && object instanceof String) { + Card card = player.getLibrary().getFromTop(game); + String namedCard = (String) object; + CardsImpl cards = new CardsImpl(card); + if (card != null) { + player.revealCards("Mise", cards, game, true); + if (card.getName().equals(namedCard)) { + player.drawCards(3, game); + } + } + return true; + } + return false; + } + + @Override + public MiseEffect copy() { + return new MiseEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MonkeyMonkeyMonkey.java b/Mage.Sets/src/mage/cards/m/MonkeyMonkeyMonkey.java new file mode 100644 index 0000000000..4d3f500902 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MonkeyMonkeyMonkey.java @@ -0,0 +1,150 @@ + +package mage.cards.m; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterNonlandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author L_J + */ +public final class MonkeyMonkeyMonkey extends CardImpl { + + public MonkeyMonkeyMonkey(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + this.subtype.add(SubType.MONKEY); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // As Monkey Monkey Monkey enters the battlefield, choose a letter. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseLetterEffect())); + + // Monkey Monkey Monkey gets +1/+1 for each nonland permanent whose name begins with the chosen letter. + MonkeyMonkeyMonkeyCount count = new MonkeyMonkeyMonkeyCount(); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield))); + + } + + public MonkeyMonkeyMonkey(final MonkeyMonkeyMonkey card) { + super(card); + } + + @Override + public MonkeyMonkeyMonkey copy() { + return new MonkeyMonkeyMonkey(this); + } +} + +class ChooseLetterEffect extends OneShotEffect { + + public ChooseLetterEffect() { + super(Outcome.Benefit); + staticText = "choose a letter"; + } + + public ChooseLetterEffect(final ChooseLetterEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject mageObject = game.getPermanentEntering(source.getSourceId()); + if (mageObject == null) { + mageObject = game.getObject(source.getSourceId()); + } + + ChoiceImpl choice = new ChoiceImpl(true); + choice.setMessage("Choose letter"); + Set choices = new HashSet<>(); + for (Character letter = 'A'; letter <= 'Z'; letter++) { + choices.add(letter.toString()); + } + choice.setChoices(choices); + + if (controller != null && mageObject != null && controller.choose(outcome, choice, game)) { + if (!game.isSimulation()) { + game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); + } + game.getState().setValue(mageObject.getId() + "_letter", choice.getChoice()); + if (mageObject instanceof Permanent) { + ((Permanent) mageObject).addInfo("chosen letter", CardUtil.addToolTipMarkTags("Chosen letter: " + choice.getChoice()), game); + } + return true; + } + return false; + } + + @Override + public ChooseLetterEffect copy() { + return new ChooseLetterEffect(this); + } +} + +class MonkeyMonkeyMonkeyCount implements DynamicValue { + + public MonkeyMonkeyMonkeyCount() { + } + + public MonkeyMonkeyMonkeyCount(final MonkeyMonkeyMonkeyCount countersCount) { + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + + + MageObject mageObject = game.getObject(sourceAbility.getSourceId()); + if (mageObject instanceof Permanent) { + Permanent permanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId()); + if (permanent != null && game.getState().getValue(mageObject.getId() + "_letter") != null) { + int letters = 0; + for (Permanent p : game.getBattlefield().getActivePermanents(new FilterNonlandPermanent(), sourceAbility.getControllerId(), sourceAbility.getSourceId(), game)) { + Character initial = Character.toUpperCase(p.getName().charAt(0)); + if (initial.toString().equals(game.getState().getValue(mageObject.getId() + "_letter"))) { + letters++; + } + } + return letters; + } + } + return 0; + } + + @Override + public MonkeyMonkeyMonkeyCount copy() { + return new MonkeyMonkeyMonkeyCount(this); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return "nonland permanent whose name begins with the chosen letter"; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NowIKnowMyABCs.java b/Mage.Sets/src/mage/cards/n/NowIKnowMyABCs.java new file mode 100644 index 0000000000..ee3f6b47f5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NowIKnowMyABCs.java @@ -0,0 +1,69 @@ + +package mage.cards.n; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.WinGameSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public final class NowIKnowMyABCs extends CardImpl { + + public NowIKnowMyABCs(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); + + // At the beginning of your upkeep, if you control permanents with names that include all twenty-six letters of the English alphabet, you win the game. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false), + new NowIKnowMyABCsCondition(), + "At the beginning of your upkeep, if you control permanents with names that include all twenty-six letters of the English alphabet, you win the game.")); + } + + public NowIKnowMyABCs(final NowIKnowMyABCs card) { + super(card); + } + + @Override + public NowIKnowMyABCs copy() { + return new NowIKnowMyABCs(this); + } +} + +class NowIKnowMyABCsCondition implements Condition { + + public NowIKnowMyABCsCondition() { + } + + @Override + public boolean apply(Game game, Ability source) { + Set letters = new HashSet<>(); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) { + String permName = permanent.getName(); + for (int i = 0; i < permName.length(); i++) { + Character letter = permName.charAt(i); + if (Character.isLetter(letter)) { + letters.add(Character.toUpperCase(letter)); + } + } + } + return letters.size() >= 26; + } + + @Override + public String toString() { + return "if you control permanents with names that include all twenty-six letters of the English alphabet"; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RareBGone.java b/Mage.Sets/src/mage/cards/r/RareBGone.java new file mode 100644 index 0000000000..77d2521c8d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RareBGone.java @@ -0,0 +1,119 @@ + +package mage.cards.r; + +import java.util.*; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.Predicates; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class RareBGone extends CardImpl { + + public RareBGone(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{R}"); + + // Each player sacrifices all permanents that are rare or mythic rare, then each player reveals their hand and discards all cards that are rare or mythic rare. + this.getSpellAbility().addEffect(new RareBGoneEffect()); + + } + + public RareBGone(final RareBGone card) { + super(card); + } + + @Override + public RareBGone copy() { + return new RareBGone(this); + } +} + +class RareBGoneEffect extends OneShotEffect { + + private static final FilterPermanent filterPermanent = new FilterPermanent(); + private static final FilterCard filterCard = new FilterCard(); + + static { + filterPermanent.add(Predicates.or( + new RarityPredicate(Rarity.RARE), + new RarityPredicate(Rarity.MYTHIC) + )); + filterCard.add(Predicates.or( + new RarityPredicate(Rarity.RARE), + new RarityPredicate(Rarity.MYTHIC) + )); + } + + public RareBGoneEffect() { + super(Outcome.Benefit); + this.staticText = "Each player sacrifices all permanents that are rare or mythic rare, then each player reveals their hand and discards all cards that are rare or mythic rare"; + } + + public RareBGoneEffect(final RareBGoneEffect effect) { + super(effect); + } + + @Override + public RareBGoneEffect copy() { + return new RareBGoneEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filterPermanent, playerId, game)) { + permanent.sacrifice(source.getSourceId(), game); + } + Cards hand = player.getHand(); + player.revealCards("Rare-B-Gone", hand, game); + Set cards = hand.getCards(game); + for (Card card : cards) { + if (card != null && filterCard.match(card, game)) { + player.discard(card, source, game); + } + } + } + } + return true; + } + return false; + } +} + +class RarityPredicate implements Predicate { + + private final Rarity rarity; + + public RarityPredicate(Rarity rarity) { + this.rarity = rarity; + } + + @Override + public boolean apply(Card input, Game game) { + return input.getRarity().equals(rarity); + } + + @Override + public String toString() { + return "Rarity(" + rarity + ')'; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SixyBeast.java b/Mage.Sets/src/mage/cards/s/SixyBeast.java new file mode 100644 index 0000000000..662f032f63 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SixyBeast.java @@ -0,0 +1,95 @@ + +package mage.cards.s; + +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetOpponent; + +/** + * + * @author L_J + */ +public final class SixyBeast extends CardImpl { + + public SixyBeast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.BEAST); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // As Six-y Beast enters the battlefield, you secretly put six or fewer +1/+1 counters on it, then an opponent guesses the number of counters. If that player guesses right, sacrifice Six-y Beast after it enters the battlefield. + this.addAbility(new AsEntersBattlefieldAbility(new SixyBeastEffect())); + + } + + public SixyBeast(final SixyBeast card) { + super(card); + } + + @Override + public SixyBeast copy() { + return new SixyBeast(this); + } +} + +class SixyBeastEffect extends OneShotEffect { + + public SixyBeastEffect() { + super(Outcome.BoostCreature); + this.staticText = "you secretly put six or fewer +1/+1 counters on it, then an opponent guesses the number of counters. If that player guesses right, sacrifice {this} after it enters the battlefield"; + } + + public SixyBeastEffect(final SixyBeastEffect effect) { + super(effect); + } + + @Override + public SixyBeastEffect copy() { + return new SixyBeastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentEntering(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (permanent != null && controller != null) { + int counterAmount = controller.getAmount(0, 6, "Secretly put up to six counters on " + permanent.getName(), game); + permanent.addCounters(CounterType.P1P1.createInstance(counterAmount), source, game); + Player opponent = null; + Set opponents = game.getOpponents(source.getControllerId()); + if (!opponents.isEmpty()) { + if (opponents.size() > 1) { + Target targetOpponent = new TargetOpponent(true); + if (controller.chooseTarget(Outcome.Neutral, targetOpponent, source, game)) { + opponent = game.getPlayer(targetOpponent.getFirstTarget()); + } + } else { + opponent = game.getPlayer(opponents.iterator().next()); + } + } + if (opponent != null) { + int guessedAmount = opponent.getAmount(0, 6, "Guess the number of counters on " + permanent.getName(), game); + game.informPlayers(opponent.getLogName() + " guessed " + guessedAmount + " as the number of counters on " + permanent.getLogName()); + if (counterAmount == guessedAmount) { + permanent.sacrifice(source.getSourceId(), game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SymbolStatus.java b/Mage.Sets/src/mage/cards/s/SymbolStatus.java new file mode 100644 index 0000000000..ea40bec2e4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SymbolStatus.java @@ -0,0 +1,65 @@ + +package mage.cards.s; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ExpansionSymbolToken; + +/** + * + * @author L_J + */ +public class SymbolStatus extends CardImpl { + + public SymbolStatus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + + // Create a 1/1 colorless Expansion-Symbol creature token for each different expansion symbol among permanents you control. + this.getSpellAbility().addEffect(new SymbolStatusEffect()); + } + + public SymbolStatus(final SymbolStatus card) { + super(card); + } + + @Override + public SymbolStatus copy() { + return new SymbolStatus(this); + } +} + +class SymbolStatusEffect extends OneShotEffect { + + public SymbolStatusEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Create a 1/1 colorless Expansion-Symbol creature token for each different expansion symbol among permanents you control"; + } + + public SymbolStatusEffect(final SymbolStatusEffect effect) { + super(effect); + } + + @Override + public SymbolStatusEffect copy() { + return new SymbolStatusEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Set symbols = new HashSet<>(); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) { + symbols.add(permanent.getExpansionSetCode()); + } + return new CreateTokenEffect(new ExpansionSymbolToken(), symbols.size()).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TheFallenApart.java b/Mage.Sets/src/mage/cards/t/TheFallenApart.java new file mode 100644 index 0000000000..66f887455a --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheFallenApart.java @@ -0,0 +1,186 @@ + +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author L_J + */ +public final class TheFallenApart extends CardImpl { + + public TheFallenApart(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.subtype.add(SubType.ZOMBIE); + + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // The Fallen Apart enters the battlefield with two arms and two legs. + this.addAbility(new EntersBattlefieldAbility(new TheFallenApartEntersEffect())); + + // Whenever damage is dealt to The Fallen Apart, remove an arm or a leg from it. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new TheFallenApartToggleEffect(), false)); + + // The Fallen Apart can’t attack if it has no legs and can’t block if it has no arms. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TheFallenApartRestrictionEffect())); + } + + public TheFallenApart(final TheFallenApart card) { + super(card); + } + + @Override + public TheFallenApart copy() { + return new TheFallenApart(this); + } +} + +class TheFallenApartEntersEffect extends OneShotEffect { + + public TheFallenApartEntersEffect() { + super(Outcome.Neutral); + staticText = "with two arms and two legs"; + } + + public TheFallenApartEntersEffect(final TheFallenApartEntersEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject mageObject = game.getPermanentEntering(source.getSourceId()); + if (mageObject == null) { + mageObject = game.getObject(source.getSourceId()); + } + if (mageObject != null) { + game.getState().setValue(mageObject.getId() + "_arms", 2); + game.getState().setValue(mageObject.getId() + "_legs", 2); + if (mageObject instanceof Permanent) { + ((Permanent) mageObject).addInfo("armslegs", CardUtil.addToolTipMarkTags("Arms: 2, Legs: 2"), game); + } + return true; + } + return false; + } + + @Override + public TheFallenApartEntersEffect copy() { + return new TheFallenApartEntersEffect(this); + } +} + +class TheFallenApartToggleEffect extends OneShotEffect { + + public TheFallenApartToggleEffect() { + super(Outcome.Neutral); + staticText = "remove an arm or a leg from it"; + } + + public TheFallenApartToggleEffect(final TheFallenApartToggleEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject mageObject = game.getObject(source.getSourceId()); + if (controller != null && mageObject != null) { + if (game.getState().getValue(mageObject.getId() + "_arms") == null + || game.getState().getValue(mageObject.getId() + "_legs") == null) { + return false; + } + int arms = (Integer) game.getState().getValue(mageObject.getId() + "_arms"); + int legs = (Integer) game.getState().getValue(mageObject.getId() + "_legs"); + if (arms > 0) { + if (legs > 0) { + if (controller.chooseUse(Outcome.Detriment, "Remove an arm or a leg:", + source.getSourceObject(game).getLogName(), "Arm", "Leg", source, game)) { + arms -= 1; + game.informPlayers(mageObject.getLogName() + " loses an arm"); + } else { + legs -= 1; + game.informPlayers(mageObject.getLogName() + " loses a leg"); + } + } else { + arms -= 1; + game.informPlayers(mageObject.getLogName() + " loses an arm"); + } + } else { + if (legs > 0) { + legs -= 1; + game.informPlayers(mageObject.getLogName() + " loses a leg"); + } + } + game.getState().setValue(mageObject.getId() + "_arms", arms); + game.getState().setValue(mageObject.getId() + "_legs", legs); + ((Permanent) mageObject).addInfo("armslegs", CardUtil.addToolTipMarkTags("Arms: " + arms + ", Legs: " + legs), game); + return true; + } + return false; + } + + @Override + public TheFallenApartToggleEffect copy() { + return new TheFallenApartToggleEffect(this); + } +} + +class TheFallenApartRestrictionEffect extends RestrictionEffect { + + public TheFallenApartRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "{this} can’t attack if it has no legs and can’t block if it has no arms"; + } + + public TheFallenApartRestrictionEffect(final TheFallenApartRestrictionEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + return (Integer) game.getState().getValue(mageObject.getId() + "_arms") > 0; + } + return false; + } + + @Override + public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + return (Integer) game.getState().getValue(mageObject.getId() + "_legs") > 0; + } + return false; + } + + @Override + public TheFallenApartRestrictionEffect copy() { + return new TheFallenApartRestrictionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/Togglodyte.java b/Mage.Sets/src/mage/cards/t/Togglodyte.java new file mode 100644 index 0000000000..ff3df93bd9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/Togglodyte.java @@ -0,0 +1,199 @@ + +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalReplacementEffect; +import mage.abilities.decorator.ConditionalRestrictionEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.util.CardUtil; + +/** + * + * @author L_J + */ +public final class Togglodyte extends CardImpl { + + public Togglodyte(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + this.subtype.add(SubType.GOLEM); + + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Togglodyte enters the battlefield turned on. + this.addAbility(new EntersBattlefieldAbility(new TogglodyteEntersEffect())); + + // Whenever a player casts a spell, toggle Togglodyte’s ON/OFF switch. + this.addAbility(new SpellCastAllTriggeredAbility(new TogglodyteToggleEffect(), false)); + + // As long as Togglodyte is turned off, it can’t attack or block, and prevent all damage it would deal. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalRestrictionEffect(new TogglodyteRestrictionEffect(), new TogglodyteCondition())); + ability.addEffect(new ConditionalReplacementEffect(new TogglodytePreventionEffect(), new TogglodyteCondition())); + this.addAbility(ability); + } + + public Togglodyte(final Togglodyte card) { + super(card); + } + + @Override + public Togglodyte copy() { + return new Togglodyte(this); + } +} + +class TogglodyteEntersEffect extends OneShotEffect { + + public TogglodyteEntersEffect() { + super(Outcome.Neutral); + staticText = "turned on"; + } + + public TogglodyteEntersEffect(final TogglodyteEntersEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject mageObject = game.getPermanentEntering(source.getSourceId()); + if (mageObject == null) { + mageObject = game.getObject(source.getSourceId()); + } + if (mageObject != null) { + boolean toggled = true; + game.getState().setValue(mageObject.getId() + "_toggle", toggled); + if (mageObject instanceof Permanent) { + ((Permanent) mageObject).addInfo("toggle", CardUtil.addToolTipMarkTags("Switch: " + (toggled ? "ON" : "OFF")), game); + } + return true; + } + return false; + } + + @Override + public TogglodyteEntersEffect copy() { + return new TogglodyteEntersEffect(this); + } +} + +class TogglodyteToggleEffect extends OneShotEffect { + + public TogglodyteToggleEffect() { + super(Outcome.Neutral); + staticText = "toggle {this}’s ON/OFF switch"; + } + + public TogglodyteToggleEffect(final TogglodyteToggleEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + if (game.getState().getValue(mageObject.getId() + "_toggle") == null) { + return false; + } + boolean toggled = (Boolean) game.getState().getValue(mageObject.getId() + "_toggle"); + game.getState().setValue(mageObject.getId() + "_toggle", !toggled); + ((Permanent) mageObject).addInfo("toggle", CardUtil.addToolTipMarkTags("Switch: " + (!toggled ? "ON" : "OFF")), game); + return true; + } + return false; + } + + @Override + public TogglodyteToggleEffect copy() { + return new TogglodyteToggleEffect(this); + } +} + +class TogglodyteRestrictionEffect extends RestrictionEffect { + + public TogglodyteRestrictionEffect() { + super(Duration.WhileOnBattlefield); + staticText = ""; + } + + public TogglodyteRestrictionEffect(final TogglodyteRestrictionEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()); + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public TogglodyteRestrictionEffect copy() { + return new TogglodyteRestrictionEffect(this); + } +} + +class TogglodytePreventionEffect extends PreventionEffectImpl { + + public TogglodytePreventionEffect() { + super(Duration.WhileOnBattlefield, Integer.MAX_VALUE, false); + staticText = "As long as {this} is turned off, it can’t attack or block, and prevent all damage it would deal"; + } + + public TogglodytePreventionEffect(final TogglodytePreventionEffect effect) { + super(effect); + } + + @Override + public TogglodytePreventionEffect copy() { + return new TogglodytePreventionEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + if (event.getSourceId().equals(source.getSourceId())) { + return true; + } + } + return false; + } +} + +class TogglodyteCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null && game.getState().getValue(mageObject.getId() + "_toggle") != null) { + return !((Boolean) game.getState().getValue(mageObject.getId() + "_toggle")); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/u/UktabiKong.java b/Mage.Sets/src/mage/cards/u/UktabiKong.java new file mode 100644 index 0000000000..d3e92b6b97 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UktabiKong.java @@ -0,0 +1,62 @@ + +package mage.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.permanent.token.UktabiKongApeToken; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LoneFox + */ +public final class UktabiKong extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Apes you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate(SubType.APE)); + } + + public UktabiKong(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}{G}"); + this.subtype.add(SubType.APE); + this.power = new MageInt(8); + this.toughness = new MageInt(8); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Uktabi Kong enters the battlefield, destroy all artifacts. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(new FilterArtifactPermanent("artifacts")), false)); + + // Tap two untapped Apes you control: Create a 1/1 green Ape creature token. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new UktabiKongApeToken()), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, true)))); + } + + public UktabiKong(final UktabiKong card) { + super(card); + } + + @Override + public UktabiKong copy() { + return new UktabiKong(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UrzasHotTub.java b/Mage.Sets/src/mage/cards/u/UrzasHotTub.java new file mode 100644 index 0000000000..6a816e8d97 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UrzasHotTub.java @@ -0,0 +1,130 @@ + +package mage.cards.u; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SpellAbilityType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author L_J + */ +public class UrzasHotTub extends CardImpl { + + public UrzasHotTub(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {2}, Discard a card: Search your library for a card that shares a complete word in its name with the discarded card, reveal it, put it into your hand, then shuffle your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UrzasHotTubEffect(), new ManaCostsImpl("{2}")); + ability.addCost(new DiscardTargetCost(new TargetCardInHand())); + this.addAbility(ability); + } + + public UrzasHotTub(final UrzasHotTub card) { + super(card); + } + + @Override + public UrzasHotTub copy() { + return new UrzasHotTub(this); + } +} + +class UrzasHotTubEffect extends OneShotEffect { + + public UrzasHotTubEffect() { + super(Outcome.ReturnToHand); + this.staticText = "Search your library for a card that shares a complete word in its name with the discarded card, reveal it, put it into your hand, then shuffle your library"; + } + + public UrzasHotTubEffect(final UrzasHotTubEffect effect) { + super(effect); + } + + @Override + public UrzasHotTubEffect copy() { + return new UrzasHotTubEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Cost cost : source.getCosts()) { + if (cost instanceof DiscardTargetCost) { + DiscardTargetCost discardCost = (DiscardTargetCost) cost; + Card discardedCard = discardCost.getCards().get(0); + if (discardedCard != null) { + FilterCard filter = new FilterCard(); + filter.add(new UrzasHotTubPredicate(discardedCard.getName())); + return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true).apply(game, source); + } + } + } + return false; + } +} + +class UrzasHotTubPredicate implements Predicate { + + private final String referenceName; + + public UrzasHotTubPredicate(String referenceName) { + this.referenceName = referenceName; + } + + @Override + public boolean apply(MageObject input, Game game) { + String name = input.getName(); + if (input instanceof SplitCard) { + return sharesWordWithName(((SplitCard)input).getLeftHalfCard().getName()) || sharesWordWithName(((SplitCard)input).getRightHalfCard().getName()); + } else if (input instanceof Spell && ((Spell) input).getSpellAbility().getSpellAbilityType() == SpellAbilityType.SPLIT_FUSED){ + SplitCard card = (SplitCard) ((Spell)input).getCard(); + return sharesWordWithName(card.getLeftHalfCard().getName()) || sharesWordWithName(card.getRightHalfCard().getName()); + } else { + if (name.contains(" // ")) { + String leftName = name.substring(0, name.indexOf(" // ")); + String rightName = name.substring(name.indexOf(" // ") + 4, name.length()); + return sharesWordWithName(leftName) || sharesWordWithName(rightName); + } else { + return sharesWordWithName(name); + } + } + } + + private boolean sharesWordWithName(String str) { + if (referenceName == null || referenceName == "") { + return false; + } + String[] arr = referenceName.split("\\s+"); + for (int i = 0; i < arr.length; i++) { + if (str.contains(arr[i].replaceAll(",", ""))) { + return true; + } + } + return false; + } + + @Override + public String toString() { + return ""; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java b/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java new file mode 100644 index 0000000000..a2db93e53c --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java @@ -0,0 +1,101 @@ + +package mage.cards.w; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public final class WhenFluffyBunniesAttack extends CardImpl { + + public WhenFluffyBunniesAttack (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}"); + + // Target creature gets -X/-X until end of turn, where X is the number of times the letter of your choice appears in that creature’s name. + this.getSpellAbility().addEffect(new WhenFluffyBunniesAttackEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public WhenFluffyBunniesAttack (final WhenFluffyBunniesAttack card) { + super(card); + } + + @Override + public WhenFluffyBunniesAttack copy() { + return new WhenFluffyBunniesAttack(this); + } + +} + +class WhenFluffyBunniesAttackEffect extends OneShotEffect { + + public WhenFluffyBunniesAttackEffect() { + super(Outcome.Detriment); + staticText = "Target creature gets -X/-X until end of turn, where X is the number of times the letter of your choice appears in that creature’s name"; + } + + public WhenFluffyBunniesAttackEffect(final WhenFluffyBunniesAttackEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getFirstTarget()); + + ChoiceImpl choice = new ChoiceImpl(true); + choice.setMessage("Choose letter"); + Set choices = new HashSet<>(); + for (Character letter = 'A'; letter <= 'Z'; letter++) { + choices.add(letter.toString()); + } + choice.setChoices(choices); + + if (controller != null && permanent != null && controller.choose(outcome, choice, game)) { + if (!game.isSimulation()) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); + } + } + + Character chosenLetter = choice.getChoice().charAt(0); + int unboostValue = 0; + String permName = permanent.getName(); + for (int i = 0; i < permName.length(); i++) { + Character letter = permName.charAt(i); + if (Character.isLetter(letter) && Character.toUpperCase(letter) == chosenLetter) { + unboostValue--; + } + } + BoostTargetEffect effect = new BoostTargetEffect(unboostValue, unboostValue, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(permanent.getId())); + game.addEffect(effect, source); + return true; + } + return false; + } + + @Override + public WhenFluffyBunniesAttackEffect copy() { + return new WhenFluffyBunniesAttackEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/Wordmail.java b/Mage.Sets/src/mage/cards/w/Wordmail.java new file mode 100644 index 0000000000..e6aa8654e1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/Wordmail.java @@ -0,0 +1,90 @@ + +package mage.cards.w; + +import java.util.UUID; +import java.util.regex.Pattern; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public final class Wordmail extends CardImpl { + + public Wordmail(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // Enchanted creature gets +1/+1 for each word in its name. + WordmailCount count = new WordmailCount(); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(count, count, Duration.WhileOnBattlefield))); + } + + public Wordmail(final Wordmail card) { + super(card); + } + + @Override + public Wordmail copy() { + return new Wordmail(this); + } +} + +class WordmailCount implements DynamicValue { + + public WordmailCount() { + } + + public WordmailCount(final WordmailCount dynamicValue) { + } + + @Override + public int calculate(Game game, Ability source, Effect effect) { + Permanent aura = game.getPermanent(source.getSourceId()); + if (aura != null) { + Permanent permanent = game.getPermanent(aura.getAttachedTo()); + if (permanent != null) { + return Pattern.compile("\\s+").split(permanent.getName()).length; + } + } + return 0; + } + + @Override + public WordmailCount copy() { + return new WordmailCount(this); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return "word in its name"; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java b/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java new file mode 100644 index 0000000000..60d683a620 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java @@ -0,0 +1,94 @@ + +package mage.cards.w; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ChooseExpansionSetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class WorldBottlingKit extends CardImpl { + + public WorldBottlingKit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); + + // {5}, Sacrifice World-Bottling Kit: Choose a Magic set. Exile all permanents with that set’s expansion symbol except for basic lands. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WorldBottlingKitEffect(), new ManaCostsImpl("{5}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public WorldBottlingKit(final WorldBottlingKit card) { + super(card); + } + + @Override + public WorldBottlingKit copy() { + return new WorldBottlingKit(this); + } +} + +class WorldBottlingKitEffect extends OneShotEffect { + + public WorldBottlingKitEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Choose a Magic set. Exile all permanents with that set’s expansion symbol except for basic lands"; + } + + public WorldBottlingKitEffect(final WorldBottlingKitEffect effect) { + super(effect); + } + + @Override + public WorldBottlingKitEffect copy() { + return new WorldBottlingKitEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ChooseExpansionSetEffect effect = new ChooseExpansionSetEffect(Outcome.Exile); + effect.apply(game, source); + String setChosen = null; + if (effect.getValue("setchosen") != null) { + setChosen = (String) effect.getValue("setchosen"); + } else if (game.getState().getValue(this.getId() + "_set") != null) { + setChosen = (String) game.getState().getValue(this.getId() + "_set"); + } + if (setChosen != null) { + game.informPlayers(controller.getLogName() + " has chosen set " + setChosen); + FilterPermanent filter = new FilterPermanent(); + filter.add(Predicates.not(Predicates.and(new CardTypePredicate(CardType.LAND), new SupertypePredicate(SuperType.BASIC)))); + List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); + for (Permanent permanent : permanents) { + if (permanent.getExpansionSetCode().equals(setChosen)) { + controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java b/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java new file mode 100644 index 0000000000..62b9a3cd67 --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java @@ -0,0 +1,82 @@ + +package mage.cards.z; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author L_J + */ +public final class ZzzyxassAbyss extends CardImpl { + + public ZzzyxassAbyss(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}{B}"); + + // At the beginning of your upkeep, destroy all nonland permanents with the first name alphabetically among nonland permanents. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ZzzyxassAbyssEffect(), TargetController.YOU, false)); + } + + public ZzzyxassAbyss(final ZzzyxassAbyss card) { + super(card); + } + + @Override + public ZzzyxassAbyss copy() { + return new ZzzyxassAbyss(this); + } + +} + +class ZzzyxassAbyssEffect extends OneShotEffect { + + public ZzzyxassAbyssEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "destroy all nonland permanents with the first name alphabetically among nonland permanents"; + } + + public ZzzyxassAbyssEffect(final ZzzyxassAbyssEffect effect) { + super(effect); + } + + @Override + public ZzzyxassAbyssEffect copy() { + return new ZzzyxassAbyssEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + List permanentNames = new ArrayList<>(); + FilterPermanent filter = new FilterNonlandPermanent(); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), game)) { + permanentNames.add(permanent.getName()); + } + if (permanentNames.isEmpty()) { + return true; + } + Collections.sort(permanentNames); + filter.add(new NamePredicate(permanentNames.get(0))); + return new DestroyAllEffect(filter).apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/Unhinged.java b/Mage.Sets/src/mage/sets/Unhinged.java index a209835217..9a927bad34 100644 --- a/Mage.Sets/src/mage/sets/Unhinged.java +++ b/Mage.Sets/src/mage/sets/Unhinged.java @@ -21,12 +21,36 @@ public final class Unhinged extends ExpansionSet { private Unhinged() { super("Unhinged", "UNH", ExpansionSet.buildDate(2004, 11, 20), SetType.JOKESET); + cards.add(new SetCardInfo("\"Ach! Hans, Run!\"", 116, Rarity.RARE, mage.cards.a.AchHansRun.class)); + cards.add(new SetCardInfo("B-I-N-G-O", 92, Rarity.RARE, mage.cards.b.BINGO.class)); + cards.add(new SetCardInfo("Blast from the Past", 72, Rarity.RARE, mage.cards.b.BlastFromThePast.class)); + cards.add(new SetCardInfo("Bloodletter", 50, Rarity.COMMON, mage.cards.b.Bloodletter.class)); + cards.add(new SetCardInfo("Booster Tutor", 51, Rarity.UNCOMMON, mage.cards.b.BoosterTutor.class)); + cards.add(new SetCardInfo("Double Header", 31, Rarity.COMMON, mage.cards.d.DoubleHeader.class)); + cards.add(new SetCardInfo("First Come, First Served", 12, Rarity.UNCOMMON, mage.cards.f.FirstComeFirstServed.class)); cards.add(new SetCardInfo("Forest", 140, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false))); + cards.add(new SetCardInfo("Form of the Squirrel", 96, Rarity.RARE, mage.cards.f.FormOfTheSquirrel.class)); + cards.add(new SetCardInfo("Goblin Secret Agent", 79, Rarity.COMMON, mage.cards.g.GoblinSecretAgent.class)); cards.add(new SetCardInfo("Island", 137, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false))); cards.add(new SetCardInfo("Johnny, Combo Player", 35, Rarity.RARE, mage.cards.j.JohnnyComboPlayer.class)); + cards.add(new SetCardInfo("Mana Screw", 123, Rarity.UNCOMMON, mage.cards.m.ManaScrew.class)); + cards.add(new SetCardInfo("Mise", 38, Rarity.UNCOMMON, mage.cards.m.Mise.class)); + cards.add(new SetCardInfo("Monkey Monkey Monkey", 104, Rarity.COMMON, mage.cards.m.MonkeyMonkeyMonkey.class)); cards.add(new SetCardInfo("Mountain", 139, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false))); cards.add(new SetCardInfo("Mox Lotus", 124, Rarity.RARE, mage.cards.m.MoxLotus.class)); + cards.add(new SetCardInfo("Now I Know My ABC's", 41, Rarity.RARE, mage.cards.n.NowIKnowMyABCs.class)); cards.add(new SetCardInfo("Plains", 136, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false))); + cards.add(new SetCardInfo("Rare-B-Gone", 119, Rarity.RARE, mage.cards.r.RareBGone.class)); + cards.add(new SetCardInfo("Six-y Beast", 89, Rarity.UNCOMMON, mage.cards.s.SixyBeast.class)); cards.add(new SetCardInfo("Swamp", 138, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false))); + cards.add(new SetCardInfo("Symbol Status", 114, Rarity.UNCOMMON, mage.cards.s.SymbolStatus.class)); + cards.add(new SetCardInfo("The Fallen Apart", 55, Rarity.COMMON, mage.cards.t.TheFallenApart.class)); + cards.add(new SetCardInfo("Togglodyte", 129, Rarity.UNCOMMON, mage.cards.t.Togglodyte.class)); + cards.add(new SetCardInfo("Uktabi Kong", 115, Rarity.RARE, mage.cards.u.UktabiKong.class)); + cards.add(new SetCardInfo("Urza's Hot Tub", 131, Rarity.UNCOMMON, mage.cards.u.UrzasHotTub.class)); + cards.add(new SetCardInfo("When Fluffy Bunnies Attack", 67, Rarity.COMMON, mage.cards.w.WhenFluffyBunniesAttack.class)); + cards.add(new SetCardInfo("Wordmail", 22, Rarity.COMMON, mage.cards.w.Wordmail.class)); + cards.add(new SetCardInfo("World-Bottling Kit", 133, Rarity.RARE, mage.cards.w.WorldBottlingKit.class)); + cards.add(new SetCardInfo("Zzzyxas's Abyss", 70, Rarity.RARE, mage.cards.z.ZzzyxassAbyss.class)); } } diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index fef2c75e13..837da1b83c 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -131,6 +131,7 @@ public enum SubType { ELK("Elk", SubTypeSet.CreatureType), EYE("Eye", SubTypeSet.CreatureType), EWOK("Ewok", SubTypeSet.CreatureType, true), // Star Wars + EXPANSION_SYMBOL("Expansion-Symbol", SubTypeSet.CreatureType, true), // Unhinged // F FAERIE("Faerie", SubTypeSet.CreatureType), FERRET("Ferret", SubTypeSet.CreatureType), diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 865cab23a5..98b2389ee1 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -19,6 +19,7 @@ public enum CounterType { CAGE("cage"), CARRION("carrion"), CHARGE("charge"), + CHIP("chip"), CORPSE("corpse"), CREDIT("credit"), CRYSTAL("crystal"), diff --git a/Mage/src/main/java/mage/game/permanent/token/ExpansionSymbolToken.java b/Mage/src/main/java/mage/game/permanent/token/ExpansionSymbolToken.java new file mode 100644 index 0000000000..1f608901ce --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/ExpansionSymbolToken.java @@ -0,0 +1,29 @@ + +package mage.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; + +/** + * + * @author L_J + */ +public final class ExpansionSymbolToken extends TokenImpl { + + public ExpansionSymbolToken() { + super("Expansion-Symbol", "1/1 colorless Expansion-Symbol creature token"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.EXPANSION_SYMBOL); + power = new MageInt(1); + toughness = new MageInt(1); + } + + public ExpansionSymbolToken(final ExpansionSymbolToken token) { + super(token); + } + + public ExpansionSymbolToken copy() { + return new ExpansionSymbolToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/UktabiKongApeToken.java b/Mage/src/main/java/mage/game/permanent/token/UktabiKongApeToken.java new file mode 100644 index 0000000000..8fb6538aaf --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/UktabiKongApeToken.java @@ -0,0 +1,30 @@ + +package mage.game.permanent.token; + +import mage.constants.CardType; +import mage.constants.SubType; +import mage.MageInt; + +/** + * + * @author L_J + */ +public final class UktabiKongApeToken extends TokenImpl { + + public UktabiKongApeToken() { + super("Ape", "1/1 green Ape creature token"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.APE); + color.setGreen(true); + power = new MageInt(1); + toughness = new MageInt(1); + } + + public UktabiKongApeToken(final UktabiKongApeToken token) { + super(token); + } + + public UktabiKongApeToken copy() { + return new UktabiKongApeToken(this); + } +} From 9b46406c86f9eff2f91a925ded5ef01d24b14a02 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 30 Sep 2018 12:23:18 +0200 Subject: [PATCH 06/17] * Burning Cinder Fury of Crimson Chaos Fire - Fixed opponent slection. --- .../BurningCinderFuryOfCrimsonChaosFire.java | 61 +++++++++++-------- .../main/java/mage/target/TargetPlayer.java | 8 +-- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java b/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java index 39ef0c303f..1585222ed7 100644 --- a/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java +++ b/Mage.Sets/src/mage/cards/b/BurningCinderFuryOfCrimsonChaosFire.java @@ -1,7 +1,8 @@ - package mage.cards.b; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.UUID; import mage.abilities.Ability; @@ -16,12 +17,15 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; +import mage.filter.FilterPlayer; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.other.PlayerIdPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetOpponent; +import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; import mage.watchers.Watcher; @@ -38,7 +42,7 @@ public final class BurningCinderFuryOfCrimsonChaosFire extends CardImpl { this.addAbility(new BurningCinderFuryOfCrimsonChaosFireAbility()); // At the beginning of each player’s end step, if that player didn’t tap any nonland permanents that turn, Burning Cinder Fury of Crimson Chaos Fire deals 3 damage to that player. - this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3).setText("{this} deals 3 damage to that player"), + this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3).setText("{this} deals 3 damage to that player"), TargetController.ANY, new BurningCinderFuryOfCrimsonChaosFireCondition(), false), new BurningCinderFuryOfCrimsonChaosFireWatcher()); } @@ -72,8 +76,8 @@ class BurningCinderFuryOfCrimsonChaosFireAbility extends TriggeredAbilityImpl { Permanent permanent = game.getPermanent(event.getTargetId()); if (permanent != null) { BurningCinderFuryOfCrimsonChaosFireEffect effect = (BurningCinderFuryOfCrimsonChaosFireEffect) this.getEffects().get(0); - effect.setTargetPointer(new FixedTarget(permanent.getId())); - effect.setFirstController(permanent.getControllerId()); // it's necessary to remember the original controller, as the controller might change by the time the trigger resolves + effect.setTargetPointer(new FixedTarget(permanent, game)); + effect.setFirstControllerId(permanent.getControllerId()); // it's necessary to remember the original controller, as the controller might change by the time the trigger resolves return true; } return false; @@ -92,7 +96,7 @@ class BurningCinderFuryOfCrimsonChaosFireAbility extends TriggeredAbilityImpl { class BurningCinderFuryOfCrimsonChaosFireEffect extends OneShotEffect { - private UUID firstController = null; + private UUID firstControllerId = null; public BurningCinderFuryOfCrimsonChaosFireEffect() { super(Outcome.Detriment); @@ -101,37 +105,42 @@ class BurningCinderFuryOfCrimsonChaosFireEffect extends OneShotEffect { public BurningCinderFuryOfCrimsonChaosFireEffect(final BurningCinderFuryOfCrimsonChaosFireEffect effect) { super(effect); - this.firstController = effect.firstController; + this.firstControllerId = effect.firstControllerId; } @Override public BurningCinderFuryOfCrimsonChaosFireEffect copy() { return new BurningCinderFuryOfCrimsonChaosFireEffect(this); } - - public void setFirstController(UUID newId) { - this.firstController = newId; + + public void setFirstControllerId(UUID newId) { + this.firstControllerId = newId; } @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(firstController); - if (player != null) { - Target target = new TargetOpponent(true); - if (target.canChoose(player.getId(), game)) { - while (!target.isChosen() && target.canChoose(player.getId(), game) && player.canRespond()) { - player.chooseTarget(outcome, target, source, game); - } + Player tappingPlayer = game.getPlayer(firstControllerId); + Permanent permanentToControl = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (tappingPlayer != null && permanentToControl != null) { + // Create opponent filter list manually because otherwise opponent check prevents controller of this to be valid + FilterPlayer filter = new FilterPlayer("opponent to control " + permanentToControl.getIdName()); + List opponentPredicates = new ArrayList<>(); + for (UUID opponentId : game.getOpponents(firstControllerId)) { + opponentPredicates.add(new PlayerIdPredicate(opponentId)); } - Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); - Player chosenOpponent = game.getPlayer(target.getFirstTarget()); - - if (permanent != null && chosenOpponent != null) { - game.informPlayers(player.getLogName() + " chose " + chosenOpponent.getLogName() + " to gain control of " + permanent.getLogName() + " at the beginning of the next end step"); - ContinuousEffect effect = new BurningCinderFuryOfCrimsonChaosFireCreatureGainControlEffect(Duration.Custom, chosenOpponent.getId()); - effect.setTargetPointer(new FixedTarget(permanent.getId())); - game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source); - return true; + filter.add(Predicates.or(opponentPredicates)); + Target target = new TargetPlayer(1, 1, true, filter); + target.setTargetController(firstControllerId); + target.setAbilityController(source.getControllerId()); + if (tappingPlayer.chooseTarget(outcome, target, source, game)) { + Player chosenOpponent = game.getPlayer(target.getFirstTarget()); + if (chosenOpponent != null) { + game.informPlayers(tappingPlayer.getLogName() + " chose " + chosenOpponent.getLogName() + " to gain control of " + permanentToControl.getLogName() + " at the beginning of the next end step"); + ContinuousEffect effect = new BurningCinderFuryOfCrimsonChaosFireCreatureGainControlEffect(Duration.Custom, chosenOpponent.getId()); + effect.setTargetPointer(new FixedTarget(permanentToControl.getId())); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source); + return true; + } } } return false; diff --git a/Mage/src/main/java/mage/target/TargetPlayer.java b/Mage/src/main/java/mage/target/TargetPlayer.java index 53a33ab2a9..7b2d0bdf77 100644 --- a/Mage/src/main/java/mage/target/TargetPlayer.java +++ b/Mage/src/main/java/mage/target/TargetPlayer.java @@ -1,16 +1,14 @@ - package mage.target; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.filter.FilterPlayer; import mage.game.Game; import mage.players.Player; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - /** * * @author BetaSteward_at_googlemail.com From b6bd8137f41b64e386130a54b7363619701485f1 Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 30 Sep 2018 10:35:51 +0000 Subject: [PATCH 07/17] Bloodletter fix --- Mage.Sets/src/mage/cards/b/Bloodletter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/b/Bloodletter.java b/Mage.Sets/src/mage/cards/b/Bloodletter.java index 779050d889..cbb888e5f1 100644 --- a/Mage.Sets/src/mage/cards/b/Bloodletter.java +++ b/Mage.Sets/src/mage/cards/b/Bloodletter.java @@ -27,7 +27,7 @@ import mage.game.permanent.Permanent; public final class Bloodletter extends CardImpl { public Bloodletter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{B}"); + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); From feaaf7bb8a4c718e843a931a449e65e0f8e85b42 Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 30 Sep 2018 10:36:14 +0000 Subject: [PATCH 08/17] Double Header fix --- Mage.Sets/src/mage/cards/d/DoubleHeader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DoubleHeader.java b/Mage.Sets/src/mage/cards/d/DoubleHeader.java index 917cf7fced..7a483fb282 100644 --- a/Mage.Sets/src/mage/cards/d/DoubleHeader.java +++ b/Mage.Sets/src/mage/cards/d/DoubleHeader.java @@ -34,8 +34,8 @@ public final class DoubleHeader extends CardImpl { } public DoubleHeader(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); - this.subtype.add(SubType.JELLYFISH); + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}"); + this.subtype.add(SubType.DRAKE); this.power = new MageInt(2); this.toughness = new MageInt(3); From 1973bbb825831999201ddfbbb055a952cdb226cd Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 30 Sep 2018 12:32:52 +0000 Subject: [PATCH 09/17] Removed duplicate Chicken Egg --- Mage.Sets/src/mage/sets/Unglued.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/Unglued.java b/Mage.Sets/src/mage/sets/Unglued.java index 690e1a2520..5616719f3d 100644 --- a/Mage.Sets/src/mage/sets/Unglued.java +++ b/Mage.Sets/src/mage/sets/Unglued.java @@ -23,7 +23,6 @@ public final class Unglued extends ExpansionSet { cards.add(new SetCardInfo("Burning Cinder Fury of Crimson Chaos Fire", 40, Rarity.RARE, mage.cards.b.BurningCinderFuryOfCrimsonChaosFire.class)); cards.add(new SetCardInfo("Checks and Balances", 16, Rarity.UNCOMMON, mage.cards.c.ChecksAndBalances.class)); - cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); cards.add(new SetCardInfo("Chicken a la King", 17, Rarity.RARE, mage.cards.c.ChickenALaKing.class)); cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); cards.add(new SetCardInfo("Clambassadors", 18, Rarity.COMMON, mage.cards.c.Clambassadors.class)); From b5df24fb3072e7035a3927b86c2aa97cefd7b0cb Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 16:37:39 +0400 Subject: [PATCH 10/17] UGL: fixed card number and name typo; --- Mage.Sets/src/mage/sets/Unglued.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/Unglued.java b/Mage.Sets/src/mage/sets/Unglued.java index 5616719f3d..4fec14be81 100644 --- a/Mage.Sets/src/mage/sets/Unglued.java +++ b/Mage.Sets/src/mage/sets/Unglued.java @@ -7,7 +7,6 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author lopho */ public final class Unglued extends ExpansionSet { @@ -25,8 +24,9 @@ public final class Unglued extends ExpansionSet { cards.add(new SetCardInfo("Checks and Balances", 16, Rarity.UNCOMMON, mage.cards.c.ChecksAndBalances.class)); cards.add(new SetCardInfo("Chicken a la King", 17, Rarity.RARE, mage.cards.c.ChickenALaKing.class)); cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); - cards.add(new SetCardInfo("Clambassadors", 18, Rarity.COMMON, mage.cards.c.Clambassadors.class)); + cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); cards.add(new SetCardInfo("Clam-I-Am", 19, Rarity.COMMON, mage.cards.c.ClamIAm.class)); + cards.add(new SetCardInfo("Clambassadors", 18, Rarity.COMMON, mage.cards.c.Clambassadors.class)); cards.add(new SetCardInfo("Denied!", 22, Rarity.COMMON, mage.cards.d.Denied.class)); cards.add(new SetCardInfo("Elvish Impersonators", 56, Rarity.COMMON, mage.cards.e.ElvishImpersonators.class)); cards.add(new SetCardInfo("Flock of Rabid Sheep", 57, Rarity.UNCOMMON, mage.cards.f.FlockOfRabidSheep.class)); @@ -47,7 +47,7 @@ public final class Unglued extends ExpansionSet { cards.add(new SetCardInfo("Krazy Kow", 48, Rarity.COMMON, mage.cards.k.KrazyKow.class)); cards.add(new SetCardInfo("Mine, Mine, Mine!", 65, Rarity.RARE, mage.cards.m.MineMineMine.class)); cards.add(new SetCardInfo("Mountain", 87, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false))); - cards.add(new SetCardInfo("Once More With Feeling", 11, Rarity.RARE, mage.cards.o.OnceMoreWithFeeling.class)); + cards.add(new SetCardInfo("Once More with Feeling", 11, Rarity.RARE, mage.cards.o.OnceMoreWithFeeling.class)); cards.add(new SetCardInfo("Paper Tiger", 78, Rarity.COMMON, mage.cards.p.PaperTiger.class)); cards.add(new SetCardInfo("Plains", 84, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false))); cards.add(new SetCardInfo("Poultrygeist", 37, Rarity.COMMON, mage.cards.p.Poultrygeist.class)); From 6ee1602bfcb2ff85f4fd05268cb4881d3811a719 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 16:43:55 +0400 Subject: [PATCH 11/17] Fixed merge --- Mage.Sets/src/mage/sets/Unglued.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/Unglued.java b/Mage.Sets/src/mage/sets/Unglued.java index 4fec14be81..b432e5833f 100644 --- a/Mage.Sets/src/mage/sets/Unglued.java +++ b/Mage.Sets/src/mage/sets/Unglued.java @@ -24,7 +24,6 @@ public final class Unglued extends ExpansionSet { cards.add(new SetCardInfo("Checks and Balances", 16, Rarity.UNCOMMON, mage.cards.c.ChecksAndBalances.class)); cards.add(new SetCardInfo("Chicken a la King", 17, Rarity.RARE, mage.cards.c.ChickenALaKing.class)); cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); - cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class)); cards.add(new SetCardInfo("Clam-I-Am", 19, Rarity.COMMON, mage.cards.c.ClamIAm.class)); cards.add(new SetCardInfo("Clambassadors", 18, Rarity.COMMON, mage.cards.c.Clambassadors.class)); cards.add(new SetCardInfo("Denied!", 22, Rarity.COMMON, mage.cards.d.Denied.class)); From c36a7560ff848d2dfcf9a181fe0ce520c460ba44 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 16:47:17 +0400 Subject: [PATCH 12/17] Refactor: fixed wrong set's class names (48 files) --- .../{Commander2013.java => Commander2013Edition.java} | 8 ++++---- .../{Commander2014.java => Commander2014Edition.java} | 8 ++++---- .../{Commander2015.java => Commander2015Edition.java} | 8 ++++---- .../{Commander2016.java => Commander2016Edition.java} | 8 ++++---- .../{Commander2017.java => Commander2017Edition.java} | 9 ++++----- .../{Commander2018.java => Commander2018Edition.java} | 9 ++++----- Mage.Sets/src/mage/sets/CommanderAnthology.java | 4 ++-- .../src/mage/sets/CommanderAnthologyVolumeII.java | 5 ++--- ...icolBolas.java => DuelDecksAjaniVsNicolBolas.java} | 8 ++++---- ...ic.java => DuelDecksAnthologyDivineVsDemonic.java} | 11 +++++------ ...ins.java => DuelDecksAnthologyElvesVsGoblins.java} | 8 ++++---- ...na.java => DuelDecksAnthologyGarrukVsLiliana.java} | 8 ++++---- ...ndra.java => DuelDecksAnthologyJaceVsChandra.java} | 10 +++++----- ...sedVsCursed.java => DuelDecksBlessedVsCursed.java} | 8 ++++---- ...neVsDemonic.java => DuelDecksDivineVsDemonic.java} | 11 +++++------ ...spethVsKiora.java => DuelDecksElspethVsKiora.java} | 10 +++++----- ...sTezzeret.java => DuelDecksElspethVsTezzeret.java} | 9 +++++---- ...vesVsGoblins.java => DuelDecksElvesVsGoblins.java} | 10 +++++----- ...sInventors.java => DuelDecksElvesVsInventors.java} | 10 +++++----- ...ukVsLiliana.java => DuelDecksGarrukVsLiliana.java} | 10 +++++----- ...VsMonsters.java => DuelDecksHeroesVsMonsters.java} | 10 +++++----- ...zetVsGolgari.java => DuelDecksIzzetVsGolgari.java} | 10 +++++----- ...JaceVsChandra.java => DuelDecksJaceVsChandra.java} | 10 +++++----- .../{JaceVsVraska.java => DuelDecksJaceVsVraska.java} | 10 +++++----- ...sVsDragons.java => DuelDecksKnightsVsDragons.java} | 10 +++++----- ...kVsGoblins.java => DuelDecksMerfolkVsGoblins.java} | 9 ++++----- .../{MindVsMight.java => DuelDecksMindVsMight.java} | 9 +++++---- ...sObNixilis.java => DuelDecksNissaVsObNixilis.java} | 9 ++++----- ...tion.java => DuelDecksPhyrexiaVsTheCoalition.java} | 10 +++++----- ...SorinVsTibalt.java => DuelDecksSorinVsTibalt.java} | 10 +++++----- ...eedVsCunning.java => DuelDecksSpeedVsCunning.java} | 10 +++++----- .../{VenserVsKoth.java => DuelDecksVenserVsKoth.java} | 10 +++++----- ...VsEldrazi.java => DuelDecksZendikarVsEldrazi.java} | 10 +++++----- .../sets/{FTVAngels.java => FromTheVaultAngels.java} | 10 +++++----- ...nnihilation.java => FromTheVaultAnnihilation.java} | 10 +++++----- .../{FTVDragons.java => FromTheVaultDragons.java} | 8 ++++---- .../sets/{FTVExiled.java => FromTheVaultExiled.java} | 10 +++++----- .../{FTVLegends.java => FromTheVaultLegends.java} | 10 +++++----- .../mage/sets/{FTVLore.java => FromTheVaultLore.java} | 10 +++++----- .../sets/{FTVRealms.java => FromTheVaultRealms.java} | 10 +++++----- .../sets/{FTVRelics.java => FromTheVaultRelics.java} | 10 +++++----- .../{FTVTransform.java => FromTheVaultTransform.java} | 10 +++++----- .../sets/{FTVTwenty.java => FromTheVaultTwenty.java} | 10 +++++----- ....java => GlobalSeriesJiangYangguAndMuYanling.java} | 10 +++++----- .../sets/{GrandPrix.java => GrandPrixPromos.java} | 9 ++++----- Mage.Sets/src/mage/sets/HasconPromo2017.java | 8 ++++---- ...Planechase2012.java => Planechase2012Edition.java} | 10 +++++----- ...ng.java => PremiumDeckSeriesFireAndLightning.java} | 10 +++++----- ...Graveborn.java => PremiumDeckSeriesGraveborn.java} | 10 +++++----- ...{PDSSlivers.java => PremiumDeckSeriesSlivers.java} | 10 +++++----- 50 files changed, 229 insertions(+), 235 deletions(-) rename Mage.Sets/src/mage/sets/{Commander2013.java => Commander2013Edition.java} (99%) rename Mage.Sets/src/mage/sets/{Commander2014.java => Commander2014Edition.java} (99%) rename Mage.Sets/src/mage/sets/{Commander2015.java => Commander2015Edition.java} (99%) rename Mage.Sets/src/mage/sets/{Commander2016.java => Commander2016Edition.java} (99%) rename Mage.Sets/src/mage/sets/{Commander2017.java => Commander2017Edition.java} (99%) rename Mage.Sets/src/mage/sets/{Commander2018.java => Commander2018Edition.java} (99%) rename Mage.Sets/src/mage/sets/{AjaniVsNicolBolas.java => DuelDecksAjaniVsNicolBolas.java} (97%) rename Mage.Sets/src/mage/sets/{AnthologyDivineVsDemonic.java => DuelDecksAnthologyDivineVsDemonic.java} (95%) rename Mage.Sets/src/mage/sets/{AnthologyElvesVsGoblins.java => DuelDecksAnthologyElvesVsGoblins.java} (96%) rename Mage.Sets/src/mage/sets/{AnthologyGarrukVsLiliana.java => DuelDecksAnthologyGarrukVsLiliana.java} (95%) rename Mage.Sets/src/mage/sets/{AnthologyJaceVsChandra.java => DuelDecksAnthologyJaceVsChandra.java} (95%) rename Mage.Sets/src/mage/sets/{BlessedVsCursed.java => DuelDecksBlessedVsCursed.java} (97%) rename Mage.Sets/src/mage/sets/{DivineVsDemonic.java => DuelDecksDivineVsDemonic.java} (96%) rename Mage.Sets/src/mage/sets/{ElspethVsKiora.java => DuelDecksElspethVsKiora.java} (96%) rename Mage.Sets/src/mage/sets/{ElspethVsTezzeret.java => DuelDecksElspethVsTezzeret.java} (97%) rename Mage.Sets/src/mage/sets/{ElvesVsGoblins.java => DuelDecksElvesVsGoblins.java} (96%) rename Mage.Sets/src/mage/sets/{ElvesVsInventors.java => DuelDecksElvesVsInventors.java} (97%) rename Mage.Sets/src/mage/sets/{GarrukVsLiliana.java => DuelDecksGarrukVsLiliana.java} (96%) rename Mage.Sets/src/mage/sets/{HeroesVsMonsters.java => DuelDecksHeroesVsMonsters.java} (97%) rename Mage.Sets/src/mage/sets/{IzzetVsGolgari.java => DuelDecksIzzetVsGolgari.java} (97%) rename Mage.Sets/src/mage/sets/{JaceVsChandra.java => DuelDecksJaceVsChandra.java} (96%) rename Mage.Sets/src/mage/sets/{JaceVsVraska.java => DuelDecksJaceVsVraska.java} (97%) rename Mage.Sets/src/mage/sets/{KnightsVsDragons.java => DuelDecksKnightsVsDragons.java} (97%) rename Mage.Sets/src/mage/sets/{MerfolkVsGoblins.java => DuelDecksMerfolkVsGoblins.java} (96%) rename Mage.Sets/src/mage/sets/{MindVsMight.java => DuelDecksMindVsMight.java} (96%) rename Mage.Sets/src/mage/sets/{NissaVsObNixilis.java => DuelDecksNissaVsObNixilis.java} (96%) rename Mage.Sets/src/mage/sets/{PhyrexiaVsTheCoalition.java => DuelDecksPhyrexiaVsTheCoalition.java} (96%) rename Mage.Sets/src/mage/sets/{SorinVsTibalt.java => DuelDecksSorinVsTibalt.java} (97%) rename Mage.Sets/src/mage/sets/{SpeedVsCunning.java => DuelDecksSpeedVsCunning.java} (97%) rename Mage.Sets/src/mage/sets/{VenserVsKoth.java => DuelDecksVenserVsKoth.java} (97%) rename Mage.Sets/src/mage/sets/{ZendikarVsEldrazi.java => DuelDecksZendikarVsEldrazi.java} (96%) rename Mage.Sets/src/mage/sets/{FTVAngels.java => FromTheVaultAngels.java} (89%) rename Mage.Sets/src/mage/sets/{FTVAnnihilation.java => FromTheVaultAnnihilation.java} (87%) rename Mage.Sets/src/mage/sets/{FTVDragons.java => FromTheVaultDragons.java} (89%) rename Mage.Sets/src/mage/sets/{FTVExiled.java => FromTheVaultExiled.java} (88%) rename Mage.Sets/src/mage/sets/{FTVLegends.java => FromTheVaultLegends.java} (89%) rename Mage.Sets/src/mage/sets/{FTVLore.java => FromTheVaultLore.java} (89%) rename Mage.Sets/src/mage/sets/{FTVRealms.java => FromTheVaultRealms.java} (89%) rename Mage.Sets/src/mage/sets/{FTVRelics.java => FromTheVaultRelics.java} (89%) rename Mage.Sets/src/mage/sets/{FTVTransform.java => FromTheVaultTransform.java} (94%) rename Mage.Sets/src/mage/sets/{FTVTwenty.java => FromTheVaultTwenty.java} (91%) rename Mage.Sets/src/mage/sets/{JiangYangguMuYanling.java => GlobalSeriesJiangYangguAndMuYanling.java} (93%) rename Mage.Sets/src/mage/sets/{GrandPrix.java => GrandPrixPromos.java} (92%) rename Mage.Sets/src/mage/sets/{Planechase2012.java => Planechase2012Edition.java} (98%) rename Mage.Sets/src/mage/sets/{PDSFireAndLightning.java => PremiumDeckSeriesFireAndLightning.java} (93%) rename Mage.Sets/src/mage/sets/{PDSGraveborn.java => PremiumDeckSeriesGraveborn.java} (92%) rename Mage.Sets/src/mage/sets/{PDSSlivers.java => PremiumDeckSeriesSlivers.java} (94%) diff --git a/Mage.Sets/src/mage/sets/Commander2013.java b/Mage.Sets/src/mage/sets/Commander2013Edition.java similarity index 99% rename from Mage.Sets/src/mage/sets/Commander2013.java rename to Mage.Sets/src/mage/sets/Commander2013Edition.java index 7c9484a17a..61f9d76730 100644 --- a/Mage.Sets/src/mage/sets/Commander2013.java +++ b/Mage.Sets/src/mage/sets/Commander2013Edition.java @@ -10,15 +10,15 @@ import mage.constants.SetType; * * @author LevelX2 */ -public final class Commander2013 extends ExpansionSet { +public final class Commander2013Edition extends ExpansionSet { - private static final Commander2013 instance = new Commander2013(); + private static final Commander2013Edition instance = new Commander2013Edition(); - public static Commander2013 getInstance() { + public static Commander2013Edition getInstance() { return instance; } - private Commander2013() { + private Commander2013Edition() { super("Commander 2013 Edition", "C13", ExpansionSet.buildDate(2013, 11, 01), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; cards.add(new SetCardInfo("Acidic Slime", 134, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class)); diff --git a/Mage.Sets/src/mage/sets/Commander2014.java b/Mage.Sets/src/mage/sets/Commander2014Edition.java similarity index 99% rename from Mage.Sets/src/mage/sets/Commander2014.java rename to Mage.Sets/src/mage/sets/Commander2014Edition.java index c46d84f5e4..e3422ee3ea 100644 --- a/Mage.Sets/src/mage/sets/Commander2014.java +++ b/Mage.Sets/src/mage/sets/Commander2014Edition.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author LevelX2 */ -public final class Commander2014 extends ExpansionSet { +public final class Commander2014Edition extends ExpansionSet { - private static final Commander2014 instance = new Commander2014(); + private static final Commander2014Edition instance = new Commander2014Edition(); - public static Commander2014 getInstance() { + public static Commander2014Edition getInstance() { return instance; } - private Commander2014() { + private Commander2014Edition() { super("Commander 2014 Edition", "C14", ExpansionSet.buildDate(2014, 11, 07), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; cards.add(new SetCardInfo("Abyssal Persecutor", 132, Rarity.MYTHIC, mage.cards.a.AbyssalPersecutor.class)); diff --git a/Mage.Sets/src/mage/sets/Commander2015.java b/Mage.Sets/src/mage/sets/Commander2015Edition.java similarity index 99% rename from Mage.Sets/src/mage/sets/Commander2015.java rename to Mage.Sets/src/mage/sets/Commander2015Edition.java index 419958c4c6..912003f5df 100644 --- a/Mage.Sets/src/mage/sets/Commander2015.java +++ b/Mage.Sets/src/mage/sets/Commander2015Edition.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author fireshoes */ -public final class Commander2015 extends ExpansionSet { +public final class Commander2015Edition extends ExpansionSet { - private static final Commander2015 instance = new Commander2015(); + private static final Commander2015Edition instance = new Commander2015Edition(); - public static Commander2015 getInstance() { + public static Commander2015Edition getInstance() { return instance; } - private Commander2015() { + private Commander2015Edition() { super("Commander 2015 Edition", "C15", ExpansionSet.buildDate(2015, 11, 13), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; cards.add(new SetCardInfo("Acidic Slime", 173, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class)); diff --git a/Mage.Sets/src/mage/sets/Commander2016.java b/Mage.Sets/src/mage/sets/Commander2016Edition.java similarity index 99% rename from Mage.Sets/src/mage/sets/Commander2016.java rename to Mage.Sets/src/mage/sets/Commander2016Edition.java index 33f69b2b7f..5ea0f33779 100644 --- a/Mage.Sets/src/mage/sets/Commander2016.java +++ b/Mage.Sets/src/mage/sets/Commander2016Edition.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author fireshoeS */ -public final class Commander2016 extends ExpansionSet { +public final class Commander2016Edition extends ExpansionSet { - private static final Commander2016 instance = new Commander2016(); + private static final Commander2016Edition instance = new Commander2016Edition(); - public static Commander2016 getInstance() { + public static Commander2016Edition getInstance() { return instance; } - private Commander2016() { + private Commander2016Edition() { super("Commander 2016 Edition", "C16", ExpansionSet.buildDate(2016, 11, 11), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; cards.add(new SetCardInfo("Abzan Charm", 177, Rarity.UNCOMMON, mage.cards.a.AbzanCharm.class)); diff --git a/Mage.Sets/src/mage/sets/Commander2017.java b/Mage.Sets/src/mage/sets/Commander2017Edition.java similarity index 99% rename from Mage.Sets/src/mage/sets/Commander2017.java rename to Mage.Sets/src/mage/sets/Commander2017Edition.java index c9ee763771..067b25ee9c 100644 --- a/Mage.Sets/src/mage/sets/Commander2017.java +++ b/Mage.Sets/src/mage/sets/Commander2017Edition.java @@ -5,18 +5,17 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class Commander2017 extends ExpansionSet { +public final class Commander2017Edition extends ExpansionSet { - private static final Commander2017 instance = new Commander2017(); + private static final Commander2017Edition instance = new Commander2017Edition(); - public static Commander2017 getInstance() { + public static Commander2017Edition getInstance() { return instance; } - private Commander2017() { + private Commander2017Edition() { super("Commander 2017 Edition", "C17", ExpansionSet.buildDate(2017, 8, 25), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; diff --git a/Mage.Sets/src/mage/sets/Commander2018.java b/Mage.Sets/src/mage/sets/Commander2018Edition.java similarity index 99% rename from Mage.Sets/src/mage/sets/Commander2018.java rename to Mage.Sets/src/mage/sets/Commander2018Edition.java index 1ba0c10bd1..ac3896c801 100644 --- a/Mage.Sets/src/mage/sets/Commander2018.java +++ b/Mage.Sets/src/mage/sets/Commander2018Edition.java @@ -5,18 +5,17 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author TheElk801 */ -public final class Commander2018 extends ExpansionSet { +public final class Commander2018Edition extends ExpansionSet { - private static final Commander2018 instance = new Commander2018(); + private static final Commander2018Edition instance = new Commander2018Edition(); - public static Commander2018 getInstance() { + public static Commander2018Edition getInstance() { return instance; } - private Commander2018() { + private Commander2018Edition() { super("Commander 2018 Edition", "C18", ExpansionSet.buildDate(2018, 8, 10), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; diff --git a/Mage.Sets/src/mage/sets/CommanderAnthology.java b/Mage.Sets/src/mage/sets/CommanderAnthology.java index 56158dae06..d76f9b2082 100644 --- a/Mage.Sets/src/mage/sets/CommanderAnthology.java +++ b/Mage.Sets/src/mage/sets/CommanderAnthology.java @@ -5,7 +5,6 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ public final class CommanderAnthology extends ExpansionSet { @@ -18,8 +17,9 @@ public final class CommanderAnthology extends ExpansionSet { private CommanderAnthology() { super("Commander Anthology", "CMA", ExpansionSet.buildDate(2017, 6, 9), SetType.SUPPLEMENTAL); - this.blockName = "Commander Anthology"; + this.blockName = "Command Zone"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Acidic Slime", 90, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class)); cards.add(new SetCardInfo("Aerie Mystics", 1, Rarity.UNCOMMON, mage.cards.a.AerieMystics.class)); cards.add(new SetCardInfo("Aethermage's Touch", 172, Rarity.RARE, mage.cards.a.AethermagesTouch.class)); diff --git a/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java b/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java index 4290da2a3d..748f04f533 100644 --- a/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java +++ b/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java @@ -5,7 +5,6 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author rystan */ public class CommanderAnthologyVolumeII extends ExpansionSet { @@ -17,8 +16,8 @@ public class CommanderAnthologyVolumeII extends ExpansionSet { } private CommanderAnthologyVolumeII() { - super("Commander Anthology 2018", "CM2", ExpansionSet.buildDate(2018, 6, 8), SetType.SUPPLEMENTAL); - this.blockName = "Commander Anthology 2018"; + super("Commander Anthology Volume II", "CM2", ExpansionSet.buildDate(2018, 6, 8), SetType.SUPPLEMENTAL); + this.blockName = "Command Zone"; this.hasBasicLands = false; cards.add(new SetCardInfo("Abzan Falconer", 15, Rarity.UNCOMMON, mage.cards.a.AbzanFalconer.class)); diff --git a/Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java b/Mage.Sets/src/mage/sets/DuelDecksAjaniVsNicolBolas.java similarity index 97% rename from Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java rename to Mage.Sets/src/mage/sets/DuelDecksAjaniVsNicolBolas.java index bfb02daf0c..d45057ed6f 100644 --- a/Mage.Sets/src/mage/sets/AjaniVsNicolBolas.java +++ b/Mage.Sets/src/mage/sets/DuelDecksAjaniVsNicolBolas.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author LevelX2 */ -public final class AjaniVsNicolBolas extends ExpansionSet { +public final class DuelDecksAjaniVsNicolBolas extends ExpansionSet { - private static final AjaniVsNicolBolas instance = new AjaniVsNicolBolas(); + private static final DuelDecksAjaniVsNicolBolas instance = new DuelDecksAjaniVsNicolBolas(); - public static AjaniVsNicolBolas getInstance() { + public static DuelDecksAjaniVsNicolBolas getInstance() { return instance; } - private AjaniVsNicolBolas() { + private DuelDecksAjaniVsNicolBolas() { super("Duel Decks: Ajani vs. Nicol Bolas", "DDH", ExpansionSet.buildDate(2011, 9, 2), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; diff --git a/Mage.Sets/src/mage/sets/AnthologyDivineVsDemonic.java b/Mage.Sets/src/mage/sets/DuelDecksAnthologyDivineVsDemonic.java similarity index 95% rename from Mage.Sets/src/mage/sets/AnthologyDivineVsDemonic.java rename to Mage.Sets/src/mage/sets/DuelDecksAnthologyDivineVsDemonic.java index 3781785883..f42dd7ce48 100644 --- a/Mage.Sets/src/mage/sets/AnthologyDivineVsDemonic.java +++ b/Mage.Sets/src/mage/sets/DuelDecksAnthologyDivineVsDemonic.java @@ -1,4 +1,3 @@ - package mage.sets; import mage.cards.ExpansionSet; @@ -6,22 +5,22 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class AnthologyDivineVsDemonic extends ExpansionSet { +public final class DuelDecksAnthologyDivineVsDemonic extends ExpansionSet { - private static final AnthologyDivineVsDemonic instance = new AnthologyDivineVsDemonic(); + private static final DuelDecksAnthologyDivineVsDemonic instance = new DuelDecksAnthologyDivineVsDemonic(); - public static AnthologyDivineVsDemonic getInstance() { + public static DuelDecksAnthologyDivineVsDemonic getInstance() { return instance; } - private AnthologyDivineVsDemonic() { + private DuelDecksAnthologyDivineVsDemonic() { super("Duel Decks: Anthology, Divine vs. Demonic", "DD3DVD", ExpansionSet.buildDate(2014, 12, 5), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks: Anthology"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Abyssal Gatekeeper", 31, Rarity.COMMON, mage.cards.a.AbyssalGatekeeper.class)); cards.add(new SetCardInfo("Abyssal Specter", 40, Rarity.UNCOMMON, mage.cards.a.AbyssalSpecter.class)); cards.add(new SetCardInfo("Akroma, Angel of Wrath", 1, Rarity.MYTHIC, mage.cards.a.AkromaAngelOfWrath.class)); diff --git a/Mage.Sets/src/mage/sets/AnthologyElvesVsGoblins.java b/Mage.Sets/src/mage/sets/DuelDecksAnthologyElvesVsGoblins.java similarity index 96% rename from Mage.Sets/src/mage/sets/AnthologyElvesVsGoblins.java rename to Mage.Sets/src/mage/sets/DuelDecksAnthologyElvesVsGoblins.java index cdb194a0c2..6da2029429 100644 --- a/Mage.Sets/src/mage/sets/AnthologyElvesVsGoblins.java +++ b/Mage.Sets/src/mage/sets/DuelDecksAnthologyElvesVsGoblins.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author fireshoes */ -public final class AnthologyElvesVsGoblins extends ExpansionSet { +public final class DuelDecksAnthologyElvesVsGoblins extends ExpansionSet { - private static final AnthologyElvesVsGoblins instance = new AnthologyElvesVsGoblins(); + private static final DuelDecksAnthologyElvesVsGoblins instance = new DuelDecksAnthologyElvesVsGoblins(); - public static AnthologyElvesVsGoblins getInstance() { + public static DuelDecksAnthologyElvesVsGoblins getInstance() { return instance; } - private AnthologyElvesVsGoblins() { + private DuelDecksAnthologyElvesVsGoblins() { super("Duel Decks: Anthology, Elves vs. Goblins", "DD3EVG", ExpansionSet.buildDate(2014, 12, 5), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks: Anthology"; diff --git a/Mage.Sets/src/mage/sets/AnthologyGarrukVsLiliana.java b/Mage.Sets/src/mage/sets/DuelDecksAnthologyGarrukVsLiliana.java similarity index 95% rename from Mage.Sets/src/mage/sets/AnthologyGarrukVsLiliana.java rename to Mage.Sets/src/mage/sets/DuelDecksAnthologyGarrukVsLiliana.java index 754a0008d6..2671bec599 100644 --- a/Mage.Sets/src/mage/sets/AnthologyGarrukVsLiliana.java +++ b/Mage.Sets/src/mage/sets/DuelDecksAnthologyGarrukVsLiliana.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author fireshoes */ -public final class AnthologyGarrukVsLiliana extends ExpansionSet { +public final class DuelDecksAnthologyGarrukVsLiliana extends ExpansionSet { - private static final AnthologyGarrukVsLiliana instance = new AnthologyGarrukVsLiliana(); + private static final DuelDecksAnthologyGarrukVsLiliana instance = new DuelDecksAnthologyGarrukVsLiliana(); - public static AnthologyGarrukVsLiliana getInstance() { + public static DuelDecksAnthologyGarrukVsLiliana getInstance() { return instance; } - private AnthologyGarrukVsLiliana() { + private DuelDecksAnthologyGarrukVsLiliana() { super("Duel Decks: Anthology, Garruk vs. Liliana", "DD3GVL", ExpansionSet.buildDate(2014, 12, 5), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks: Anthology"; diff --git a/Mage.Sets/src/mage/sets/AnthologyJaceVsChandra.java b/Mage.Sets/src/mage/sets/DuelDecksAnthologyJaceVsChandra.java similarity index 95% rename from Mage.Sets/src/mage/sets/AnthologyJaceVsChandra.java rename to Mage.Sets/src/mage/sets/DuelDecksAnthologyJaceVsChandra.java index 92222d6eb9..dd1454bfe0 100644 --- a/Mage.Sets/src/mage/sets/AnthologyJaceVsChandra.java +++ b/Mage.Sets/src/mage/sets/DuelDecksAnthologyJaceVsChandra.java @@ -6,22 +6,22 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class AnthologyJaceVsChandra extends ExpansionSet { +public final class DuelDecksAnthologyJaceVsChandra extends ExpansionSet { - private static final AnthologyJaceVsChandra instance = new AnthologyJaceVsChandra(); + private static final DuelDecksAnthologyJaceVsChandra instance = new DuelDecksAnthologyJaceVsChandra(); - public static AnthologyJaceVsChandra getInstance() { + public static DuelDecksAnthologyJaceVsChandra getInstance() { return instance; } - private AnthologyJaceVsChandra() { + private DuelDecksAnthologyJaceVsChandra() { super("Duel Decks: Anthology, Jace vs. Chandra", "DD3JVC", ExpansionSet.buildDate(2014, 12, 5), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks: Anthology"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Aethersnipe", 17, Rarity.COMMON, mage.cards.a.Aethersnipe.class)); cards.add(new SetCardInfo("Air Elemental", 13, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Ancestral Vision", 21, Rarity.RARE, mage.cards.a.AncestralVision.class)); diff --git a/Mage.Sets/src/mage/sets/BlessedVsCursed.java b/Mage.Sets/src/mage/sets/DuelDecksBlessedVsCursed.java similarity index 97% rename from Mage.Sets/src/mage/sets/BlessedVsCursed.java rename to Mage.Sets/src/mage/sets/DuelDecksBlessedVsCursed.java index 82d2cfd697..3ecad9f7b8 100644 --- a/Mage.Sets/src/mage/sets/BlessedVsCursed.java +++ b/Mage.Sets/src/mage/sets/DuelDecksBlessedVsCursed.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author fireshoes */ -public final class BlessedVsCursed extends ExpansionSet { +public final class DuelDecksBlessedVsCursed extends ExpansionSet { - private static final BlessedVsCursed instance = new BlessedVsCursed(); + private static final DuelDecksBlessedVsCursed instance = new DuelDecksBlessedVsCursed(); - public static BlessedVsCursed getInstance() { + public static DuelDecksBlessedVsCursed getInstance() { return instance; } - private BlessedVsCursed() { + private DuelDecksBlessedVsCursed() { super("Duel Decks: Blessed vs. Cursed", "DDQ", ExpansionSet.buildDate(2016, 2, 26), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; diff --git a/Mage.Sets/src/mage/sets/DivineVsDemonic.java b/Mage.Sets/src/mage/sets/DuelDecksDivineVsDemonic.java similarity index 96% rename from Mage.Sets/src/mage/sets/DivineVsDemonic.java rename to Mage.Sets/src/mage/sets/DuelDecksDivineVsDemonic.java index 6e942f99ec..16f37617aa 100644 --- a/Mage.Sets/src/mage/sets/DivineVsDemonic.java +++ b/Mage.Sets/src/mage/sets/DuelDecksDivineVsDemonic.java @@ -1,4 +1,3 @@ - package mage.sets; import mage.cards.ExpansionSet; @@ -6,21 +5,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class DivineVsDemonic extends ExpansionSet { +public final class DuelDecksDivineVsDemonic extends ExpansionSet { - private static final DivineVsDemonic instance = new DivineVsDemonic(); + private static final DuelDecksDivineVsDemonic instance = new DuelDecksDivineVsDemonic(); - public static DivineVsDemonic getInstance() { + public static DuelDecksDivineVsDemonic getInstance() { return instance; } - private DivineVsDemonic() { + private DuelDecksDivineVsDemonic() { super("Duel Decks: Divine vs. Demonic", "DDC", ExpansionSet.buildDate(2009, 04, 10), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Abyssal Gatekeeper", 31, Rarity.COMMON, mage.cards.a.AbyssalGatekeeper.class)); cards.add(new SetCardInfo("Abyssal Specter", 40, Rarity.UNCOMMON, mage.cards.a.AbyssalSpecter.class)); cards.add(new SetCardInfo("Akroma, Angel of Wrath", 1, Rarity.MYTHIC, mage.cards.a.AkromaAngelOfWrath.class)); diff --git a/Mage.Sets/src/mage/sets/ElspethVsKiora.java b/Mage.Sets/src/mage/sets/DuelDecksElspethVsKiora.java similarity index 96% rename from Mage.Sets/src/mage/sets/ElspethVsKiora.java rename to Mage.Sets/src/mage/sets/DuelDecksElspethVsKiora.java index 48ea7fd935..28e7c01358 100644 --- a/Mage.Sets/src/mage/sets/ElspethVsKiora.java +++ b/Mage.Sets/src/mage/sets/DuelDecksElspethVsKiora.java @@ -7,21 +7,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class ElspethVsKiora extends ExpansionSet { +public final class DuelDecksElspethVsKiora extends ExpansionSet { - private static final ElspethVsKiora instance = new ElspethVsKiora(); + private static final DuelDecksElspethVsKiora instance = new DuelDecksElspethVsKiora(); - public static ElspethVsKiora getInstance() { + public static DuelDecksElspethVsKiora getInstance() { return instance; } - private ElspethVsKiora() { + private DuelDecksElspethVsKiora() { super("Duel Decks: Elspeth vs. Kiora", "DDO", ExpansionSet.buildDate(2015, 2, 27), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Accumulated Knowledge", 35, Rarity.COMMON, mage.cards.a.AccumulatedKnowledge.class)); cards.add(new SetCardInfo("Aetherize", 36, Rarity.UNCOMMON, mage.cards.a.Aetherize.class)); cards.add(new SetCardInfo("Banisher Priest", 2, Rarity.UNCOMMON, mage.cards.b.BanisherPriest.class)); diff --git a/Mage.Sets/src/mage/sets/ElspethVsTezzeret.java b/Mage.Sets/src/mage/sets/DuelDecksElspethVsTezzeret.java similarity index 97% rename from Mage.Sets/src/mage/sets/ElspethVsTezzeret.java rename to Mage.Sets/src/mage/sets/DuelDecksElspethVsTezzeret.java index 14916286f2..427978c1db 100644 --- a/Mage.Sets/src/mage/sets/ElspethVsTezzeret.java +++ b/Mage.Sets/src/mage/sets/DuelDecksElspethVsTezzeret.java @@ -4,18 +4,19 @@ import mage.cards.ExpansionSet; import mage.constants.Rarity; import mage.constants.SetType; -public final class ElspethVsTezzeret extends ExpansionSet { +public final class DuelDecksElspethVsTezzeret extends ExpansionSet { - private static final ElspethVsTezzeret instance = new ElspethVsTezzeret(); + private static final DuelDecksElspethVsTezzeret instance = new DuelDecksElspethVsTezzeret(); - public static ElspethVsTezzeret getInstance() { + public static DuelDecksElspethVsTezzeret getInstance() { return instance; } - private ElspethVsTezzeret() { + private DuelDecksElspethVsTezzeret() { super("Duel Decks: Elspeth vs. Tezzeret", "DDF", ExpansionSet.buildDate(2010, 8, 3), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Abolish", 29, Rarity.UNCOMMON, mage.cards.a.Abolish.class)); cards.add(new SetCardInfo("Aether Spellbomb", 61, Rarity.COMMON, mage.cards.a.AetherSpellbomb.class)); cards.add(new SetCardInfo("Angel of Salvation", 20, Rarity.RARE, mage.cards.a.AngelOfSalvation.class)); diff --git a/Mage.Sets/src/mage/sets/ElvesVsGoblins.java b/Mage.Sets/src/mage/sets/DuelDecksElvesVsGoblins.java similarity index 96% rename from Mage.Sets/src/mage/sets/ElvesVsGoblins.java rename to Mage.Sets/src/mage/sets/DuelDecksElvesVsGoblins.java index 3d26f6113b..086c78f695 100644 --- a/Mage.Sets/src/mage/sets/ElvesVsGoblins.java +++ b/Mage.Sets/src/mage/sets/DuelDecksElvesVsGoblins.java @@ -5,21 +5,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class ElvesVsGoblins extends ExpansionSet { +public final class DuelDecksElvesVsGoblins extends ExpansionSet { - private static final ElvesVsGoblins instance = new ElvesVsGoblins(); + private static final DuelDecksElvesVsGoblins instance = new DuelDecksElvesVsGoblins(); - public static ElvesVsGoblins getInstance() { + public static DuelDecksElvesVsGoblins getInstance() { return instance; } - private ElvesVsGoblins() { + private DuelDecksElvesVsGoblins() { super("Duel Decks: Elves vs. Goblins", "EVG", ExpansionSet.buildDate(2007, 11, 16), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Akki Coalflinger", 33, Rarity.UNCOMMON, mage.cards.a.AkkiCoalflinger.class)); cards.add(new SetCardInfo("Allosaurus Rider", 2, Rarity.RARE, mage.cards.a.AllosaurusRider.class)); cards.add(new SetCardInfo("Ambush Commander", 1, Rarity.RARE, mage.cards.a.AmbushCommander.class)); diff --git a/Mage.Sets/src/mage/sets/ElvesVsInventors.java b/Mage.Sets/src/mage/sets/DuelDecksElvesVsInventors.java similarity index 97% rename from Mage.Sets/src/mage/sets/ElvesVsInventors.java rename to Mage.Sets/src/mage/sets/DuelDecksElvesVsInventors.java index 7bfcee6339..1624a92d50 100644 --- a/Mage.Sets/src/mage/sets/ElvesVsInventors.java +++ b/Mage.Sets/src/mage/sets/DuelDecksElvesVsInventors.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author TheElk801 */ -public final class ElvesVsInventors extends ExpansionSet { +public final class DuelDecksElvesVsInventors extends ExpansionSet { - private static final ElvesVsInventors instance = new ElvesVsInventors(); + private static final DuelDecksElvesVsInventors instance = new DuelDecksElvesVsInventors(); - public static ElvesVsInventors getInstance() { + public static DuelDecksElvesVsInventors getInstance() { return instance; } - private ElvesVsInventors() { + private DuelDecksElvesVsInventors() { super("Duel Decks: Elves vs. Inventors", "DDU", ExpansionSet.buildDate(2018, 4, 6), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; + cards.add(new SetCardInfo("Artificer's Epiphany", 36, Rarity.COMMON, mage.cards.a.ArtificersEpiphany.class)); cards.add(new SetCardInfo("Barrage Ogre", 44, Rarity.UNCOMMON, mage.cards.b.BarrageOgre.class)); cards.add(new SetCardInfo("Darksteel Citadel", 65, Rarity.UNCOMMON, mage.cards.d.DarksteelCitadel.class)); diff --git a/Mage.Sets/src/mage/sets/GarrukVsLiliana.java b/Mage.Sets/src/mage/sets/DuelDecksGarrukVsLiliana.java similarity index 96% rename from Mage.Sets/src/mage/sets/GarrukVsLiliana.java rename to Mage.Sets/src/mage/sets/DuelDecksGarrukVsLiliana.java index f1d2fe5342..784b1a1b27 100644 --- a/Mage.Sets/src/mage/sets/GarrukVsLiliana.java +++ b/Mage.Sets/src/mage/sets/DuelDecksGarrukVsLiliana.java @@ -10,21 +10,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class GarrukVsLiliana extends ExpansionSet { +public final class DuelDecksGarrukVsLiliana extends ExpansionSet { - private static final GarrukVsLiliana instance = new GarrukVsLiliana(); + private static final DuelDecksGarrukVsLiliana instance = new DuelDecksGarrukVsLiliana(); - public static GarrukVsLiliana getInstance() { + public static DuelDecksGarrukVsLiliana getInstance() { return instance; } - private GarrukVsLiliana() { + private DuelDecksGarrukVsLiliana() { super("Duel Decks: Garruk vs. Liliana", "DDD", ExpansionSet.buildDate(2009, 10, 30), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Albino Troll", 3, Rarity.UNCOMMON, mage.cards.a.AlbinoTroll.class)); cards.add(new SetCardInfo("Bad Moon", 48, Rarity.RARE, mage.cards.b.BadMoon.class)); cards.add(new SetCardInfo("Basking Rootwalla", 2, Rarity.COMMON, mage.cards.b.BaskingRootwalla.class)); diff --git a/Mage.Sets/src/mage/sets/HeroesVsMonsters.java b/Mage.Sets/src/mage/sets/DuelDecksHeroesVsMonsters.java similarity index 97% rename from Mage.Sets/src/mage/sets/HeroesVsMonsters.java rename to Mage.Sets/src/mage/sets/DuelDecksHeroesVsMonsters.java index 57b9a99bf7..d629798273 100644 --- a/Mage.Sets/src/mage/sets/HeroesVsMonsters.java +++ b/Mage.Sets/src/mage/sets/DuelDecksHeroesVsMonsters.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class HeroesVsMonsters extends ExpansionSet { +public final class DuelDecksHeroesVsMonsters extends ExpansionSet { - private static final HeroesVsMonsters instance = new HeroesVsMonsters(); + private static final DuelDecksHeroesVsMonsters instance = new DuelDecksHeroesVsMonsters(); - public static HeroesVsMonsters getInstance() { + public static DuelDecksHeroesVsMonsters getInstance() { return instance; } - private HeroesVsMonsters() { + private DuelDecksHeroesVsMonsters() { super("Duel Decks: Heroes vs. Monsters", "DDL", ExpansionSet.buildDate(2013, 9, 6), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Anax and Cymede", 11, Rarity.RARE, mage.cards.a.AnaxAndCymede.class)); cards.add(new SetCardInfo("Armory Guard", 12, Rarity.COMMON, mage.cards.a.ArmoryGuard.class)); cards.add(new SetCardInfo("Auramancer", 9, Rarity.COMMON, mage.cards.a.Auramancer.class)); diff --git a/Mage.Sets/src/mage/sets/IzzetVsGolgari.java b/Mage.Sets/src/mage/sets/DuelDecksIzzetVsGolgari.java similarity index 97% rename from Mage.Sets/src/mage/sets/IzzetVsGolgari.java rename to Mage.Sets/src/mage/sets/DuelDecksIzzetVsGolgari.java index 7c6b49e11c..be47d4f994 100644 --- a/Mage.Sets/src/mage/sets/IzzetVsGolgari.java +++ b/Mage.Sets/src/mage/sets/DuelDecksIzzetVsGolgari.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class IzzetVsGolgari extends ExpansionSet { +public final class DuelDecksIzzetVsGolgari extends ExpansionSet { - private static final IzzetVsGolgari instance = new IzzetVsGolgari(); + private static final DuelDecksIzzetVsGolgari instance = new DuelDecksIzzetVsGolgari(); - public static IzzetVsGolgari getInstance() { + public static DuelDecksIzzetVsGolgari getInstance() { return instance; } - private IzzetVsGolgari() { + private DuelDecksIzzetVsGolgari() { super("Duel Decks: Izzet vs. Golgari", "DDJ", ExpansionSet.buildDate(2012, 9, 7), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Barren Moor", 78, Rarity.COMMON, mage.cards.b.BarrenMoor.class)); cards.add(new SetCardInfo("Boneyard Wurm", 51, Rarity.UNCOMMON, mage.cards.b.BoneyardWurm.class)); cards.add(new SetCardInfo("Brainstorm", 13, Rarity.COMMON, mage.cards.b.Brainstorm.class)); diff --git a/Mage.Sets/src/mage/sets/JaceVsChandra.java b/Mage.Sets/src/mage/sets/DuelDecksJaceVsChandra.java similarity index 96% rename from Mage.Sets/src/mage/sets/JaceVsChandra.java rename to Mage.Sets/src/mage/sets/DuelDecksJaceVsChandra.java index ad36e26b9a..4e1e9fde86 100644 --- a/Mage.Sets/src/mage/sets/JaceVsChandra.java +++ b/Mage.Sets/src/mage/sets/DuelDecksJaceVsChandra.java @@ -10,21 +10,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class JaceVsChandra extends ExpansionSet { +public final class DuelDecksJaceVsChandra extends ExpansionSet { - private static final JaceVsChandra instance = new JaceVsChandra(); + private static final DuelDecksJaceVsChandra instance = new DuelDecksJaceVsChandra(); - public static JaceVsChandra getInstance() { + public static DuelDecksJaceVsChandra getInstance() { return instance; } - private JaceVsChandra() { + private DuelDecksJaceVsChandra() { super("Duel Decks: Jace vs. Chandra", "DD2", ExpansionSet.buildDate(2008, 11, 07), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Aethersnipe", 17, Rarity.COMMON, mage.cards.a.Aethersnipe.class)); cards.add(new SetCardInfo("Air Elemental", 13, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); cards.add(new SetCardInfo("Ancestral Vision", 21, Rarity.RARE, mage.cards.a.AncestralVision.class)); diff --git a/Mage.Sets/src/mage/sets/JaceVsVraska.java b/Mage.Sets/src/mage/sets/DuelDecksJaceVsVraska.java similarity index 97% rename from Mage.Sets/src/mage/sets/JaceVsVraska.java rename to Mage.Sets/src/mage/sets/DuelDecksJaceVsVraska.java index 097572aa14..ace1a7b25e 100644 --- a/Mage.Sets/src/mage/sets/JaceVsVraska.java +++ b/Mage.Sets/src/mage/sets/DuelDecksJaceVsVraska.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class JaceVsVraska extends ExpansionSet { +public final class DuelDecksJaceVsVraska extends ExpansionSet { - private static final JaceVsVraska instance = new JaceVsVraska(); + private static final DuelDecksJaceVsVraska instance = new DuelDecksJaceVsVraska(); - public static JaceVsVraska getInstance() { + public static DuelDecksJaceVsVraska getInstance() { return instance; } - private JaceVsVraska() { + private DuelDecksJaceVsVraska() { super("Duel Decks: Jace vs. Vraska", "DDM", ExpansionSet.buildDate(2014, 3, 14), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Acidic Slime", 64, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class)); cards.add(new SetCardInfo("Aeon Chronicler", 17, Rarity.RARE, mage.cards.a.AeonChronicler.class)); cards.add(new SetCardInfo("Aether Adept", 12, Rarity.COMMON, mage.cards.a.AetherAdept.class)); diff --git a/Mage.Sets/src/mage/sets/KnightsVsDragons.java b/Mage.Sets/src/mage/sets/DuelDecksKnightsVsDragons.java similarity index 97% rename from Mage.Sets/src/mage/sets/KnightsVsDragons.java rename to Mage.Sets/src/mage/sets/DuelDecksKnightsVsDragons.java index 4e0eb60137..560412869e 100644 --- a/Mage.Sets/src/mage/sets/KnightsVsDragons.java +++ b/Mage.Sets/src/mage/sets/DuelDecksKnightsVsDragons.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class KnightsVsDragons extends ExpansionSet { +public final class DuelDecksKnightsVsDragons extends ExpansionSet { - private static final KnightsVsDragons instance = new KnightsVsDragons(); + private static final DuelDecksKnightsVsDragons instance = new DuelDecksKnightsVsDragons(); - public static KnightsVsDragons getInstance() { + public static DuelDecksKnightsVsDragons getInstance() { return instance; } - private KnightsVsDragons() { + private DuelDecksKnightsVsDragons() { super("Duel Decks: Knights vs. Dragons", "DDG", ExpansionSet.buildDate(2011, 4, 1), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Alaborn Cavalier", 18, Rarity.UNCOMMON, mage.cards.a.AlabornCavalier.class)); cards.add(new SetCardInfo("Armillary Sphere", 62, Rarity.COMMON, mage.cards.a.ArmillarySphere.class)); cards.add(new SetCardInfo("Benalish Lancer", 12, Rarity.COMMON, mage.cards.b.BenalishLancer.class)); diff --git a/Mage.Sets/src/mage/sets/MerfolkVsGoblins.java b/Mage.Sets/src/mage/sets/DuelDecksMerfolkVsGoblins.java similarity index 96% rename from Mage.Sets/src/mage/sets/MerfolkVsGoblins.java rename to Mage.Sets/src/mage/sets/DuelDecksMerfolkVsGoblins.java index 3fc8fd2ed8..564fabb3d1 100644 --- a/Mage.Sets/src/mage/sets/MerfolkVsGoblins.java +++ b/Mage.Sets/src/mage/sets/DuelDecksMerfolkVsGoblins.java @@ -6,18 +6,17 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class MerfolkVsGoblins extends ExpansionSet { +public final class DuelDecksMerfolkVsGoblins extends ExpansionSet { - private static final MerfolkVsGoblins instance = new MerfolkVsGoblins(); + private static final DuelDecksMerfolkVsGoblins instance = new DuelDecksMerfolkVsGoblins(); - public static MerfolkVsGoblins getInstance() { + public static DuelDecksMerfolkVsGoblins getInstance() { return instance; } - private MerfolkVsGoblins() { + private DuelDecksMerfolkVsGoblins() { super("Duel Decks: Merfolk vs. Goblins", "DDT", ExpansionSet.buildDate(2017, 11, 10), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; diff --git a/Mage.Sets/src/mage/sets/MindVsMight.java b/Mage.Sets/src/mage/sets/DuelDecksMindVsMight.java similarity index 96% rename from Mage.Sets/src/mage/sets/MindVsMight.java rename to Mage.Sets/src/mage/sets/DuelDecksMindVsMight.java index 0030640825..4745ee10b4 100644 --- a/Mage.Sets/src/mage/sets/MindVsMight.java +++ b/Mage.Sets/src/mage/sets/DuelDecksMindVsMight.java @@ -8,18 +8,19 @@ import mage.constants.SetType; * * @author fireshoes */ -public final class MindVsMight extends ExpansionSet { +public final class DuelDecksMindVsMight extends ExpansionSet { - private static final MindVsMight instance = new MindVsMight(); + private static final DuelDecksMindVsMight instance = new DuelDecksMindVsMight(); - public static MindVsMight getInstance() { + public static DuelDecksMindVsMight getInstance() { return instance; } - private MindVsMight() { + private DuelDecksMindVsMight() { super("Duel Decks: Mind vs. Might", "DDS", ExpansionSet.buildDate(2017, 3, 31), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Ambassador Oak", 42, Rarity.COMMON, mage.cards.a.AmbassadorOak.class)); cards.add(new SetCardInfo("Beacon of Destruction", 35, Rarity.RARE, mage.cards.b.BeaconOfDestruction.class)); cards.add(new SetCardInfo("Beacon of Tomorrows", 2, Rarity.RARE, mage.cards.b.BeaconOfTomorrows.class)); diff --git a/Mage.Sets/src/mage/sets/NissaVsObNixilis.java b/Mage.Sets/src/mage/sets/DuelDecksNissaVsObNixilis.java similarity index 96% rename from Mage.Sets/src/mage/sets/NissaVsObNixilis.java rename to Mage.Sets/src/mage/sets/DuelDecksNissaVsObNixilis.java index 30216d2d59..f05caa644c 100644 --- a/Mage.Sets/src/mage/sets/NissaVsObNixilis.java +++ b/Mage.Sets/src/mage/sets/DuelDecksNissaVsObNixilis.java @@ -5,18 +5,17 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class NissaVsObNixilis extends ExpansionSet { +public final class DuelDecksNissaVsObNixilis extends ExpansionSet { - private static final NissaVsObNixilis instance = new NissaVsObNixilis(); + private static final DuelDecksNissaVsObNixilis instance = new DuelDecksNissaVsObNixilis(); - public static NissaVsObNixilis getInstance() { + public static DuelDecksNissaVsObNixilis getInstance() { return instance; } - private NissaVsObNixilis() { + private DuelDecksNissaVsObNixilis() { super("Duel Decks: Nissa vs. Ob Nixilis", "DDR", ExpansionSet.buildDate(2016, 9, 2), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; diff --git a/Mage.Sets/src/mage/sets/PhyrexiaVsTheCoalition.java b/Mage.Sets/src/mage/sets/DuelDecksPhyrexiaVsTheCoalition.java similarity index 96% rename from Mage.Sets/src/mage/sets/PhyrexiaVsTheCoalition.java rename to Mage.Sets/src/mage/sets/DuelDecksPhyrexiaVsTheCoalition.java index e32379cc81..9ceb369deb 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaVsTheCoalition.java +++ b/Mage.Sets/src/mage/sets/DuelDecksPhyrexiaVsTheCoalition.java @@ -6,22 +6,22 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class PhyrexiaVsTheCoalition extends ExpansionSet { +public final class DuelDecksPhyrexiaVsTheCoalition extends ExpansionSet { - private static final PhyrexiaVsTheCoalition instance = new PhyrexiaVsTheCoalition(); + private static final DuelDecksPhyrexiaVsTheCoalition instance = new DuelDecksPhyrexiaVsTheCoalition(); - public static PhyrexiaVsTheCoalition getInstance() { + public static DuelDecksPhyrexiaVsTheCoalition getInstance() { return instance; } - private PhyrexiaVsTheCoalition() { + private DuelDecksPhyrexiaVsTheCoalition() { super("Duel Decks: Phyrexia vs. the Coalition", "DDE", ExpansionSet.buildDate(2010, 3, 19), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Allied Strategies", 63, Rarity.UNCOMMON, mage.cards.a.AlliedStrategies.class)); cards.add(new SetCardInfo("Armadillo Cloak", 58, Rarity.COMMON, mage.cards.a.ArmadilloCloak.class)); cards.add(new SetCardInfo("Bone Shredder", 5, Rarity.UNCOMMON, mage.cards.b.BoneShredder.class)); diff --git a/Mage.Sets/src/mage/sets/SorinVsTibalt.java b/Mage.Sets/src/mage/sets/DuelDecksSorinVsTibalt.java similarity index 97% rename from Mage.Sets/src/mage/sets/SorinVsTibalt.java rename to Mage.Sets/src/mage/sets/DuelDecksSorinVsTibalt.java index a4167a3b4a..8267b5151e 100644 --- a/Mage.Sets/src/mage/sets/SorinVsTibalt.java +++ b/Mage.Sets/src/mage/sets/DuelDecksSorinVsTibalt.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class SorinVsTibalt extends ExpansionSet { +public final class DuelDecksSorinVsTibalt extends ExpansionSet { - private static final SorinVsTibalt instance = new SorinVsTibalt(); + private static final DuelDecksSorinVsTibalt instance = new DuelDecksSorinVsTibalt(); - public static SorinVsTibalt getInstance() { + public static DuelDecksSorinVsTibalt getInstance() { return instance; } - private SorinVsTibalt() { + private DuelDecksSorinVsTibalt() { super("Duel Decks: Sorin vs. Tibalt", "DDK", ExpansionSet.buildDate(2013, 3, 15), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Absorb Vis", 31, Rarity.COMMON, mage.cards.a.AbsorbVis.class)); cards.add(new SetCardInfo("Akoum Refuge", 73, Rarity.UNCOMMON, mage.cards.a.AkoumRefuge.class)); cards.add(new SetCardInfo("Ancient Craving", 28, Rarity.RARE, mage.cards.a.AncientCraving.class)); diff --git a/Mage.Sets/src/mage/sets/SpeedVsCunning.java b/Mage.Sets/src/mage/sets/DuelDecksSpeedVsCunning.java similarity index 97% rename from Mage.Sets/src/mage/sets/SpeedVsCunning.java rename to Mage.Sets/src/mage/sets/DuelDecksSpeedVsCunning.java index 792095ff06..7f41ae0973 100644 --- a/Mage.Sets/src/mage/sets/SpeedVsCunning.java +++ b/Mage.Sets/src/mage/sets/DuelDecksSpeedVsCunning.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class SpeedVsCunning extends ExpansionSet { +public final class DuelDecksSpeedVsCunning extends ExpansionSet { - private static final SpeedVsCunning instance = new SpeedVsCunning(); + private static final DuelDecksSpeedVsCunning instance = new DuelDecksSpeedVsCunning(); - public static SpeedVsCunning getInstance() { + public static DuelDecksSpeedVsCunning getInstance() { return instance; } - private SpeedVsCunning() { + private DuelDecksSpeedVsCunning() { super("Duel Decks: Speed vs. Cunning", "DDN", ExpansionSet.buildDate(2014, 9, 5), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Act of Treason", 26, Rarity.COMMON, mage.cards.a.ActOfTreason.class)); cards.add(new SetCardInfo("Aquamorph Entity", 54, Rarity.COMMON, mage.cards.a.AquamorphEntity.class)); cards.add(new SetCardInfo("Arcanis the Omnipotent", 42, Rarity.MYTHIC, mage.cards.a.ArcanisTheOmnipotent.class)); diff --git a/Mage.Sets/src/mage/sets/VenserVsKoth.java b/Mage.Sets/src/mage/sets/DuelDecksVenserVsKoth.java similarity index 97% rename from Mage.Sets/src/mage/sets/VenserVsKoth.java rename to Mage.Sets/src/mage/sets/DuelDecksVenserVsKoth.java index 14424bff5d..cfab4d1272 100644 --- a/Mage.Sets/src/mage/sets/VenserVsKoth.java +++ b/Mage.Sets/src/mage/sets/DuelDecksVenserVsKoth.java @@ -5,21 +5,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class VenserVsKoth extends ExpansionSet { +public final class DuelDecksVenserVsKoth extends ExpansionSet { - private static final VenserVsKoth instance = new VenserVsKoth(); + private static final DuelDecksVenserVsKoth instance = new DuelDecksVenserVsKoth(); - public static VenserVsKoth getInstance() { + public static DuelDecksVenserVsKoth getInstance() { return instance; } - private VenserVsKoth() { + private DuelDecksVenserVsKoth() { super("Duel Decks: Venser vs. Koth", "DDI", ExpansionSet.buildDate(2012, 3, 30), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Aether Membrane", 48, Rarity.UNCOMMON, mage.cards.a.AetherMembrane.class)); cards.add(new SetCardInfo("Angelic Shield", 27, Rarity.UNCOMMON, mage.cards.a.AngelicShield.class)); cards.add(new SetCardInfo("Anger", 51, Rarity.UNCOMMON, mage.cards.a.Anger.class)); diff --git a/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java b/Mage.Sets/src/mage/sets/DuelDecksZendikarVsEldrazi.java similarity index 96% rename from Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java rename to Mage.Sets/src/mage/sets/DuelDecksZendikarVsEldrazi.java index 63256e1560..ca327a07f0 100644 --- a/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java +++ b/Mage.Sets/src/mage/sets/DuelDecksZendikarVsEldrazi.java @@ -5,21 +5,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class ZendikarVsEldrazi extends ExpansionSet { +public final class DuelDecksZendikarVsEldrazi extends ExpansionSet { - private static final ZendikarVsEldrazi instance = new ZendikarVsEldrazi(); + private static final DuelDecksZendikarVsEldrazi instance = new DuelDecksZendikarVsEldrazi(); - public static ZendikarVsEldrazi getInstance() { + public static DuelDecksZendikarVsEldrazi getInstance() { return instance; } - private ZendikarVsEldrazi() { + private DuelDecksZendikarVsEldrazi() { super("Duel Decks: Zendikar vs. Eldrazi", "DDP", ExpansionSet.buildDate(2015, 8, 28), SetType.SUPPLEMENTAL); this.blockName = "Duel Decks"; this.hasBasicLands = false; + cards.add(new SetCardInfo("Affa Guard Hound", 2, Rarity.UNCOMMON, mage.cards.a.AffaGuardHound.class)); cards.add(new SetCardInfo("Akoum Refuge", 67, Rarity.UNCOMMON, mage.cards.a.AkoumRefuge.class)); cards.add(new SetCardInfo("Artisan of Kozilek", 42, Rarity.UNCOMMON, mage.cards.a.ArtisanOfKozilek.class)); diff --git a/Mage.Sets/src/mage/sets/FTVAngels.java b/Mage.Sets/src/mage/sets/FromTheVaultAngels.java similarity index 89% rename from Mage.Sets/src/mage/sets/FTVAngels.java rename to Mage.Sets/src/mage/sets/FromTheVaultAngels.java index cffedcb038..ae89485479 100644 --- a/Mage.Sets/src/mage/sets/FTVAngels.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultAngels.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVAngels extends ExpansionSet { +public final class FromTheVaultAngels extends ExpansionSet { - private static final FTVAngels instance = new FTVAngels(); + private static final FromTheVaultAngels instance = new FromTheVaultAngels(); - public static FTVAngels getInstance() { + public static FromTheVaultAngels getInstance() { return instance; } - private FTVAngels() { + private FromTheVaultAngels() { super("From the Vault: Angels", "V15", ExpansionSet.buildDate(2015, 8, 21), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Akroma, Angel of Fury", 1, Rarity.MYTHIC, mage.cards.a.AkromaAngelOfFury.class)); cards.add(new SetCardInfo("Akroma, Angel of Wrath", 2, Rarity.MYTHIC, mage.cards.a.AkromaAngelOfWrath.class)); cards.add(new SetCardInfo("Archangel of Strife", 3, Rarity.MYTHIC, mage.cards.a.ArchangelOfStrife.class)); diff --git a/Mage.Sets/src/mage/sets/FTVAnnihilation.java b/Mage.Sets/src/mage/sets/FromTheVaultAnnihilation.java similarity index 87% rename from Mage.Sets/src/mage/sets/FTVAnnihilation.java rename to Mage.Sets/src/mage/sets/FromTheVaultAnnihilation.java index 590ecd4d04..6228951384 100644 --- a/Mage.Sets/src/mage/sets/FTVAnnihilation.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultAnnihilation.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVAnnihilation extends ExpansionSet { +public final class FromTheVaultAnnihilation extends ExpansionSet { - private static final FTVAnnihilation instance = new FTVAnnihilation(); + private static final FromTheVaultAnnihilation instance = new FromTheVaultAnnihilation(); - public static FTVAnnihilation getInstance() { + public static FromTheVaultAnnihilation getInstance() { return instance; } - private FTVAnnihilation() { + private FromTheVaultAnnihilation() { super("From the Vault: Annihilation", "V14", ExpansionSet.buildDate(2014, 8, 22), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Armageddon", 1, Rarity.MYTHIC, mage.cards.a.Armageddon.class)); cards.add(new SetCardInfo("Burning of Xinye", 2, Rarity.MYTHIC, mage.cards.b.BurningOfXinye.class)); cards.add(new SetCardInfo("Cataclysm", 3, Rarity.MYTHIC, mage.cards.c.Cataclysm.class)); diff --git a/Mage.Sets/src/mage/sets/FTVDragons.java b/Mage.Sets/src/mage/sets/FromTheVaultDragons.java similarity index 89% rename from Mage.Sets/src/mage/sets/FTVDragons.java rename to Mage.Sets/src/mage/sets/FromTheVaultDragons.java index 7352718537..30f2dbec17 100644 --- a/Mage.Sets/src/mage/sets/FTVDragons.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultDragons.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author fireshoes */ -public final class FTVDragons extends ExpansionSet { +public final class FromTheVaultDragons extends ExpansionSet { - private static final FTVDragons instance = new FTVDragons(); + private static final FromTheVaultDragons instance = new FromTheVaultDragons(); - public static FTVDragons getInstance() { + public static FromTheVaultDragons getInstance() { return instance; } - private FTVDragons() { + private FromTheVaultDragons() { super("From the Vault: Dragons", "DRB", ExpansionSet.buildDate(2008, 8, 29), SetType.SUPPLEMENTAL); this.hasBasicLands = false; cards.add(new SetCardInfo("Bladewing the Risen", 1, Rarity.RARE, mage.cards.b.BladewingTheRisen.class)); diff --git a/Mage.Sets/src/mage/sets/FTVExiled.java b/Mage.Sets/src/mage/sets/FromTheVaultExiled.java similarity index 88% rename from Mage.Sets/src/mage/sets/FTVExiled.java rename to Mage.Sets/src/mage/sets/FromTheVaultExiled.java index ff5db9f89d..e6ec0fefb8 100644 --- a/Mage.Sets/src/mage/sets/FTVExiled.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultExiled.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVExiled extends ExpansionSet { +public final class FromTheVaultExiled extends ExpansionSet { - private static final FTVExiled instance = new FTVExiled(); + private static final FromTheVaultExiled instance = new FromTheVaultExiled(); - public static FTVExiled getInstance() { + public static FromTheVaultExiled getInstance() { return instance; } - private FTVExiled() { + private FromTheVaultExiled() { super("From the Vault: Exiled", "V09", ExpansionSet.buildDate(2009, 8, 28), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Balance", 1, Rarity.MYTHIC, mage.cards.b.Balance.class)); cards.add(new SetCardInfo("Berserk", 2, Rarity.MYTHIC, mage.cards.b.Berserk.class)); cards.add(new SetCardInfo("Channel", 3, Rarity.MYTHIC, mage.cards.c.Channel.class)); diff --git a/Mage.Sets/src/mage/sets/FTVLegends.java b/Mage.Sets/src/mage/sets/FromTheVaultLegends.java similarity index 89% rename from Mage.Sets/src/mage/sets/FTVLegends.java rename to Mage.Sets/src/mage/sets/FromTheVaultLegends.java index 11dae6d358..364affb431 100644 --- a/Mage.Sets/src/mage/sets/FTVLegends.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultLegends.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVLegends extends ExpansionSet { +public final class FromTheVaultLegends extends ExpansionSet { - private static final FTVLegends instance = new FTVLegends(); + private static final FromTheVaultLegends instance = new FromTheVaultLegends(); - public static FTVLegends getInstance() { + public static FromTheVaultLegends getInstance() { return instance; } - private FTVLegends() { + private FromTheVaultLegends() { super("From the Vault: Legends", "V11", ExpansionSet.buildDate(2011, 8, 26), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Cao Cao, Lord of Wei", 1, Rarity.MYTHIC, mage.cards.c.CaoCaoLordOfWei.class)); cards.add(new SetCardInfo("Captain Sisay", 2, Rarity.MYTHIC, mage.cards.c.CaptainSisay.class)); cards.add(new SetCardInfo("Doran, the Siege Tower", 3, Rarity.MYTHIC, mage.cards.d.DoranTheSiegeTower.class)); diff --git a/Mage.Sets/src/mage/sets/FTVLore.java b/Mage.Sets/src/mage/sets/FromTheVaultLore.java similarity index 89% rename from Mage.Sets/src/mage/sets/FTVLore.java rename to Mage.Sets/src/mage/sets/FromTheVaultLore.java index 3fbfb9ba82..29f37a596a 100644 --- a/Mage.Sets/src/mage/sets/FTVLore.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultLore.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVLore extends ExpansionSet { +public final class FromTheVaultLore extends ExpansionSet { - private static final FTVLore instance = new FTVLore(); + private static final FromTheVaultLore instance = new FromTheVaultLore(); - public static FTVLore getInstance() { + public static FromTheVaultLore getInstance() { return instance; } - private FTVLore() { + private FromTheVaultLore() { super("From the Vault: Lore", "V16", ExpansionSet.buildDate(2016, 8, 19), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Beseech the Queen", 1, Rarity.MYTHIC, mage.cards.b.BeseechTheQueen.class)); cards.add(new SetCardInfo("Cabal Ritual", 2, Rarity.MYTHIC, mage.cards.c.CabalRitual.class)); cards.add(new SetCardInfo("Conflux", 3, Rarity.MYTHIC, mage.cards.c.Conflux.class)); diff --git a/Mage.Sets/src/mage/sets/FTVRealms.java b/Mage.Sets/src/mage/sets/FromTheVaultRealms.java similarity index 89% rename from Mage.Sets/src/mage/sets/FTVRealms.java rename to Mage.Sets/src/mage/sets/FromTheVaultRealms.java index 3b41922476..da6693e6b9 100644 --- a/Mage.Sets/src/mage/sets/FTVRealms.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultRealms.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVRealms extends ExpansionSet { +public final class FromTheVaultRealms extends ExpansionSet { - private static final FTVRealms instance = new FTVRealms(); + private static final FromTheVaultRealms instance = new FromTheVaultRealms(); - public static FTVRealms getInstance() { + public static FromTheVaultRealms getInstance() { return instance; } - private FTVRealms() { + private FromTheVaultRealms() { super("From the Vault: Realms", "V12", ExpansionSet.buildDate(2012, 8, 31), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Ancient Tomb", 1, Rarity.MYTHIC, mage.cards.a.AncientTomb.class)); cards.add(new SetCardInfo("Boseiju, Who Shelters All", 2, Rarity.MYTHIC, mage.cards.b.BoseijuWhoSheltersAll.class)); cards.add(new SetCardInfo("Cephalid Coliseum", 3, Rarity.MYTHIC, mage.cards.c.CephalidColiseum.class)); diff --git a/Mage.Sets/src/mage/sets/FTVRelics.java b/Mage.Sets/src/mage/sets/FromTheVaultRelics.java similarity index 89% rename from Mage.Sets/src/mage/sets/FTVRelics.java rename to Mage.Sets/src/mage/sets/FromTheVaultRelics.java index 8781c002c8..ba2a81ed2a 100644 --- a/Mage.Sets/src/mage/sets/FTVRelics.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultRelics.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVRelics extends ExpansionSet { +public final class FromTheVaultRelics extends ExpansionSet { - private static final FTVRelics instance = new FTVRelics(); + private static final FromTheVaultRelics instance = new FromTheVaultRelics(); - public static FTVRelics getInstance() { + public static FromTheVaultRelics getInstance() { return instance; } - private FTVRelics() { + private FromTheVaultRelics() { super("From the Vault: Relics", "V10", ExpansionSet.buildDate(2010, 8, 27), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Aether Vial", 1, Rarity.MYTHIC, mage.cards.a.AetherVial.class)); cards.add(new SetCardInfo("Black Vise", 2, Rarity.MYTHIC, mage.cards.b.BlackVise.class)); cards.add(new SetCardInfo("Isochron Scepter", 3, Rarity.MYTHIC, mage.cards.i.IsochronScepter.class)); diff --git a/Mage.Sets/src/mage/sets/FTVTransform.java b/Mage.Sets/src/mage/sets/FromTheVaultTransform.java similarity index 94% rename from Mage.Sets/src/mage/sets/FTVTransform.java rename to Mage.Sets/src/mage/sets/FromTheVaultTransform.java index bf4dcd75b1..ac08d9ce7a 100644 --- a/Mage.Sets/src/mage/sets/FTVTransform.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultTransform.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVTransform extends ExpansionSet { +public final class FromTheVaultTransform extends ExpansionSet { - private static final FTVTransform instance = new FTVTransform(); + private static final FromTheVaultTransform instance = new FromTheVaultTransform(); - public static FTVTransform getInstance() { + public static FromTheVaultTransform getInstance() { return instance; } - private FTVTransform() { + private FromTheVaultTransform() { super("From the Vault: Transform", "V17", ExpansionSet.buildDate(2017, 11, 24), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Archangel Avacyn", 1, Rarity.MYTHIC, mage.cards.a.ArchangelAvacyn.class)); cards.add(new SetCardInfo("Avacyn, the Purifier", 1001, Rarity.MYTHIC, mage.cards.a.AvacynThePurifier.class)); cards.add(new SetCardInfo("Arguel's Blood Fast", 2, Rarity.MYTHIC, mage.cards.a.ArguelsBloodFast.class)); diff --git a/Mage.Sets/src/mage/sets/FTVTwenty.java b/Mage.Sets/src/mage/sets/FromTheVaultTwenty.java similarity index 91% rename from Mage.Sets/src/mage/sets/FTVTwenty.java rename to Mage.Sets/src/mage/sets/FromTheVaultTwenty.java index f41f6626a8..0e4878217b 100644 --- a/Mage.Sets/src/mage/sets/FTVTwenty.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultTwenty.java @@ -5,20 +5,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class FTVTwenty extends ExpansionSet { +public final class FromTheVaultTwenty extends ExpansionSet { - private static final FTVTwenty instance = new FTVTwenty(); + private static final FromTheVaultTwenty instance = new FromTheVaultTwenty(); - public static FTVTwenty getInstance() { + public static FromTheVaultTwenty getInstance() { return instance; } - private FTVTwenty() { + private FromTheVaultTwenty() { super("From the Vault: Twenty", "V13", ExpansionSet.buildDate(2013, 8, 23), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Akroma's Vengeance", 11, Rarity.MYTHIC, mage.cards.a.AkromasVengeance.class)); cards.add(new SetCardInfo("Chainer's Edict", 10, Rarity.MYTHIC, mage.cards.c.ChainersEdict.class)); cards.add(new SetCardInfo("Chameleon Colossus", 16, Rarity.MYTHIC, mage.cards.c.ChameleonColossus.class)); diff --git a/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java b/Mage.Sets/src/mage/sets/GlobalSeriesJiangYangguAndMuYanling.java similarity index 93% rename from Mage.Sets/src/mage/sets/JiangYangguMuYanling.java rename to Mage.Sets/src/mage/sets/GlobalSeriesJiangYangguAndMuYanling.java index 1121e75f8c..c63ec1e93f 100644 --- a/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java +++ b/Mage.Sets/src/mage/sets/GlobalSeriesJiangYangguAndMuYanling.java @@ -5,21 +5,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author TheElk801 */ -public final class JiangYangguMuYanling extends ExpansionSet { +public final class GlobalSeriesJiangYangguAndMuYanling extends ExpansionSet { - private static final JiangYangguMuYanling instance = new JiangYangguMuYanling(); + private static final GlobalSeriesJiangYangguAndMuYanling instance = new GlobalSeriesJiangYangguAndMuYanling(); - public static JiangYangguMuYanling getInstance() { + public static GlobalSeriesJiangYangguAndMuYanling getInstance() { return instance; } - private JiangYangguMuYanling() { + private GlobalSeriesJiangYangguAndMuYanling() { super("Global Series: Jiang Yanggu & Mu Yanling", "GS1", ExpansionSet.buildDate(2018, 6, 22), SetType.SUPPLEMENTAL_STANDARD_LEGAL); this.blockName = "Global Series"; this.hasBasicLands = true; + cards.add(new SetCardInfo("Aggressive Instinct", 34, Rarity.COMMON, mage.cards.a.AggressiveInstinct.class)); cards.add(new SetCardInfo("Ancestor Dragon", 12, Rarity.RARE, mage.cards.a.AncestorDragon.class)); cards.add(new SetCardInfo("Armored Whirl Turtle", 7, Rarity.COMMON, mage.cards.a.ArmoredWhirlTurtle.class)); diff --git a/Mage.Sets/src/mage/sets/GrandPrix.java b/Mage.Sets/src/mage/sets/GrandPrixPromos.java similarity index 92% rename from Mage.Sets/src/mage/sets/GrandPrix.java rename to Mage.Sets/src/mage/sets/GrandPrixPromos.java index f92b14e39e..3ac1343093 100644 --- a/Mage.Sets/src/mage/sets/GrandPrix.java +++ b/Mage.Sets/src/mage/sets/GrandPrixPromos.java @@ -6,18 +6,17 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class GrandPrix extends ExpansionSet { +public final class GrandPrixPromos extends ExpansionSet { - private static final GrandPrix instance = new GrandPrix(); + private static final GrandPrixPromos instance = new GrandPrixPromos(); - public static GrandPrix getInstance() { + public static GrandPrixPromos getInstance() { return instance; } - private GrandPrix() { + private GrandPrixPromos() { super("Grand Prix Promos", "GPX", ExpansionSet.buildDate(2011, 6, 17), SetType.PROMOTIONAL); this.hasBoosters = false; this.hasBasicLands = false; diff --git a/Mage.Sets/src/mage/sets/HasconPromo2017.java b/Mage.Sets/src/mage/sets/HasconPromo2017.java index d31b579ef8..33f6937315 100644 --- a/Mage.Sets/src/mage/sets/HasconPromo2017.java +++ b/Mage.Sets/src/mage/sets/HasconPromo2017.java @@ -9,15 +9,15 @@ import mage.constants.SetType; * * @author Saga */ -public final class HasconPromo2017 extends ExpansionSet { +public final class HASCONPromo2017 extends ExpansionSet { - private static final HasconPromo2017 instance = new HasconPromo2017(); + private static final HASCONPromo2017 instance = new HASCONPromo2017(); - public static HasconPromo2017 getInstance() { + public static HASCONPromo2017 getInstance() { return instance; } - private HasconPromo2017() { + private HASCONPromo2017() { super("HASCON Promo 2017", "H17", ExpansionSet.buildDate(2017, 9, 8), SetType.JOKESET); cards.add(new ExpansionSet.SetCardInfo("Grimlock, Dinobot Leader", "1a", Rarity.MYTHIC, mage.cards.g.GrimlockDinobotLeader.class)); cards.add(new ExpansionSet.SetCardInfo("Grimlock, Ferocious King", "1b", Rarity.MYTHIC, mage.cards.g.GrimlockFerociousKing.class)); diff --git a/Mage.Sets/src/mage/sets/Planechase2012.java b/Mage.Sets/src/mage/sets/Planechase2012Edition.java similarity index 98% rename from Mage.Sets/src/mage/sets/Planechase2012.java rename to Mage.Sets/src/mage/sets/Planechase2012Edition.java index 70ea2b24fa..3b456a8d7f 100644 --- a/Mage.Sets/src/mage/sets/Planechase2012.java +++ b/Mage.Sets/src/mage/sets/Planechase2012Edition.java @@ -5,20 +5,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author LevelX2 */ -public final class Planechase2012 extends ExpansionSet { +public final class Planechase2012Edition extends ExpansionSet { - private static final Planechase2012 instance = new Planechase2012(); + private static final Planechase2012Edition instance = new Planechase2012Edition(); - public static Planechase2012 getInstance() { + public static Planechase2012Edition getInstance() { return instance; } - private Planechase2012() { + private Planechase2012Edition() { super("Planechase 2012 Edition", "PC2", ExpansionSet.buildDate(2012, 6, 1), SetType.SUPPLEMENTAL); this.blockName = "Command Zone"; + cards.add(new SetCardInfo("Arc Trail", 39, Rarity.UNCOMMON, mage.cards.a.ArcTrail.class)); cards.add(new SetCardInfo("Armillary Sphere", 108, Rarity.COMMON, mage.cards.a.ArmillarySphere.class)); cards.add(new SetCardInfo("Armored Griffin", 1, Rarity.UNCOMMON, mage.cards.a.ArmoredGriffin.class)); diff --git a/Mage.Sets/src/mage/sets/PDSFireAndLightning.java b/Mage.Sets/src/mage/sets/PremiumDeckSeriesFireAndLightning.java similarity index 93% rename from Mage.Sets/src/mage/sets/PDSFireAndLightning.java rename to Mage.Sets/src/mage/sets/PremiumDeckSeriesFireAndLightning.java index bd31a6d69f..59ae252c74 100644 --- a/Mage.Sets/src/mage/sets/PDSFireAndLightning.java +++ b/Mage.Sets/src/mage/sets/PremiumDeckSeriesFireAndLightning.java @@ -6,21 +6,21 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class PDSFireAndLightning extends ExpansionSet { +public final class PremiumDeckSeriesFireAndLightning extends ExpansionSet { - private static final PDSFireAndLightning instance = new PDSFireAndLightning(); + private static final PremiumDeckSeriesFireAndLightning instance = new PremiumDeckSeriesFireAndLightning(); - public static PDSFireAndLightning getInstance() { + public static PremiumDeckSeriesFireAndLightning getInstance() { return instance; } - private PDSFireAndLightning() { + private PremiumDeckSeriesFireAndLightning() { super("Premium Deck Series: Fire and Lightning", "PD2", ExpansionSet.buildDate(2010, 11, 1), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Ball Lightning", 12, Rarity.RARE, mage.cards.b.BallLightning.class)); cards.add(new SetCardInfo("Barbarian Ring", 28, Rarity.UNCOMMON, mage.cards.b.BarbarianRing.class)); cards.add(new SetCardInfo("Boggart Ram-Gang", 13, Rarity.UNCOMMON, mage.cards.b.BoggartRamGang.class)); diff --git a/Mage.Sets/src/mage/sets/PDSGraveborn.java b/Mage.Sets/src/mage/sets/PremiumDeckSeriesGraveborn.java similarity index 92% rename from Mage.Sets/src/mage/sets/PDSGraveborn.java rename to Mage.Sets/src/mage/sets/PremiumDeckSeriesGraveborn.java index d3295c8897..0cd7b2d1d9 100644 --- a/Mage.Sets/src/mage/sets/PDSGraveborn.java +++ b/Mage.Sets/src/mage/sets/PremiumDeckSeriesGraveborn.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class PDSGraveborn extends ExpansionSet { +public final class PremiumDeckSeriesGraveborn extends ExpansionSet { - private static final PDSGraveborn instance = new PDSGraveborn(); + private static final PremiumDeckSeriesGraveborn instance = new PremiumDeckSeriesGraveborn(); - public static PDSGraveborn getInstance() { + public static PremiumDeckSeriesGraveborn getInstance() { return instance; } - private PDSGraveborn() { + private PremiumDeckSeriesGraveborn() { super("Premium Deck Series: Graveborn", "PD3", ExpansionSet.buildDate(2011, 11, 1), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Animate Dead", 16, Rarity.UNCOMMON, mage.cards.a.AnimateDead.class)); cards.add(new SetCardInfo("Avatar of Woe", 6, Rarity.RARE, mage.cards.a.AvatarOfWoe.class)); cards.add(new SetCardInfo("Blazing Archon", 11, Rarity.RARE, mage.cards.b.BlazingArchon.class)); diff --git a/Mage.Sets/src/mage/sets/PDSSlivers.java b/Mage.Sets/src/mage/sets/PremiumDeckSeriesSlivers.java similarity index 94% rename from Mage.Sets/src/mage/sets/PDSSlivers.java rename to Mage.Sets/src/mage/sets/PremiumDeckSeriesSlivers.java index 62f6d53f18..9a0b0aa8ac 100644 --- a/Mage.Sets/src/mage/sets/PDSSlivers.java +++ b/Mage.Sets/src/mage/sets/PremiumDeckSeriesSlivers.java @@ -6,20 +6,20 @@ import mage.constants.Rarity; import mage.constants.SetType; /** - * * @author fireshoes */ -public final class PDSSlivers extends ExpansionSet { +public final class PremiumDeckSeriesSlivers extends ExpansionSet { - private static final PDSSlivers instance = new PDSSlivers(); + private static final PremiumDeckSeriesSlivers instance = new PremiumDeckSeriesSlivers(); - public static PDSSlivers getInstance() { + public static PremiumDeckSeriesSlivers getInstance() { return instance; } - private PDSSlivers() { + private PremiumDeckSeriesSlivers() { super("Premium Deck Series: Slivers", "H09", ExpansionSet.buildDate(2009, 11, 1), SetType.SUPPLEMENTAL); this.hasBasicLands = false; + cards.add(new SetCardInfo("Acidic Sliver", 13, Rarity.UNCOMMON, mage.cards.a.AcidicSliver.class)); cards.add(new SetCardInfo("Amoeboid Changeling", 3, Rarity.COMMON, mage.cards.a.AmoeboidChangeling.class)); cards.add(new SetCardInfo("Ancient Ziggurat", 31, Rarity.UNCOMMON, mage.cards.a.AncientZiggurat.class)); From d3d880cdc9de3c4907387c678d3c4c51ffa306d8 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 16:52:45 +0400 Subject: [PATCH 13/17] Refactor: fixed wrong set's class names --- .../src/mage/sets/{HasconPromo2017.java => HASCONPromo2017.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Mage.Sets/src/mage/sets/{HasconPromo2017.java => HASCONPromo2017.java} (100%) diff --git a/Mage.Sets/src/mage/sets/HasconPromo2017.java b/Mage.Sets/src/mage/sets/HASCONPromo2017.java similarity index 100% rename from Mage.Sets/src/mage/sets/HasconPromo2017.java rename to Mage.Sets/src/mage/sets/HASCONPromo2017.java From caa526c0b8bd1cea2138a63850fcbe0855e25bba Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 17:20:43 +0400 Subject: [PATCH 14/17] Refactor: known-sets updates after class renames; --- Utils/known-sets.txt | 96 ++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 91756f8ea8..ad1a34fa35 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -20,12 +20,12 @@ Chronicles|Chronicles| Clash Pack|ClashPack| Classic Sixth Edition|ClassicSixthEdition| Coldsnap|Coldsnap| -Commander 2013 Edition|Commander2013| -Commander 2014 Edition|Commander2014| -Commander 2015 Edition|Commander2015| -Commander 2016 Edition|Commander2016| -Commander 2017 Edition|Commander2017| -Commander 2018|Commander2018| +Commander 2013 Edition|Commander2013Edition| +Commander 2014 Edition|Commander2014Edition| +Commander 2015 Edition|Commander2015Edition| +Commander 2016 Edition|Commander2016Edition| +Commander 2017 Edition|Commander2017Edition| +Commander 2018|Commander2018Edition| Commander Anthology|CommanderAnthology| Commander Anthology 2018|CommanderAnthology2018| Commander's Arsenal|CommandersArsenal| @@ -38,30 +38,30 @@ Dissension|Dissension| Dominaria|Dominaria| Dragon's Maze|DragonsMaze| Dragons of Tarkir|DragonsOfTarkir| -Duel Decks: Ajani vs. Nicol Bolas|AjaniVsNicolBolas| -Duel Decks: Anthology, Divine vs. Demonic|AnthologyDivineVsDemonic| -Duel Decks: Anthology, Elves vs. Goblins|AnthologyElvesVsGoblins| -Duel Decks: Anthology, Garruk vs. Liliana|AnthologyGarrukVsLiliana| -Duel Decks: Anthology, Jace vs. Chandra|AnthologyJaceVsChandra| -Duel Decks: Blessed vs. Cursed|BlessedVsCursed| -Duel Decks: Divine vs. Demonic|DivineVsDemonic| -Duel Decks: Elspeth vs. Kiora|ElspethVsKiora| -Duel Decks: Elspeth vs. Tezzeret|ElspethVsTezzeret| -Duel Decks: Elves vs. Goblins|ElvesVsGoblins| -Duel Decks: Garruk vs. Liliana|GarrukVsLiliana| -Duel Decks: Heroes vs. Monsters|HeroesVsMonsters| -Duel Decks: Izzet vs. Golgari|IzzetVsGolgari| -Duel Decks: Jace vs. Chandra|JaceVsChandra| -Duel Decks: Jace vs. Vraska|JaceVsVraska| -Duel Decks: Knights vs. Dragons|KnightsVsDragons| -Duel Decks: Merfolk vs. Goblins|MerfolkVsGoblins| -Duel Decks: Mind vs. Might|MindVsMight| -Duel Decks: Nissa vs. Ob Nixilis|NissaVsObNixilis| -Duel Decks: Phyrexia vs. the Coalition|PhyrexiaVsTheCoalition| -Duel Decks: Sorin vs. Tibalt|SorinVsTibalt| -Duel Decks: Speed vs. Cunning|SpeedVsCunning| -Duel Decks: Venser vs. Koth|VenserVsKoth| -Duel Decks: Zendikar vs. Eldrazi|ZendikarVsEldrazi| +Duel Decks: Ajani vs. Nicol Bolas|DuelDecksAjaniVsNicolBolas| +Duel Decks: Anthology, Divine vs. Demonic|DuelDecksAnthologyDivineVsDemonic| +Duel Decks: Anthology, Elves vs. Goblins|DuelDecksAnthologyElvesVsGoblins| +Duel Decks: Anthology, Garruk vs. Liliana|DuelDecksAnthologyGarrukVsLiliana| +Duel Decks: Anthology, Jace vs. Chandra|DuelDecksAnthologyJaceVsChandra| +Duel Decks: Blessed vs. Cursed|DuelDecksBlessedVsCursed| +Duel Decks: Divine vs. Demonic|DuelDecksDivineVsDemonic| +Duel Decks: Elspeth vs. Kiora|DuelDecksElspethVsKiora| +Duel Decks: Elspeth vs. Tezzeret|DuelDecksElspethVsTezzeret| +Duel Decks: Elves vs. Goblins|DuelDecksElvesVsGoblins| +Duel Decks: Garruk vs. Liliana|DuelDecksGarrukVsLiliana| +Duel Decks: Heroes vs. Monsters|DuelDecksHeroesVsMonsters| +Duel Decks: Izzet vs. Golgari|DuelDecksIzzetVsGolgari| +Duel Decks: Jace vs. Chandra|DuelDecksJaceVsChandra| +Duel Decks: Jace vs. Vraska|DuelDecksJaceVsVraska| +Duel Decks: Knights vs. Dragons|DuelDecksKnightsVsDragons| +Duel Decks: Merfolk vs. Goblins|DuelDecksMerfolkVsGoblins| +Duel Decks: Mind vs. Might|DuelDecksMindVsMight| +Duel Decks: Nissa vs. Ob Nixilis|DuelDecksNissaVsObNixilis| +Duel Decks: Phyrexia vs. the Coalition|DuelDecksPhyrexiaVsTheCoalition| +Duel Decks: Sorin vs. Tibalt|DuelDecksSorinVsTibalt| +Duel Decks: Speed vs. Cunning|DuelDecksSpeedVsCunning| +Duel Decks: Venser vs. Koth|DuelDecksVenserVsKoth| +Duel Decks: Zendikar vs. Eldrazi|DuelDecksZendikarVsEldrazi| Duels of the Planeswalkers|DuelsOfThePlaneswalkers| Eighth Edition|EighthEdition| Eldritch Moon|EldritchMoon| @@ -76,26 +76,26 @@ Fifth Dawn|FifthDawn| Fifth Edition|FifthEdition| Fourth Edition|FourthEdition| Friday Night Magic|FridayNightMagic| -From the Vault: Angels|FTVAngels| -From the Vault: Annihilation|FTVAnnihilation| -From the Vault: Dragons|FTVDragons| -From the Vault: Exiled|FTVExiled| -From the Vault: Legends|FTVLegends| -From the Vault: Lore|FTVLore| -From the Vault: Realms|FTVRealms| -From the Vault: Relics|FTVRelics| -From the Vault: Transform|FTVTransform| -From the Vault: Twenty|FTVTwenty| +From the Vault: Angels|FromTheVaultAngels| +From the Vault: Annihilation|FromTheVaultAnnihilation| +From the Vault: Dragons|FromTheVaultDragons| +From the Vault: Exiled|FromTheVaultExiled| +From the Vault: Legends|FromTheVaultLegends| +From the Vault: Lore|FromTheVaultLore| +From the Vault: Realms|FromTheVaultRealms| +From the Vault: Relics|FromTheVaultRelics| +From the Vault: Transform|FromTheVaultTransform| +From the Vault: Twenty|FromTheVaultTwenty| Future Sight|FutureSight| Game Day|GameDay| Gatecrash|Gatecrash| -Global Series: Jiang Yanggu & Mu Yanling|JiangYangguMuYanling| -Grand Prix|GrandPrix| +Global Series: Jiang Yanggu & Mu Yanling|GlobalSeriesJiangYangguAndMuYanling| +Grand Prix|GrandPrixPromos| Guildpact|Guildpact| Guilds of Ravnica|GuildsOfRavnica| Guru|Guru| Happy Holidays|HappyHolidays| -HASCON Promo 2017|HasconPromo2017| +HASCON Promo 2017|HASCONPromo2017| Heroes of the Realm|HeroesOfTheRealm| Homelands|Homelands| Hour of Devastation|HourOfDevastation| @@ -149,15 +149,15 @@ Odyssey|Odyssey| Onslaught|Onslaught| Planar Chaos|PlanarChaos| Planechase|Planechase| -Planechase 2012 Edition|Planechase2012| +Planechase 2012 Edition|Planechase2012Edition| Planechase Anthology|PlanechaseAnthology| Planeshift|Planeshift| Portal|Portal| Portal Second Age|PortalSecondAge| Portal Three Kingdoms|PortalThreeKingdoms| -Premium Deck Series: Graveborn|PDSGraveborn| -Premium Deck Series: Fire and Lightning|PDSFireAndLightning| -Premium Deck Series: Slivers|PDSSlivers| +Premium Deck Series: Graveborn|PremiumDeckSeriesGraveborn| +Premium Deck Series: Fire and Lightning|PremiumDeckSeriesFireAndLightning| +Premium Deck Series: Slivers|PremiumDeckSeriesSlivers| Prerelease Events|PrereleaseEvents| Prophecy|Prophecy| Ravnica: City of Guilds|RavnicaCityOfGuilds| @@ -202,4 +202,4 @@ World Magic Cup Qualifier|WorldMagicCupQualifier| Worldwake|Worldwake| WPN Gateway|WPNGateway| Zendikar|Zendikar| -Zendikar Expeditions|ZendikarExpeditions| +Zendikar Expeditions|ZendikarExpeditions| \ No newline at end of file From 38afd401e8df686ef0cb696b32c99db3ada64d8b Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 17:31:54 +0400 Subject: [PATCH 15/17] Refactor: mtg-sets-data updates after set name fixes, add missing sets; --- Utils/mtg-sets-data.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index dde1ea9b8c..549f7a214a 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -37,8 +37,10 @@ Champions of Kamigawa|CHK| Chronicles|CHR| Clash Pack|CLASH| Commander Anthology|CMA| -Commander Anthology 2018|CM2| +Commander Anthology Volume II|CM2| Commander's Arsenal|CM1| +Commander|CMD| +Conspiracy|CNS| Conspiracy: Take the Crown|CN2| Conflux|CON| Champs|CP| @@ -83,6 +85,9 @@ Eldritch Moon|EMN| European Land Program|EURO| Eventide|EVE| Duel Decks: Elves vs. Goblins|EVG| +Duel Decks: Elves vs. Inventors|DDU| +Duels of the Planeswalkers Promos|DPAP| +Pro Tour Promos|PPRO| Exodus|EXO| Zendikar Expeditions|EXP| Fallen Empires|FEM| @@ -92,7 +97,7 @@ Future Sight|FUT| Global Series: Jiang Yanggu & Mu Yanling|GS1| Guildpact|GPT| Guilds of Ravnica|GRN| -Grand Prix|GPX| +Grand Prix Promos|GPX| WPN Gateway|GRC| Gatecrash|GTC| Guru|GUR| @@ -153,7 +158,7 @@ Portal Second Age|P02| Planechase 2012 Edition|PC2| Planechase Anthology|PCA| Prophecy|PCY| -Premium Deck Series: Fire & Lightning|PD2| +Premium Deck Series: Fire and Lightning|PD2| Premium Deck Series: Graveborn|PD3| Planar Chaos|PLC| Planeshift|PLS| @@ -211,4 +216,4 @@ Worldwake|WWK| Ixalan|XLN| Zendikar|ZEN| Star Wars|SWS| -Happy Holidays|HHO| +Happy Holidays|HHO| \ No newline at end of file From 595d7f36b69ae034526daf2ab25dae7f744478b7 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 30 Sep 2018 18:45:25 +0400 Subject: [PATCH 16/17] Refactor: mtg-sets-data must contain real set name for scripts, not xmage; --- Utils/mtg-sets-data.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 549f7a214a..797a5ba772 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -37,7 +37,7 @@ Champions of Kamigawa|CHK| Chronicles|CHR| Clash Pack|CLASH| Commander Anthology|CMA| -Commander Anthology Volume II|CM2| +Commander Anthology 2018|CM2| Commander's Arsenal|CM1| Commander|CMD| Conspiracy|CNS| @@ -97,7 +97,7 @@ Future Sight|FUT| Global Series: Jiang Yanggu & Mu Yanling|GS1| Guildpact|GPT| Guilds of Ravnica|GRN| -Grand Prix Promos|GPX| +Grand Prix|GPX| WPN Gateway|GRC| Gatecrash|GTC| Guru|GUR| From ba3b2434936c434296ea6945eb50b99832fe26fe Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 30 Sep 2018 18:36:54 +0000 Subject: [PATCH 17/17] Jumbo Imp typo fix --- Mage.Sets/src/mage/cards/j/JumboImp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/j/JumboImp.java b/Mage.Sets/src/mage/cards/j/JumboImp.java index 866ac3ed12..027d8f9512 100644 --- a/Mage.Sets/src/mage/cards/j/JumboImp.java +++ b/Mage.Sets/src/mage/cards/j/JumboImp.java @@ -78,7 +78,7 @@ class JumboImpEffect extends EntersBattlefieldWithXCountersEffect { Permanent permanent = game.getPermanentEntering(source.getSourceId()); if (controller != null && permanent != null) { int amount = controller.rollDice(game, 6); - ArrayList appliedEffects = (ArrayList) this.getValue("appldiedEffects"); // the basic event is the EntersBattlefieldEvent, so use already applied replacement effects from that event + ArrayList appliedEffects = (ArrayList) this.getValue("appliedEffects"); // the basic event is the EntersBattlefieldEvent, so use already applied replacement effects from that event permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game, appliedEffects); return super.apply(game, source); }