From e7301e2c08c07c382fdd7ceb1f4045a571b1fa1b Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 20:36:25 +0100 Subject: [PATCH 01/77] Implemented banding (#41) --- .../src/main/java/mage/client/cards/Card.java | 1 + .../plugins/adapters/MageActionCallback.java | 3 + .../mage/client/util/gui/ArrowBuilder.java | 2 +- .../java/mage/client/util/gui/ArrowUtil.java | 17 ++ .../src/main/java/mage/view/CardView.java | 10 + .../src/mage/cards/b/BalduvianWarlord.java | 2 +- .../src/mage/cards/c/CurtainOfLight.java | 2 +- .../src/mage/cards/d/DazzlingBeauty.java | 2 +- Mage.Sets/src/mage/cards/f/FalseOrders.java | 2 +- .../src/mage/cards/g/GeneralJarkeld.java | 88 ++++--- .../src/mage/cards/i/IcatianInfantry.java | 75 ++++++ Mage.Sets/src/mage/cards/i/Imprison.java | 2 +- Mage.Sets/src/mage/cards/s/SorrowsPath.java | 6 +- Mage.Sets/src/mage/cards/t/TrapRunner.java | 2 +- Mage.Sets/src/mage/cards/y/YdwenEfreet.java | 2 +- Mage.Sets/src/mage/sets/FallenEmpires.java | 5 + .../abilities/keyword/BandingAbility.java | 65 +++++ .../AttackingSameNotBandedPredicate,java | 59 +++++ Mage/src/main/java/mage/game/GameImpl.java | 23 +- .../main/java/mage/game/combat/Combat.java | 230 +++++++++++++++--- .../java/mage/game/combat/CombatGroup.java | 156 +++++++++--- .../java/mage/game/permanent/Permanent.java | 8 + .../mage/game/permanent/PermanentImpl.java | 74 ++++-- .../main/java/mage/players/PlayerImpl.java | 8 + 24 files changed, 708 insertions(+), 136 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/i/IcatianInfantry.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/BandingAbility.java create mode 100644 Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java diff --git a/Mage.Client/src/main/java/mage/client/cards/Card.java b/Mage.Client/src/main/java/mage/client/cards/Card.java index cb90ad56f40..fa838cf83ea 100644 --- a/Mage.Client/src/main/java/mage/client/cards/Card.java +++ b/Mage.Client/src/main/java/mage/client/cards/Card.java @@ -423,6 +423,7 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis tooltipShowing = false; ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.TARGET); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.PAIRED); + ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.BANDED); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.SOURCE); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.ENCHANT_PLAYERS); } diff --git a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java index 84ab9c0b428..8c6e8538596 100644 --- a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java +++ b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java @@ -379,6 +379,7 @@ public class MageActionCallback implements ActionCallback { ArrowUtil.drawArrowsForTargets(data, parentPoint); ArrowUtil.drawArrowsForSource(data, parentPoint); ArrowUtil.drawArrowsForPairedCards(data, parentPoint); + ArrowUtil.drawArrowsForBandedCards(data, parentPoint); ArrowUtil.drawArrowsForEnchantPlayers(data, parentPoint); tooltipCard = data.card; showTooltipPopup(data, parentComponent, parentPoint); @@ -441,6 +442,7 @@ public class MageActionCallback implements ActionCallback { public void hideGameUpdate(UUID gameId) { ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.TARGET); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.PAIRED); + ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.BANDED); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.SOURCE); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.ENCHANT_PLAYERS); } @@ -452,6 +454,7 @@ public class MageActionCallback implements ActionCallback { if (gameId != null) { ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.TARGET); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.PAIRED); + ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.BANDED); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.SOURCE); ArrowBuilder.getBuilder().removeArrowsByType(gameId, ArrowBuilder.Type.ENCHANT_PLAYERS); } diff --git a/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java b/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java index bbf132215e1..1c19bd5eca0 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/ArrowBuilder.java @@ -38,7 +38,7 @@ public class ArrowBuilder { private int currentHeight; public enum Type { - PAIRED, SOURCE, TARGET, COMBAT, ENCHANT_PLAYERS + PAIRED, BANDED, SOURCE, TARGET, COMBAT, ENCHANT_PLAYERS } /** diff --git a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java index 4ae006b7d4a..ae9d28ea134 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java @@ -34,6 +34,23 @@ public final class ArrowUtil { } } + public static void drawArrowsForBandedCards(TransferData data, Point parentPoint) { + if (data.card.getBandedCards() != null && !data.card.getBandedCards().isEmpty()) { + Point me = new Point(data.locationOnScreen); + me.translate(-parentPoint.x, -parentPoint.y); + for (PlayAreaPanel pa : MageFrame.getGame(data.gameId).getPlayers().values()) { + for (UUID uuid : data.card.getBandedCards()) { + MagePermanent permanent = pa.getBattlefieldPanel().getPermanents().get(uuid); + if (permanent != null) { + Point target = permanent.getLocationOnScreen(); + target.translate(-parentPoint.x, -parentPoint.y); + ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 35, (int) me.getY(), (int) target.getX() + 40, (int) target.getY() + 10, Color.yellow, ArrowBuilder.Type.BANDED); + } + } + } + } + } + public static void drawArrowsForEnchantPlayers(TransferData data, Point parentPoint) { if (data.gameId != null && MageFrame.getGame(data.gameId) != null) { for (PlayAreaPanel pa : MageFrame.getGame(data.gameId).getPlayers().values()) { diff --git a/Mage.Common/src/main/java/mage/view/CardView.java b/Mage.Common/src/main/java/mage/view/CardView.java index 3d56ae7d26d..a0647757a76 100644 --- a/Mage.Common/src/main/java/mage/view/CardView.java +++ b/Mage.Common/src/main/java/mage/view/CardView.java @@ -113,6 +113,7 @@ public class CardView extends SimpleCardView { protected List targets; protected UUID pairedCard; + protected List bandedCards; protected boolean paid; protected List counters; @@ -202,6 +203,7 @@ public class CardView extends SimpleCardView { this.targets = null; this.pairedCard = cardView.pairedCard; + this.bandedCards = null; this.paid = cardView.paid; this.counters = null; @@ -353,6 +355,10 @@ public class CardView extends SimpleCardView { if (permanent.getCounters(game) != null && !permanent.getCounters(game).isEmpty()) { this.loyalty = Integer.toString(permanent.getCounters(game).getCount(CounterType.LOYALTY)); this.pairedCard = permanent.getPairedCard() != null ? permanent.getPairedCard().getSourceId() : null; + this.bandedCards = new ArrayList<>(); + for (UUID bandedCard : permanent.getBandedCards()) { + bandedCards.add(bandedCard); + } counters = new ArrayList<>(); for (Counter counter : permanent.getCounters(game).values()) { counters.add(new CounterView(counter)); @@ -885,6 +891,10 @@ public class CardView extends SimpleCardView { return pairedCard; } + public List getBandedCards() { + return bandedCards; + } + public int getType() { return type; } diff --git a/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java b/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java index 7620a427d2c..196e0544663 100644 --- a/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java +++ b/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java @@ -121,7 +121,7 @@ class BalduvianWarlordUnblockEffect extends OneShotEffect { if (combatGroups != null) { for (CombatGroup combatGroup : combatGroups) { if (combatGroup != null) { - combatGroup.setBlocked(false); + combatGroup.setBlocked(false, game); } } } diff --git a/Mage.Sets/src/mage/cards/c/CurtainOfLight.java b/Mage.Sets/src/mage/cards/c/CurtainOfLight.java index bc3bcacfe8a..9098accfc39 100644 --- a/Mage.Sets/src/mage/cards/c/CurtainOfLight.java +++ b/Mage.Sets/src/mage/cards/c/CurtainOfLight.java @@ -108,7 +108,7 @@ class CurtainOfLightEffect extends OneShotEffect { if (controller != null && permanent != null) { CombatGroup combatGroup = game.getCombat().findGroup(permanent.getId()); if (combatGroup != null) { - combatGroup.setBlocked(true); + combatGroup.setBlocked(true, game); game.informPlayers(permanent.getLogName() + " has become blocked"); return true; } diff --git a/Mage.Sets/src/mage/cards/d/DazzlingBeauty.java b/Mage.Sets/src/mage/cards/d/DazzlingBeauty.java index 0c82a483f8e..8f69a06346a 100644 --- a/Mage.Sets/src/mage/cards/d/DazzlingBeauty.java +++ b/Mage.Sets/src/mage/cards/d/DazzlingBeauty.java @@ -109,7 +109,7 @@ class DazzlingBeautyEffect extends OneShotEffect { if (controller != null && permanent != null) { CombatGroup combatGroup = game.getCombat().findGroup(permanent.getId()); if (combatGroup != null) { - combatGroup.setBlocked(true); + combatGroup.setBlocked(true, game); game.informPlayers(permanent.getLogName() + " has become blocked"); return true; } diff --git a/Mage.Sets/src/mage/cards/f/FalseOrders.java b/Mage.Sets/src/mage/cards/f/FalseOrders.java index 39c6091ffb4..8d35c683fa5 100644 --- a/Mage.Sets/src/mage/cards/f/FalseOrders.java +++ b/Mage.Sets/src/mage/cards/f/FalseOrders.java @@ -134,7 +134,7 @@ class FalseOrdersUnblockEffect extends OneShotEffect { if (combatGroups != null) { for (CombatGroup combatGroup : combatGroups) { if (combatGroup != null) { - combatGroup.setBlocked(false); + combatGroup.setBlocked(false, game); } } } diff --git a/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java b/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java index 319a619cf8d..703c8bb537e 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java +++ b/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java @@ -113,22 +113,36 @@ class GeneralJarkeldSwitchBlockersEffect extends OneShotEffect { Set blockers2 = new HashSet<>(); Set multiBlockers = new HashSet<>(); + blockerSearch1: for (UUID blockerId : chosenGroup1.getBlockers()) { Permanent blocker = game.getPermanent(blockerId); if (blocker != null) { - if (blocker.getBlocking() > 1) { - multiBlockers.add(blocker); + if (game.getCombat().blockingGroupsContains(blocker.getId())) { // if (blocker.getBlocking() > 1) { + for (CombatGroup group : game.getCombat().getBlockingGroups()) { + if (group.getAttackers().size() > 1) { + multiBlockers.add(blocker); + continue blockerSearch1; + } + } + blockers1.add(blocker); // this should not happen } else { blockers1.add(blocker); } } } + blockerSearch2: for (UUID blockerId : chosenGroup2.getBlockers()) { Permanent blocker = game.getPermanent(blockerId); if (blocker != null) { - if (blocker.getBlocking() > 1) { - multiBlockers.add(blocker); + if (game.getCombat().blockingGroupsContains(blocker.getId())) { // if (blocker.getBlocking() > 1) { + for (CombatGroup group : game.getCombat().getBlockingGroups()) { + if (group.getAttackers().size() > 1) { + multiBlockers.add(blocker); + continue blockerSearch2; + } + } + blockers2.add(blocker); // this should not happen } else { blockers2.add(blocker); } @@ -141,11 +155,11 @@ class GeneralJarkeldSwitchBlockersEffect extends OneShotEffect { // the ability doesn't unblock a group that loses all blockers, however it will newly block a previously unblocked group if it gains a blocker this way if (!(chosenGroup1.getBlockers().isEmpty())) { - chosenGroup1.setBlocked(true); + chosenGroup1.setBlocked(true, game); chosenGroup1.pickBlockerOrder(attacker1.getControllerId(), game); } if (!(chosenGroup2.getBlockers().isEmpty())) { - chosenGroup2.setBlocked(true); + chosenGroup2.setBlocked(true, game); chosenGroup2.pickBlockerOrder(attacker2.getControllerId(), game); } return true; @@ -168,42 +182,40 @@ class GeneralJarkeldSwitchBlockersEffect extends OneShotEffect { // for handling multi-blockers (Two Headed Giant of Foriys, etc.) blockerIteration: for (Permanent blocker : blockers) { - if (blocker.getBlocking() > 1) { - CombatGroup blockGroup = null; - for (CombatGroup group : game.getCombat().getBlockingGroups()) { - if (group.getBlockers().contains(blocker.getId())) { - blockGroup = group; - break; + CombatGroup blockGroup = null; + for (CombatGroup group : game.getCombat().getBlockingGroups()) { + if (group.getBlockers().contains(blocker.getId())) { + blockGroup = group; + break; + } + } + if (blockGroup != null) { + CombatGroup chosenGroup = null; + boolean sameBlocked = false; + for (CombatGroup group : game.getCombat().getGroups()) { + if (group.getBlocked() && group.getBlockers().contains(blocker.getId())) { + if (group == chosenGroup1 || group == chosenGroup2) { + if (sameBlocked) { + continue blockerIteration; + } + sameBlocked = true; + chosenGroup = group; + } } } - if (blockGroup != null) { - CombatGroup chosenGroup = null; - boolean sameBlocked = false; - for (CombatGroup group : game.getCombat().getGroups()) { - if (group.getBlocked() && group.getBlockers().contains(blocker.getId())) { - if (group == chosenGroup1 || group == chosenGroup2) { - if (sameBlocked) { - continue blockerIteration; - } - sameBlocked = true; - chosenGroup = group; - } - } + + if (sameBlocked && chosenGroup != null) { // if none (should not happen) or all the blockers correspond to Jarkeld's targets, the blockers remain the same + CombatGroup otherGroup = (chosenGroup.equals(chosenGroup1) ? chosenGroup2 : chosenGroup1); + chosenGroup.remove(blocker.getId()); + for (UUID attacker : chosenGroup.getAttackers()) { + blockGroup.remove(attacker); } - - if (sameBlocked && chosenGroup != null) { // if none (should not happen) or all the blockers correspond to Jarkeld's targets, the blockers remain the same - CombatGroup otherGroup = (chosenGroup.equals(chosenGroup1) ? chosenGroup2 : chosenGroup1); - chosenGroup.remove(blocker.getId()); - for (UUID attacker : chosenGroup.getAttackers()) { - blockGroup.remove(attacker); - } - otherGroup.addBlockerToGroup(blocker.getId(), controller.getId(), game); - for (UUID attacker : otherGroup.getAttackers()) { - // 10/4/2004 The new blocker does not trigger any abilities which trigger on creatures becoming blockers, because the creatures were already blockers and the simple change of who is blocking does not trigger such abilities. - game.getCombat().addBlockingGroup(blocker.getId(), attacker, controller.getId(), game); - } - blockGroup.pickAttackerOrder(blocker.getControllerId(), game); + otherGroup.addBlockerToGroup(blocker.getId(), controller.getId(), game); + for (UUID attacker : otherGroup.getAttackers()) { + // 10/4/2004 The new blocker does not trigger any abilities which trigger on creatures becoming blockers, because the creatures were already blockers and the simple change of who is blocking does not trigger such abilities. + game.getCombat().addBlockingGroup(blocker.getId(), attacker, controller.getId(), game); } + blockGroup.pickAttackerOrder(blocker.getControllerId(), game); } } } diff --git a/Mage.Sets/src/mage/cards/i/IcatianInfantry.java b/Mage.Sets/src/mage/cards/i/IcatianInfantry.java new file mode 100644 index 00000000000..db3edeb5445 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IcatianInfantry.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author L_J + */ +public class IcatianInfantry extends CardImpl { + + public IcatianInfantry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}: Icatian Infantry gains first strike until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}"))); + + // {1}: Icatian Infantry gains banding until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(BandingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}"))); + } + + public IcatianInfantry(final IcatianInfantry card) { + super(card); + } + + @Override + public IcatianInfantry copy() { + return new IcatianInfantry(this); + } + +} diff --git a/Mage.Sets/src/mage/cards/i/Imprison.java b/Mage.Sets/src/mage/cards/i/Imprison.java index d59d602fbdd..9b3f47f44a5 100644 --- a/Mage.Sets/src/mage/cards/i/Imprison.java +++ b/Mage.Sets/src/mage/cards/i/Imprison.java @@ -177,7 +177,7 @@ class ImprisonUnblockEffect extends OneShotEffect { if (combatGroups != null) { for (CombatGroup combatGroup : combatGroups) { if (combatGroup != null) { - combatGroup.setBlocked(false); + combatGroup.setBlocked(false, game); } } } diff --git a/Mage.Sets/src/mage/cards/s/SorrowsPath.java b/Mage.Sets/src/mage/cards/s/SorrowsPath.java index 3c6534ae6da..4263b4efaa4 100644 --- a/Mage.Sets/src/mage/cards/s/SorrowsPath.java +++ b/Mage.Sets/src/mage/cards/s/SorrowsPath.java @@ -74,7 +74,7 @@ public class SorrowsPath extends CardImpl { this.addAbility(ability); // Whenever Sorrow's Path becomes tapped, it deals 2 damage to you and each creature you control. - Ability ability2 = new BecomesTappedSourceTriggeredAbility(new DamageControllerEffect(2 , "it")); + Ability ability2 = new BecomesTappedSourceTriggeredAbility(new DamageControllerEffect(2)); ability2.addEffect(new DamageAllEffect(2, new FilterControlledCreaturePermanent()).setText("and each creature you control")); this.addAbility(ability2); } @@ -152,7 +152,7 @@ class SorrowsPathSwitchBlockersEffect extends OneShotEffect { } private CombatGroup findBlockingGroup(Permanent blocker, Game game) { - if (blocker.getBlocking() > 1) { + if (game.getCombat().blockingGroupsContains(blocker.getId())) { // if (blocker.getBlocking() > 1) { for (CombatGroup group : game.getCombat().getBlockingGroups()) { if (group.getBlockers().contains(blocker.getId())) { return group; @@ -176,7 +176,7 @@ class SorrowsPathSwitchBlockersEffect extends OneShotEffect { } return true; } - + private void reassignBlocker(Permanent blocker, Set attackers, Game game) { for (Permanent attacker : attackers) { CombatGroup group = game.getCombat().findGroup(attacker.getId()); diff --git a/Mage.Sets/src/mage/cards/t/TrapRunner.java b/Mage.Sets/src/mage/cards/t/TrapRunner.java index 3754f1fdb21..de42811d53c 100644 --- a/Mage.Sets/src/mage/cards/t/TrapRunner.java +++ b/Mage.Sets/src/mage/cards/t/TrapRunner.java @@ -114,7 +114,7 @@ class TrapRunnerEffect extends OneShotEffect { if (controller != null && permanent != null) { CombatGroup combatGroup = game.getCombat().findGroup(permanent.getId()); if (combatGroup != null) { - combatGroup.setBlocked(true); + combatGroup.setBlocked(true, game); game.informPlayers(permanent.getLogName() + " has become blocked"); return true; } diff --git a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java index e0a2ad84df0..4f3cc681787 100644 --- a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java +++ b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java @@ -97,7 +97,7 @@ class YdwenEfreetEffect extends OneShotEffect { if (combatGroups != null) { for (CombatGroup combatGroup : combatGroups) { if (combatGroup != null) { - combatGroup.setBlocked(false); + combatGroup.setBlocked(false, game); } } } diff --git a/Mage.Sets/src/mage/sets/FallenEmpires.java b/Mage.Sets/src/mage/sets/FallenEmpires.java index fc24356ba2b..e5e1a597ba4 100644 --- a/Mage.Sets/src/mage/sets/FallenEmpires.java +++ b/Mage.Sets/src/mage/sets/FallenEmpires.java @@ -44,6 +44,7 @@ import mage.cards.h.HighTide; import mage.cards.h.Homarid; import mage.cards.h.HomaridWarrior; import mage.cards.h.HymnToTourach; +import mage.cards.i.IcatianInfantry; import mage.cards.i.IcatianJavelineers; import mage.cards.i.IcatianMoneychanger; import mage.cards.i.IcatianScout; @@ -170,6 +171,10 @@ public class FallenEmpires extends ExpansionSet { cards.add(new SetCardInfo("Hymn to Tourach", 13, Rarity.COMMON, HymnToTourach.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Hymn to Tourach", 14, Rarity.COMMON, HymnToTourach.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Hymn to Tourach", 15, Rarity.COMMON, HymnToTourach.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Icatian Infantry", 144, Rarity.COMMON, IcatianInfantry.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Icatian Infantry", 145, Rarity.COMMON, IcatianInfantry.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Icatian Infantry", 146, Rarity.COMMON, IcatianInfantry.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Icatian Infantry", 147, Rarity.COMMON, IcatianInfantry.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Icatian Javelineers", 148, Rarity.COMMON, IcatianJavelineers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Icatian Javelineers", 149, Rarity.COMMON, IcatianJavelineers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Icatian Javelineers", 150, Rarity.COMMON, IcatianJavelineers.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/abilities/keyword/BandingAbility.java b/Mage/src/main/java/mage/abilities/keyword/BandingAbility.java new file mode 100644 index 00000000000..e14b2200d11 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/BandingAbility.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.abilities.keyword; + +import java.io.ObjectStreamException; +import mage.abilities.MageSingleton; +import mage.abilities.StaticAbility; +import mage.constants.Zone; + +/** + * + * @author L_J + */ +public class BandingAbility extends StaticAbility implements MageSingleton { + + private static final BandingAbility instance = new BandingAbility(); + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static BandingAbility getInstance() { + return instance; + } + + private BandingAbility() { + super(Zone.BATTLEFIELD, null); + } + + @Override + public String getRule() { + return "banding"; + } + + @Override + public BandingAbility copy() { + return instance; + } + +} diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java b/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java new file mode 100644 index 00000000000..519d28f0645 --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java @@ -0,0 +1,59 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.filter.predicate.permanent; + +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * + * @author L_J + */ +public class AttackingSameNotBandedPredicate implements Predicate { + + private final UUID defenderId; + + public AttackingSameNotBandedPredicate(UUID defenderId) { + this.defenderId = defenderId; + } + + @Override + public boolean apply(Permanent input, Game game) { + CombatGroup combatGroup = game.getCombat().findGroup(input.getId()); + if (combatGroup != null) { + return input.isAttacking() + && input.getBandedCards().isEmpty() + && combatGroup.getDefenderId().equals(defenderId); + } + return false; + } +} diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index ae54713d0ce..28b5d422fb4 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1803,12 +1803,24 @@ public abstract class GameImpl implements Game, Serializable { Permanent paired = perm.getPairedCard().getPermanent(this); if (paired == null || !perm.getControllerId().equals(paired.getControllerId()) || paired.getPairedCard() == null) { perm.setPairedCard(null); - if (paired != null) { + if (paired != null && paired.getPairedCard() != null) { paired.setPairedCard(null); } somethingHappened = true; } } + if (perm.getBandedCards() != null && !perm.getBandedCards().isEmpty()) { + for (UUID bandedId : new ArrayList<>(perm.getBandedCards())) { + Permanent banded = getPermanent(bandedId); + if (banded == null || !perm.getControllerId().equals(banded.getControllerId()) || !banded.getBandedCards().contains(perm.getId())) { + perm.removeBandedCard(bandedId); + if (banded != null && banded.getBandedCards().contains(perm.getId())) { + banded.removeBandedCard(perm.getId()); + } + somethingHappened = true; + } + } + } } else if (perm.getPairedCard() != null) { //702.93e.: ...stops being a creature Permanent paired = perm.getPairedCard().getPermanent(this); @@ -1817,6 +1829,15 @@ public abstract class GameImpl implements Game, Serializable { paired.setPairedCard(null); } somethingHappened = true; + } else if (perm.getBandedCards() != null && !perm.getBandedCards().isEmpty()) { + perm.clearBandedCards(); + for (UUID bandedId : perm.getBandedCards()) { + Permanent banded = getPermanent(bandedId); + if (banded != null) { + banded.removeBandedCard(perm.getId()); + } + somethingHappened = true; + } } if (perm.isPlaneswalker()) { //20091005 - 704.5i diff --git a/Mage/src/main/java/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index 617a29c50cb..e40bf95aaed 100644 --- a/Mage/src/main/java/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -29,23 +29,31 @@ package mage.game.combat; import java.io.Serializable; import java.util.*; +import java.util.stream.Collectors; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.RequirementEffect; import mage.abilities.effects.RestrictionEffect; +import mage.abilities.keyword.BandingAbility; import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.special.JohanVigilanceAbility; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureForCombatBlock; import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.AttackingSameNotBandedPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; import mage.players.PlayerList; +import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetDefender; import mage.util.CardUtil; import mage.util.Copyable; @@ -116,6 +124,10 @@ public class Combat implements Serializable, Copyable { return blockingGroups.values(); } + public boolean blockingGroupsContains(UUID blockerId) { + return blockingGroups.containsKey(blockerId); + } + /** * Get all possible defender (players and plainwalkers) That does not mean * neccessarly mean that they are really attacked @@ -285,7 +297,8 @@ public class Combat implements Serializable, Copyable { attackingPermanent.tap(game); // to tap with event finally here is needed to prevent abusing of Vampire Envoy like cards } } - // This can only be used to modify the event, the ttack can't be replaced here + handleBanding(attacker, game); + // This can only be used to modify the event, the attack can't be replaced here game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.ATTACKER_DECLARED, group.defenderId, attacker, attackingPlayerId)); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ATTACKER_DECLARED, group.defenderId, attacker, attackingPlayerId)); } @@ -301,6 +314,66 @@ public class Combat implements Serializable, Copyable { } } + private void handleBanding(UUID creatureId, Game game) { + Player player = game.getPlayer(attackingPlayerId); + Permanent attacker = game.getPermanent(creatureId); + if (attacker != null && player != null) { + CombatGroup combatGroup = findGroup(attacker.getId()); + if (combatGroup != null && attacker.getAbilities().containsKey(BandingAbility.getInstance().getId()) && attacker.getBandedCards().isEmpty() && getAttackers().size() > 1) { + boolean isBanded = false; + FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("attacking creature to band with " + attacker.getLogName()); + filter.add(Predicates.not(new PermanentIdPredicate(creatureId))); + filter.add(new AttackingSameNotBandedPredicate(combatGroup.getDefenderId())); // creature that isn't already banded, and is attacking the same player or planeswalker + while (player.canRespond()) { + TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true); + target.setRequired(false); + if (!target.canChoose(attackingPlayerId, game) + || game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARING_ATTACKERS, attackingPlayerId, attackingPlayerId)) + || !player.chooseUse(Outcome.AIDontUseIt, "Do you wish to " + (isBanded ? "band " + attacker.getLogName() + " with another " : "form a band with " + attacker.getLogName() + " and an " ) + "attacking creature?", null, game)) { + break; + } + if (target.choose(Outcome.Benefit, attackingPlayerId, null, game)) { + isBanded = true; + for (UUID targetId: target.getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + if (permanent != null) { + + for (UUID bandedId : attacker.getBandedCards()) { + permanent.addBandedCard(bandedId); + Permanent banded = game.getPermanent(bandedId); + if (banded != null) { + banded.addBandedCard(targetId); + } + } + permanent.addBandedCard(creatureId); + attacker.addBandedCard(targetId); + if (!permanent.getAbilities().containsKey(BandingAbility.getInstance().getId())) { + filter.add(new AbilityPredicate(BandingAbility.class)); + } + } + } + } + } + } + if (isBanded) { + StringBuilder sb = new StringBuilder(player.getLogName()).append(" formed a band with ").append((attacker.getBandedCards().size() + 1) + " creatures: "); + sb.append(attacker.getLogName()); + int i = 0; + for (UUID id : attacker.getBandedCards()) { + i++; + sb.append(", "); + Permanent permanent = game.getPermanent(id); + if (permanent != null) { + sb.append(permanent.getLogName()); + } + } + game.informPlayers(sb.toString()); + } + } + } + } + protected void checkAttackRequirements(Player player, Game game) { //20101001 - 508.1d for (Permanent creature : player.getAvailableAttackers(game)) { @@ -1094,14 +1167,16 @@ public class Combat implements Serializable, Copyable { @SuppressWarnings("deprecation") public boolean declareAttacker(UUID creatureId, UUID defenderId, UUID playerId, Game game) { Permanent attacker = game.getPermanent(creatureId); - if (!attacker.getAbilities().containsKey(VigilanceAbility.getInstance().getId()) && !attacker.getAbilities().containsKey(JohanVigilanceAbility.getInstance().getId())) { - if (!attacker.isTapped()) { - attacker.setTapped(true); - attackersTappedByAttack.add(attacker.getId()); + if (attacker != null) { + if (!attacker.getAbilities().containsKey(VigilanceAbility.getInstance().getId()) && !attacker.getAbilities().containsKey(JohanVigilanceAbility.getInstance().getId())) { + if (!attacker.isTapped()) { + attacker.setTapped(true); + attackersTappedByAttack.add(attacker.getId()); + } + } + if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, creatureId, playerId))) { + return addAttackerToCombat(creatureId, defenderId, game); } - } - if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, creatureId, playerId))) { - return addAttackerToCombat(creatureId, defenderId, game); } return false; } @@ -1158,17 +1233,37 @@ public class Combat implements Serializable, Copyable { return true; } - // add blocking group for creatures that block more than one creature + /** + * Add blocking group for creatures that already block more than one creature + * + * @param blockerId + * @param attackerId + * @param playerId + * @param game + */ public void addBlockingGroup(UUID blockerId, UUID attackerId, UUID playerId, Game game) { + addBlockingGroup(blockerId, attackerId, playerId, game, true); + } + + /** + * Use the previous addBlockingGroup instead (solveBanding should always be true + * outside this method) + * + * @param blockerId + * @param attackerId + * @param playerId + * @param game + * @param solveBanding check whether also add creatures banded with attackerId + */ + public void addBlockingGroup(UUID blockerId, UUID attackerId, UUID playerId, Game game, boolean solveBanding) { Permanent blocker = game.getPermanent(blockerId); if (blockerId != null && blocker != null && blocker.getBlocking() > 1) { - if (!blockingGroups.containsKey(blockerId)) { + if (!blockingGroupsContains(blockerId)) { CombatGroup newGroup = new CombatGroup(playerId, false, playerId); newGroup.blockers.add(blockerId); // add all blocked attackers for (CombatGroup group : groups) { if (group.getBlockers().contains(blockerId)) { - // take into account banding for (UUID attacker : group.attackers) { newGroup.attackers.add(attacker); } @@ -1176,10 +1271,27 @@ public class Combat implements Serializable, Copyable { } blockingGroups.put(blockerId, newGroup); } else { - //TODO: handle banding blockingGroups.get(blockerId).attackers.add(attackerId); } - // "blocker.setBlocking(blocker.getBlocking() + 1)" is handled by the attacking combat group + // "blocker.setBlocking(blocker.getBlocking() + 1)" is handled by the attacking combat group (in addBlockerToGroup) + } + if (solveBanding) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null) { + for (UUID bandedId : attacker.getBandedCards()) { + if (!bandedId.equals(attackerId)) { + if (blockingGroups.get(blockerId) == null || !blockingGroups.get(blockerId).attackers.contains(bandedId)) { + Permanent banded = game.getPermanent(bandedId); + CombatGroup bandedGroup = findGroup(bandedId); + if (banded != null && bandedGroup != null) { + bandedGroup.addBlockerToGroup(blockerId, playerId, game); + addBlockingGroup(blockerId, bandedId, playerId, game, false); + blocker.setBlocking(blocker.getBlocking() - 1); // this intends to offset the blocking addition from bandedGroup.addBlockerToGroup + } + } + } + } + } } } @@ -1202,8 +1314,18 @@ public class Combat implements Serializable, Copyable { creature.setBlocking(0); creature.setRemovedFromCombat(true); for (CombatGroup group : groups) { + for (UUID attackerId : group.attackers) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null) { + attacker.removeBandedCard(creatureId); + } + } result |= group.remove(creatureId); } + for (CombatGroup blockingGroup : getBlockingGroups()) { + result |= blockingGroup.remove(creatureId); + } + creature.clearBandedCards(); blockingGroups.remove(creatureId); if (result && withInfo) { game.informPlayers(creature.getLogName() + " removed from combat"); @@ -1220,6 +1342,7 @@ public class Combat implements Serializable, Copyable { if (creature != null) { creature.setAttacking(false); creature.setBlocking(0); + creature.clearBandedCards(); } } for (UUID blocker : group.blockers) { @@ -1227,6 +1350,7 @@ public class Combat implements Serializable, Copyable { if (creature != null) { creature.setAttacking(false); creature.setBlocking(0); + creature.clearBandedCards(); } } } @@ -1391,48 +1515,80 @@ public class Combat implements Serializable, Copyable { } } + /** + * Manual player action for undoing one declared blocker + * (used for multi-blocker creatures) + * + * @param blockerId + * @param groupToUnblock + * @param game + */ public void removeBlockerGromGroup(UUID blockerId, CombatGroup groupToUnblock, Game game) { - // Manual player action for undoing one declared blocker (used for multi-blocker creatures) Permanent creature = game.getPermanent(blockerId); if (creature != null) { + List groupsToCheck = new ArrayList<>(); for (CombatGroup group : groups) { if (group.equals(groupToUnblock) && group.blockers.contains(blockerId)) { - group.blockers.remove(blockerId); - group.blockerOrder.remove(blockerId); - if (group.blockers.isEmpty()) { - group.blocked = false; + groupsToCheck.add(group); + for (UUID attackerId : group.getAttackers()) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null) { + for (UUID bandedId : attacker.getBandedCards()) { + if (!bandedId.equals(attackerId)) { + CombatGroup bandedGroup = findGroup(bandedId); + if (bandedGroup != null) { + groupsToCheck.add(bandedGroup); + } + } + } + } } - if (creature.getBlocking() > 0) { + } + } + for (CombatGroup group : groupsToCheck) { + group.blockers.remove(blockerId); + group.blockerOrder.remove(blockerId); + if (group.blockers.isEmpty()) { + group.blocked = false; + } + if (creature.getBlocking() > 0) { + if (group.equals(groupToUnblock)) { creature.setBlocking(creature.getBlocking() - 1); - } else { - throw new UnsupportedOperationException("Trying to unblock creature, but blocking number value of creature < 1"); } - boolean canRemove = false; - for (CombatGroup blockGroup : getBlockingGroups()) { - if (blockGroup.blockers.contains(blockerId)) { - for (UUID attackerId : group.getAttackers()) { - blockGroup.attackers.remove(attackerId); - blockGroup.attackerOrder.remove(attackerId); - } - if (creature.getBlocking() == 0) { - blockGroup.blockers.remove(blockerId); - blockGroup.attackerOrder.clear(); - } + } else { + throw new UnsupportedOperationException("Trying to unblock creature, but blocking number value of creature < 1"); + } + boolean canRemove = false; + for (CombatGroup blockGroup : getBlockingGroups()) { + if (blockGroup.blockers.contains(blockerId)) { + for (UUID attackerId : group.getAttackers()) { + blockGroup.attackers.remove(attackerId); + blockGroup.attackerOrder.remove(attackerId); } - if (blockGroup.blockers.isEmpty()) { - canRemove = true; + if (creature.getBlocking() == 0) { + blockGroup.blockers.remove(blockerId); + blockGroup.attackerOrder.clear(); } } - if (canRemove) { - blockingGroups.remove(blockerId); + if (blockGroup.blockers.isEmpty()) { + canRemove = true; } } + if (canRemove) { + blockingGroups.remove(blockerId); + } } } } + /** + * Manual player action for undoing all declared blockers + * (used for single-blocker creatures and multi-blockers exceeding blocking limit) + * + * @param blockerId + * @param game + */ public void removeBlocker(UUID blockerId, Game game) { - // Manual player action for undoing all declared blockers (used for single-blocker creatures and multi-blockers exceeding blocking limit) for (CombatGroup group : groups) { if (group.blockers.contains(blockerId)) { group.blockers.remove(blockerId); diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index 7cd416da0b5..d9525cee320 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -36,6 +36,7 @@ import java.util.UUID; import mage.abilities.common.ControllerAssignCombatDamageToBlockersAbility; import mage.abilities.common.ControllerDivideCombatDamageAbility; import mage.abilities.common.DamageAsThoughNotBlockedAbility; +import mage.abilities.keyword.BandingAbility; import mage.abilities.keyword.CantBlockAloneAbility; import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DoubleStrikeAbility; @@ -140,15 +141,19 @@ public class CombatGroup implements Serializable, Copyable { return perm.getAbilities().containsKey(TrampleAbility.getInstance().getId()); } + private boolean hasBanding(Permanent perm) { + return perm.getAbilities().containsKey(BandingAbility.getInstance().getId()); + } + public void assignDamageToBlockers(boolean first, Game game) { if (!attackers.isEmpty() && (!first || hasFirstOrDoubleStrike(game))) { Permanent attacker = game.getPermanent(attackers.get(0)); - if (!assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(attacker, attacker.getControllerId(), first, game, true)) { + if (attacker != null && !assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(attacker, attacker.getControllerId(), first, game, true)) { if (blockers.isEmpty()) { unblockedDamage(first, game); return; } else { - Player player = game.getPlayer(defenderControlsDefensiveFormation(game) ? defendingPlayerId : attacker.getControllerId()); + Player player = game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : attacker.getControllerId()); if (attacker.getAbilities().containsKey(DamageAsThoughNotBlockedAbility.getInstance().getId())) { // for handling creatures like Thorn Elemental if (player.chooseUse(Outcome.Damage, "Do you wish to assign damage for " + attacker.getLogName() + " as though it weren't blocked?", null, game)) { blocked = false; @@ -244,7 +249,6 @@ public class CombatGroup implements Serializable, Copyable { } private void singleBlockerDamage(Player player, boolean first, Game game) { - //TODO: handle banding Permanent blocker = game.getPermanent(blockers.get(0)); Permanent attacker = game.getPermanent(attackers.get(0)); if (blocker != null && attacker != null) { @@ -273,7 +277,7 @@ public class CombatGroup implements Serializable, Copyable { } } if (canDamage(blocker, first)) { - if (blocker.getBlocking() == 1) { // blocking several creatures handled separately + if (checkSoleBlockerAfter(blocker, game)) { // blocking several creatures handled separately if (!assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(blocker, blocker.getControllerId(), first, game, false)) { attacker.markDamage(blockerDamage, blocker.getId(), game, true, true); } @@ -283,7 +287,6 @@ public class CombatGroup implements Serializable, Copyable { } private void multiBlockerDamage(Player player, boolean first, Game game) { - //TODO: handle banding Permanent attacker = game.getPermanent(attackers.get(0)); if (attacker == null) { return; @@ -296,7 +299,7 @@ public class CombatGroup implements Serializable, Copyable { for (UUID blockerId : blockerOrder) { Permanent blocker = game.getPermanent(blockerId); if (canDamage(blocker, first)) { - if (blocker.getBlocking() == 1) { // blocking several creatures handled separately + if (checkSoleBlockerAfter(blocker, game)) { // blocking several creatures handled separately blockerPower.put(blockerId, getDamageValueFromPermanent(blocker, game)); } } @@ -304,7 +307,7 @@ public class CombatGroup implements Serializable, Copyable { Map assigned = new HashMap<>(); if (blocked) { boolean excessDamageToDefender = true; - for (UUID blockerId : new ArrayList<>(blockerOrder)) { // prevent ConcurrentModificationException + for (UUID blockerId : blockerOrder) { Permanent blocker = game.getPermanent(blockerId); if (blocker != null) { int lethalDamage; @@ -381,7 +384,7 @@ public class CombatGroup implements Serializable, Copyable { for (UUID blockerId : blockerOrder) { Permanent blocker = game.getPermanent(blockerId); if (canDamage(blocker, first)) { - if (blocker.getBlocking() == 1) { // blocking several creatures handled separately + if (checkSoleBlockerAfter(blocker, game)) { // blocking several creatures handled separately blockerPower.put(blockerId, getDamageValueFromPermanent(blocker, game)); } } @@ -435,6 +438,24 @@ public class CombatGroup implements Serializable, Copyable { } } + public boolean checkSoleBlockerAfter (Permanent blocker, Game game) { + // this solves some corner cases (involving banding) when finding out whether a blocker is blocking alone or not + if (blocker.getBlocking() == 1) { + if (game.getCombat().blockingGroups.get(blocker.getId()) == null) { + return true; + } else { + for (CombatGroup group : game.getCombat().getBlockingGroups()) { + if (group.blockers.contains(blocker.getId())) { + if (group.attackers.size() == 1) { + return true; // if blocker is blocking a band, this won't be true + } + } + } + } + } + return false; + } + /** * Damages attacking creatures by a creature that blocked several ones * Damages only attackers as blocker was damage in @@ -471,7 +492,8 @@ public class CombatGroup implements Serializable, Copyable { if (blocker == null) { return; } - Player player = game.getPlayer(blocker.getControllerId()); + boolean oldRuleDamage = attackerAssignsCombatDamage(game); // handles banding + Player player = game.getPlayer(oldRuleDamage ? game.getCombat().getAttackingPlayerId() : blocker.getControllerId()); int damage = getDamageValueFromPermanent(blocker, game); if (canDamage(blocker, first)) { @@ -486,11 +508,20 @@ public class CombatGroup implements Serializable, Copyable { lethalDamage = Math.max(attacker.getToughness().getValue() - attacker.getDamage(), 0); } if (lethalDamage >= damage) { - assigned.put(attackerId, damage); - damage = 0; - break; + if (!oldRuleDamage) { + assigned.put(attackerId, damage); + damage = 0; + break; + } else if (damage == 0) { + break; + } + } + int damageAssigned = 0; + if (!oldRuleDamage) { + damageAssigned = player.getAmount(lethalDamage, damage, "Assign damage to " + attacker.getName(), game); + } else { + damageAssigned = player.getAmount(0, damage, "Assign damage to " + attacker.getName(), game); } - int damageAssigned = player.getAmount(lethalDamage, damage, "Assign damage to " + attacker.getName(), game); assigned.put(attackerId, damageAssigned); damage -= damageAssigned; } @@ -572,7 +603,7 @@ public class CombatGroup implements Serializable, Copyable { if (blockers.isEmpty()) { return; } - Player player = game.getPlayer(defenderControlsDefensiveFormation(game) ? defendingPlayerId : playerId); + Player player = game.getPlayer(playerId); // game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : playerId); // this was incorrect because defenderAssignsCombatDamage might be false by the time damage is dealt List blockerList = new ArrayList<>(blockers); blockerOrder.clear(); while (player.canRespond()) { @@ -717,7 +748,7 @@ public class CombatGroup implements Serializable, Copyable { } blockWasLegal = false; } - // Check if there are to many blockers (maxBlockedBy = 0 means no restrictions) + // Check if there are too many blockers (maxBlockedBy = 0 means no restrictions) if (attacker != null && this.blocked && attacker.getMaxBlockedBy() > 0 && attacker.getMaxBlockedBy() < blockers.size()) { for (UUID blockerId : blockers) { Permanent blocker = game.getPermanent(blockerId); @@ -759,15 +790,36 @@ public class CombatGroup implements Serializable, Copyable { } /** - * There are effects, that set an attacker to be blcoked. Therefore this + * There are effects, that set an attacker to be blocked. Therefore this * setter can be used. + * + * This method lacks a band check, use setBlocked(blocked, game) instead. * * @param blocked + * @deprecated */ + @Deprecated public void setBlocked(boolean blocked) { this.blocked = blocked; } + public void setBlocked(boolean blocked, Game game) { + this.blocked = blocked; + for (UUID attackerId : attackers) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null) { + for (UUID bandedId : attacker.getBandedCards()) { + if (!bandedId.equals(attackerId)) { + CombatGroup bandedGroup = game.getCombat().findGroup(bandedId); + if (bandedGroup != null) { + bandedGroup.blocked = blocked; + } + } + } + } + } + } + public boolean getBlocked() { return blocked; } @@ -778,26 +830,70 @@ public class CombatGroup implements Serializable, Copyable { } public boolean changeDefenderPostDeclaration(UUID newDefenderId, Game game) { - Permanent permanent = game.getPermanent(newDefenderId); - if (permanent != null) { - defenderId = newDefenderId; - defendingPlayerId = permanent.getControllerId(); - defenderIsPlaneswalker = true; - return true; - } else { - Player defender = game.getPlayer(newDefenderId); - if (defender != null) { + if (!defenderId.equals(newDefenderId)) { + for (UUID attackerId : attackers) { // changing defender will remove a banded attacker from its current band + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null && attacker.getBandedCards() != null) { + for (UUID bandedId : attacker.getBandedCards()) { + Permanent banded = game.getPermanent(bandedId); + if (banded != null) { + banded.removeBandedCard(attackerId); + } + } + } + attacker.clearBandedCards(); + } + Permanent permanent = game.getPermanent(newDefenderId); + if (permanent != null) { defenderId = newDefenderId; - defendingPlayerId = newDefenderId; - defenderIsPlaneswalker = false; + defendingPlayerId = permanent.getControllerId(); + defenderIsPlaneswalker = true; return true; + } else { + Player defender = game.getPlayer(newDefenderId); + if (defender != null) { + defenderId = newDefenderId; + defendingPlayerId = newDefenderId; + defenderIsPlaneswalker = false; + return true; + } } } return false; } - public boolean defenderControlsDefensiveFormation(Game game) { - // for handling Defensive Formation + /** + * Decides damage distribution for attacking banding creatures. + * + * @param game + */ + public boolean attackerAssignsCombatDamage(Game game) { + for (UUID attackerId : attackers) { + Permanent attacker = game.getPermanent(attackerId); + if (attacker != null) { + if (hasBanding(attacker)) { // 702.21k - only one attacker with banding necessary + return true; + } + } + } + return false; + } + + /** + * Decides damage distribution for blocking creatures with banding or + * if defending player controls the Defensive Formation enchantment. + * + * @param game + */ + public boolean defenderAssignsCombatDamage(Game game) { + for (UUID blockerId : blockers) { + Permanent blocker = game.getPermanent(blockerId); + if (blocker != null) { + if (hasBanding(blocker)) { // 702.21j - only one blocker with banding necessary + return true; + } + } + } for (Permanent defensiveFormation : game.getBattlefield().getAllActivePermanents(defendingPlayerId)) { if (defensiveFormation.getAbilities().containsKey(ControllerAssignCombatDamageToBlockersAbility.getInstance().getId())) { return true; @@ -809,7 +905,7 @@ public class CombatGroup implements Serializable, Copyable { public boolean assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(Permanent creature, UUID playerId, boolean first, Game game, boolean isAttacking) { // for handling Butcher Orgg if (creature.getAbilities().containsKey(ControllerDivideCombatDamageAbility.getInstance().getId())) { - Player player = game.getPlayer(defenderControlsDefensiveFormation(game) ? defendingPlayerId : playerId); + Player player = game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : (!isAttacking && attackerAssignsCombatDamage(game) ? game.getCombat().getAttackingPlayerId() : playerId)); // 10/4/2004 If it is blocked but then all of its blockers are removed before combat damage is assigned, then it won’t be able to deal combat damage and you won’t be able to use its ability. // (same principle should apply if it's blocking and its blocked attacker is removed from combat) if (!((blocked && blockers.isEmpty() && isAttacking) || (attackers.isEmpty() && !isAttacking)) && canDamage(creature, first)) { diff --git a/Mage/src/main/java/mage/game/permanent/Permanent.java b/Mage/src/main/java/mage/game/permanent/Permanent.java index b361f3abe55..8700e560df7 100644 --- a/Mage/src/main/java/mage/game/permanent/Permanent.java +++ b/Mage/src/main/java/mage/game/permanent/Permanent.java @@ -355,6 +355,14 @@ public interface Permanent extends Card, Controllable { */ void clearPairedCard(); + void addBandedCard(UUID bandedCard); + + void removeBandedCard(UUID bandedCard); + + List getBandedCards(); + + void clearBandedCards(); + void setMorphed(boolean value); boolean isMorphed(); diff --git a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java index c68a8be15db..0f81fe0ffe6 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentImpl.java @@ -113,6 +113,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { protected UUID attachedTo; protected int attachedToZoneChangeCounter; protected MageObjectReference pairedPermanent; + protected List bandedCards = new ArrayList<>(); protected Counters counters; protected List markedDamage; protected int timesLoyaltyUsed = 0; @@ -177,6 +178,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { this.monstrous = permanent.monstrous; this.renowned = permanent.renowned; this.pairedPermanent = permanent.pairedPermanent; + this.bandedCards.addAll(permanent.bandedCards); this.timesLoyaltyUsed = permanent.timesLoyaltyUsed; this.morphed = permanent.morphed; @@ -1119,32 +1121,44 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { if (tapped && !game.getState().getContinuousEffects().asThough(this.getId(), AsThoughEffectType.BLOCK_TAPPED, this.getControllerId(), game)) { return false; } - Permanent attacker = game.getPermanent(attackerId); - if (attacker == null) { + Permanent baseAttacker = game.getPermanent(attackerId); + if (baseAttacker == null) { return false; } - // controller of attacking permanent must be an opponent - if (!game.getPlayer(this.getControllerId()).hasOpponent(attacker.getControllerId(), game)) { - return false; - } - //20101001 - 509.1b - // check blocker restrictions - for (Map.Entry> entry : game.getContinuousEffects().getApplicableRestrictionEffects(this, game).entrySet()) { - for (Ability ability : entry.getValue()) { - if (!entry.getKey().canBlock(attacker, this, ability, game)) { - return false; + List attackerIdsToCheck = new ArrayList<>(baseAttacker.getBandedCards()); // handles banding + attackerIdsToCheck.add(attackerId); + blockCheck: + for (UUID bandedId : attackerIdsToCheck) { + Permanent attacker = game.getPermanent(bandedId); + if (attacker == null) { + continue blockCheck; + } + // controller of attacking permanent must be an opponent + if (!game.getPlayer(this.getControllerId()).hasOpponent(attacker.getControllerId(), game)) { + continue blockCheck; + } + //20101001 - 509.1b + // check blocker restrictions + for (Map.Entry> entry : game.getContinuousEffects().getApplicableRestrictionEffects(this, game).entrySet()) { + for (Ability ability : entry.getValue()) { + if (!entry.getKey().canBlock(attacker, this, ability, game)) { + continue blockCheck; + } } } - } - // check also attacker's restriction effects - for (Map.Entry> restrictionEntry : game.getContinuousEffects().getApplicableRestrictionEffects(attacker, game).entrySet()) { - for (Ability ability : restrictionEntry.getValue()) { - if (!restrictionEntry.getKey().canBeBlocked(attacker, this, ability, game)) { - return false; + // check also attacker's restriction effects + for (Map.Entry> restrictionEntry : game.getContinuousEffects().getApplicableRestrictionEffects(attacker, game).entrySet()) { + for (Ability ability : restrictionEntry.getValue()) { + if (!restrictionEntry.getKey().canBeBlocked(attacker, this, ability, game)) { + continue blockCheck; + } } } + if (!attacker.hasProtectionFrom(this, game)) { + return true; + } } - return !attacker.hasProtectionFrom(this, game); + return false; } @Override @@ -1331,6 +1345,28 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { this.pairedPermanent = null; } + @Override + public void addBandedCard(UUID bandedCard) { + if (!this.bandedCards.contains(bandedCard)) { + this.bandedCards.add(bandedCard); + } + } + + @Override + public void removeBandedCard(UUID bandedCard) { + this.bandedCards.remove(bandedCard); + } + + @Override + public List getBandedCards() { + return bandedCards; + } + + @Override + public void clearBandedCards() { + this.bandedCards.clear(); + } + @Override public String getLogName() { if (name.isEmpty()) { diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index e85a5c3cca6..bbdc63b2c9c 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -832,6 +832,14 @@ public abstract class PlayerImpl implements Player, Serializable { pairedCard.clearPairedCard(); } } + if (permanent.getBandedCards() != null && !permanent.getBandedCards().isEmpty()) { + for (UUID bandedId : permanent.getBandedCards()) { + Permanent banded = game.getPermanent(bandedId); + if (banded != null) { + banded.removeBandedCard(permanent.getId()); + } + } + } return true; } From c37ecff9398060a20ac82082d267e36cc4365ef4 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 19:56:46 +0000 Subject: [PATCH 02/77] Small rewrite --- .../permanent/AttackingSameNotBandedPredicate,java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java b/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java index 519d28f0645..eeb2d985416 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java @@ -49,11 +49,9 @@ public class AttackingSameNotBandedPredicate implements Predicate { @Override public boolean apply(Permanent input, Game game) { CombatGroup combatGroup = game.getCombat().findGroup(input.getId()); - if (combatGroup != null) { - return input.isAttacking() + return combatGroup != null + && input.isAttacking() && input.getBandedCards().isEmpty() && combatGroup.getDefenderId().equals(defenderId); - } - return false; } } From 0982d6b10e9251a517e280917c0fa38caecef5b6 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 20:56:05 +0000 Subject: [PATCH 03/77] Name typo --- ...tBandedPredicate,java => AttackingSameNotBandedPredicate.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Mage/src/main/java/mage/filter/predicate/permanent/{AttackingSameNotBandedPredicate,java => AttackingSameNotBandedPredicate.java} (100%) diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java b/Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate.java similarity index 100% rename from Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate,java rename to Mage/src/main/java/mage/filter/predicate/permanent/AttackingSameNotBandedPredicate.java From 3e9f457c7ce1e22e1a913ae51a1bc8a8cc2ba303 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 21:48:01 +0000 Subject: [PATCH 04/77] Implemented Baton of Morale --- Mage.Sets/src/mage/cards/b/BatonOfMorale.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BatonOfMorale.java diff --git a/Mage.Sets/src/mage/cards/b/BatonOfMorale.java b/Mage.Sets/src/mage/cards/b/BatonOfMorale.java new file mode 100644 index 00000000000..435a42bd098 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BatonOfMorale.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class BatonOfMorale extends CardImpl { + + public BatonOfMorale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {2}: Target creature gains banding until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(BandingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{2}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public BatonOfMorale(final BatonOfMorale card) { + super(card); + } + + @Override + public BatonOfMorale copy() { + return new BatonOfMorale(this); + } +} From 9db02f64ee1376f440beefded6ccc4e956e69c8d Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 21:49:08 +0000 Subject: [PATCH 05/77] Implemented Baton of Morale --- Mage.Sets/src/mage/sets/IceAge.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index ed0abad5112..2d0f531bcdb 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -69,6 +69,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Balduvian Conjurer", 58, Rarity.UNCOMMON, mage.cards.b.BalduvianConjurer.class)); cards.add(new SetCardInfo("Balduvian Hydra", 173, Rarity.RARE, mage.cards.b.BalduvianHydra.class)); cards.add(new SetCardInfo("Barbed Sextant", 287, Rarity.COMMON, mage.cards.b.BarbedSextant.class)); + cards.add(new SetCardInfo("Baton of Morale", 288, Rarity.UNCOMMON, mage.cards.b.BatonOfMorale.class)); cards.add(new SetCardInfo("Battle Frenzy", 175, Rarity.COMMON, mage.cards.b.BattleFrenzy.class)); cards.add(new SetCardInfo("Binding Grasp", 60, Rarity.UNCOMMON, mage.cards.b.BindingGrasp.class)); cards.add(new SetCardInfo("Black Scarab", 230, Rarity.UNCOMMON, mage.cards.b.BlackScarab.class)); From 2638e6cf8b7b05d7d1d7c9635de4ce65a25db5ae Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 22:03:55 +0000 Subject: [PATCH 06/77] Implemented Soraya the Falconer --- .../src/mage/cards/s/SorayaTheFalconer.java | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SorayaTheFalconer.java diff --git a/Mage.Sets/src/mage/cards/s/SorayaTheFalconer.java b/Mage.Sets/src/mage/cards/s/SorayaTheFalconer.java new file mode 100644 index 00000000000..f869b8baa22 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SorayaTheFalconer.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class SorayaTheFalconer extends CardImpl { + + public SorayaTheFalconer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Bird creatures get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, + new FilterCreaturePermanent(SubType.BIRD, "Bird creatures"), false))); + + // {1}{W}: Target Bird creature gains banding until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(BandingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")); + ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent(SubType.BIRD, "Bird creature"))); + this.addAbility(ability); + + } + + public SorayaTheFalconer(final SorayaTheFalconer card) { + super(card); + } + + @Override + public SorayaTheFalconer copy() { + return new SorayaTheFalconer(this); + } +} From bfc00b89b972c79c6243a94d781d4aff6d18bad1 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 22:04:49 +0000 Subject: [PATCH 07/77] Implemented Soraya the Falconer --- Mage.Sets/src/mage/sets/Homelands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java index 4209ae62825..040b4010418 100644 --- a/Mage.Sets/src/mage/sets/Homelands.java +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -168,6 +168,7 @@ public class Homelands extends ExpansionSet { cards.add(new SetCardInfo("Serrated Arrows", 135, Rarity.COMMON, mage.cards.s.SerratedArrows.class)); cards.add(new SetCardInfo("Shrink", 70, Rarity.COMMON, mage.cards.s.Shrink.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Shrink", 71, Rarity.COMMON, mage.cards.s.Shrink.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Soraya the Falconer", 122, Rarity.RARE, mage.cards.s.SorayaTheFalconer.class)); cards.add(new SetCardInfo("Spectral Bears", 72, Rarity.UNCOMMON, mage.cards.s.SpectralBears.class)); cards.add(new SetCardInfo("Torture", 23, Rarity.COMMON, Torture.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Torture", 24, Rarity.COMMON, Torture.class, NON_FULL_USE_VARIOUS)); From 4bd4df67e33cf0ca0881764b484eea6ab997a2ba Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 23:50:14 +0000 Subject: [PATCH 08/77] Implemented Wall of Vapor --- Mage.Sets/src/mage/cards/w/WallOfVapor.java | 109 ++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WallOfVapor.java diff --git a/Mage.Sets/src/mage/cards/w/WallOfVapor.java b/Mage.Sets/src/mage/cards/w/WallOfVapor.java new file mode 100644 index 00000000000..59beaf7cb0d --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WallOfVapor.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.BlockedByIdPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.DamageCreatureEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public class WallOfVapor extends CardImpl { + + public WallOfVapor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(DefenderAbility.getInstance()); + + // Prevent all damage that would be dealt to Wall of Vapor by creatures it's blocking. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new WallOfVaporEffect())); + } + + public WallOfVapor(final WallOfVapor card) { + super(card); + } + + @Override + public WallOfVapor copy() { + return new WallOfVapor(this); + } +} + +class WallOfVaporEffect extends PreventionEffectImpl { + + WallOfVaporEffect() { + super(Duration.WhileOnBattlefield, Integer.MAX_VALUE, false); + staticText = "Prevent all damage that would be dealt to Wall of Vapor by creatures it's blocking"; + } + + WallOfVaporEffect(final WallOfVaporEffect effect) { + super(effect); + } + + @Override + public WallOfVaporEffect copy() { + return new WallOfVaporEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game) && event instanceof DamageCreatureEvent && event.getAmount() > 0) { + DamageCreatureEvent damageEvent = (DamageCreatureEvent) event; + if (event.getTargetId().equals(source.getSourceId())) { + Permanent permanent = game.getPermanentOrLKIBattlefield(damageEvent.getSourceId()); + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new BlockedByIdPredicate(source.getSourceId())); + if (permanent != null && filter.match(permanent, game)) { + return true; + } + } + } + return false; + } +} From b639a1a0833b113db31e01115130700932cf6571 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 23:51:11 +0000 Subject: [PATCH 09/77] Implemented Ayesha Tanaka --- Mage.Sets/src/mage/cards/a/AyeshaTanaka.java | 107 +++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AyeshaTanaka.java diff --git a/Mage.Sets/src/mage/cards/a/AyeshaTanaka.java b/Mage.Sets/src/mage/cards/a/AyeshaTanaka.java new file mode 100644 index 00000000000..d16fa76af3b --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AyeshaTanaka.java @@ -0,0 +1,107 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterStackObject; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.StackAbility; +import mage.target.common.TargetActivatedOrTriggeredAbility; + +/** + * + * @author L_J + */ +public class AyeshaTanaka extends CardImpl { + + private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source"); + + static { + filter.add(new ArtifactSourcePredicate()); + } + + public AyeshaTanaka(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}{U}{U}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Banding + this.addAbility(BandingAbility.getInstance()); + + // {T}: Counter target activated ability from an artifact source unless that ability's controller pays {W}. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new ManaCostsImpl("{W}")), new TapSourceCost()); + ability.addTarget(new TargetActivatedOrTriggeredAbility(filter)); + this.addAbility(ability); + } + + public AyeshaTanaka(final AyeshaTanaka card) { + super(card); + } + + @Override + public AyeshaTanaka copy() { + return new AyeshaTanaka(this); + } +} + +class ArtifactSourcePredicate implements Predicate { + + public ArtifactSourcePredicate() { + } + + @Override + public boolean apply(Ability input, Game game) { + if (input instanceof StackAbility) { + return input.getSourceObject(game).isArtifact() && input.getAbilityType() == AbilityType.ACTIVATED; + } + return false; + } + + @Override + public String toString() { + return "Source(Artifact)"; + } +} From 2e11b9b19a949bf4d60878d801f7bcf4d4916094 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 23:52:35 +0000 Subject: [PATCH 10/77] Implemented Ayesha Tanaka and Wall of Vapor --- Mage.Sets/src/mage/sets/Legends.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Legends.java b/Mage.Sets/src/mage/sets/Legends.java index 0e21a342854..8ec19606aaa 100644 --- a/Mage.Sets/src/mage/sets/Legends.java +++ b/Mage.Sets/src/mage/sets/Legends.java @@ -71,6 +71,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Arena of the Ancients", 215, Rarity.RARE, mage.cards.a.ArenaOfTheAncients.class)); cards.add(new SetCardInfo("Avoid Fate", 89, Rarity.COMMON, mage.cards.a.AvoidFate.class)); cards.add(new SetCardInfo("Axelrod Gunnarson", 259, Rarity.RARE, mage.cards.a.AxelrodGunnarson.class)); + cards.add(new SetCardInfo("Ayesha Tanaka", 260, Rarity.RARE, mage.cards.a.AyeshaTanaka.class)); cards.add(new SetCardInfo("Azure Drake", 46, Rarity.UNCOMMON, mage.cards.a.AzureDrake.class)); cards.add(new SetCardInfo("Backfire", 47, Rarity.UNCOMMON, mage.cards.b.Backfire.class)); cards.add(new SetCardInfo("Barbary Apes", 90, Rarity.COMMON, mage.cards.b.BarbaryApes.class)); @@ -288,6 +289,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Wall of Light", 212, Rarity.UNCOMMON, mage.cards.w.WallOfLight.class)); cards.add(new SetCardInfo("Wall of Opposition", 168, Rarity.RARE, mage.cards.w.WallOfOpposition.class)); cards.add(new SetCardInfo("Wall of Putrid Flesh", 41, Rarity.UNCOMMON, mage.cards.w.WallOfPutridFlesh.class)); + cards.add(new SetCardInfo("Wall of Vapor", 84, Rarity.COMMON, mage.cards.w.WallOfVapor.class)); cards.add(new SetCardInfo("Wall of Wonder", 85, Rarity.UNCOMMON, mage.cards.w.WallOfWonder.class)); cards.add(new SetCardInfo("Whirling Dervish", 125, Rarity.UNCOMMON, mage.cards.w.WhirlingDervish.class)); cards.add(new SetCardInfo("White Mana Battery", 244, Rarity.UNCOMMON, mage.cards.w.WhiteManaBattery.class)); From c4942bcc53b210547a6cbf56096c29f8f263f9f8 Mon Sep 17 00:00:00 2001 From: L_J Date: Tue, 13 Feb 2018 23:53:11 +0000 Subject: [PATCH 11/77] Implemented Ayesha Tanaka and Wall of Vapor --- Mage.Sets/src/mage/sets/Chronicles.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Chronicles.java b/Mage.Sets/src/mage/sets/Chronicles.java index dc2a7ec3db1..983b3d91e75 100644 --- a/Mage.Sets/src/mage/sets/Chronicles.java +++ b/Mage.Sets/src/mage/sets/Chronicles.java @@ -64,6 +64,7 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Ashnod's Altar", 72, Rarity.COMMON, mage.cards.a.AshnodsAltar.class)); cards.add(new SetCardInfo("Ashnod's Transmogrant", 73, Rarity.COMMON, mage.cards.a.AshnodsTransmogrant.class)); cards.add(new SetCardInfo("Axelrod Gunnarson", 107, Rarity.RARE, mage.cards.a.AxelrodGunnarson.class)); + cards.add(new SetCardInfo("Ayesha Tanaka", 108, Rarity.RARE, mage.cards.a.AyeshaTanaka.class)); cards.add(new SetCardInfo("Azure Drake", 15, Rarity.UNCOMMON, mage.cards.a.AzureDrake.class)); cards.add(new SetCardInfo("Banshee", 1, Rarity.UNCOMMON, mage.cards.b.Banshee.class)); cards.add(new SetCardInfo("Barl's Cage", 74, Rarity.RARE, mage.cards.b.BarlsCage.class)); @@ -159,6 +160,7 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Vaevictis Asmadi", 124, Rarity.RARE, mage.cards.v.VaevictisAsmadi.class)); cards.add(new SetCardInfo("Wall of Heat", 55, Rarity.COMMON, mage.cards.w.WallOfHeat.class)); cards.add(new SetCardInfo("Wall of Opposition", 56, Rarity.UNCOMMON, mage.cards.w.WallOfOpposition.class)); + cards.add(new SetCardInfo("Wall of Vapor", 27, Rarity.COMMON, mage.cards.w.WallOfVapor.class)); cards.add(new SetCardInfo("Wall of Wonder", 28, Rarity.UNCOMMON, mage.cards.w.WallOfWonder.class)); cards.add(new SetCardInfo("Witch Hunter", 70, Rarity.UNCOMMON, mage.cards.w.WitchHunter.class)); cards.add(new SetCardInfo("Xira Arien", 125, Rarity.RARE, mage.cards.x.XiraArien.class)); From ab41da66eda062ff723053b1eab61273e0783db2 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:16:08 +0000 Subject: [PATCH 12/77] Implemented Benalish Hero --- Mage.Sets/src/mage/cards/b/BenalishHero.java | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BenalishHero.java diff --git a/Mage.Sets/src/mage/cards/b/BenalishHero.java b/Mage.Sets/src/mage/cards/b/BenalishHero.java new file mode 100644 index 00000000000..0217ebf2b49 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BenalishHero.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class BenalishHero extends CardImpl { + + public BenalishHero (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public BenalishHero (final BenalishHero card) { + super(card); + } + + @Override + public BenalishHero copy() { + return new BenalishHero(this); + } + +} From 854110ac463284018b857747b85dee0ee5a65b4f Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:16:47 +0000 Subject: [PATCH 13/77] Implemented Helm of Chatzuk --- Mage.Sets/src/mage/cards/h/HelmOfChatzuk.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HelmOfChatzuk.java diff --git a/Mage.Sets/src/mage/cards/h/HelmOfChatzuk.java b/Mage.Sets/src/mage/cards/h/HelmOfChatzuk.java new file mode 100644 index 00000000000..ec6cc2e1224 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HelmOfChatzuk.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class HelmOfChatzuk extends CardImpl { + + public HelmOfChatzuk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); + + // {1}, {T}: Target creature gains banding until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(BandingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public HelmOfChatzuk(final HelmOfChatzuk card) { + super(card); + } + + @Override + public HelmOfChatzuk copy() { + return new HelmOfChatzuk(this); + } +} From 90e1786c87ab36447b51a37a47a93021c1f8b274 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:17:23 +0000 Subject: [PATCH 14/77] Implemented Mesa Pegasus --- Mage.Sets/src/mage/cards/m/MesaPegasus.java | 69 +++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MesaPegasus.java diff --git a/Mage.Sets/src/mage/cards/m/MesaPegasus.java b/Mage.Sets/src/mage/cards/m/MesaPegasus.java new file mode 100644 index 00000000000..f7cfb97564f --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MesaPegasus.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class MesaPegasus extends CardImpl { + + public MesaPegasus (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.PEGASUS); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public MesaPegasus (final MesaPegasus card) { + super(card); + } + + @Override + public MesaPegasus copy() { + return new MesaPegasus(this); + } + +} From 65b4ffb30c27204ca85fa2c002163ceae6be5a52 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:18:21 +0000 Subject: [PATCH 15/77] Implemented Timber Wolves --- Mage.Sets/src/mage/cards/t/TimberWolves.java | 65 ++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TimberWolves.java diff --git a/Mage.Sets/src/mage/cards/t/TimberWolves.java b/Mage.Sets/src/mage/cards/t/TimberWolves.java new file mode 100644 index 00000000000..07770474bf1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TimberWolves.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class TimberWolves extends CardImpl { + + public TimberWolves (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); + this.subtype.add(SubType.WOLF); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public TimberWolves (final TimberWolves card) { + super(card); + } + + @Override + public TimberWolves copy() { + return new TimberWolves(this); + } + +} From ce20a4c674eb8564ff3450fb1363b9985475f12d Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:37:56 +0000 Subject: [PATCH 16/77] Implemented cards --- Mage.Sets/src/mage/sets/LimitedEditionAlpha.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java b/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java index 020c9da5613..f5c1f066061 100644 --- a/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java +++ b/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java @@ -37,6 +37,7 @@ public class LimitedEditionAlpha extends ExpansionSet { cards.add(new SetCardInfo("Balance", 187, Rarity.RARE, mage.cards.b.Balance.class)); cards.add(new SetCardInfo("Basalt Monolith", 231, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class)); cards.add(new SetCardInfo("Bayou", 278, Rarity.RARE, mage.cards.b.Bayou.class)); + cards.add(new SetCardInfo("Benalish Hero", 188, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Berserk", 94, Rarity.UNCOMMON, mage.cards.b.Berserk.class)); cards.add(new SetCardInfo("Birds of Paradise", 95, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); cards.add(new SetCardInfo("Black Knight", 3, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); @@ -126,6 +127,7 @@ public class LimitedEditionAlpha extends ExpansionSet { cards.add(new SetCardInfo("Grizzly Bears", 108, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); cards.add(new SetCardInfo("Guardian Angel", 205, Rarity.COMMON, mage.cards.g.GuardianAngel.class)); cards.add(new SetCardInfo("Healing Salve", 206, Rarity.COMMON, mage.cards.h.HealingSalve.class)); + cards.add(new SetCardInfo("Helm of Chatzuk", 246, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); cards.add(new SetCardInfo("Hill Giant", 158, Rarity.COMMON, mage.cards.h.HillGiant.class)); cards.add(new SetCardInfo("Holy Armor", 207, Rarity.COMMON, mage.cards.h.HolyArmor.class)); cards.add(new SetCardInfo("Holy Strength", 208, Rarity.COMMON, mage.cards.h.HolyStrength.class)); @@ -176,6 +178,7 @@ public class LimitedEditionAlpha extends ExpansionSet { cards.add(new SetCardInfo("Mana Vault", 259, Rarity.RARE, mage.cards.m.ManaVault.class)); cards.add(new SetCardInfo("Meekstone", 260, Rarity.RARE, mage.cards.m.Meekstone.class)); cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 67, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 212, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Mind Twist", 24, Rarity.RARE, mage.cards.m.MindTwist.class)); cards.add(new SetCardInfo("Mons's Goblin Raiders", 165, Rarity.COMMON, mage.cards.m.MonssGoblinRaiders.class)); cards.add(new SetCardInfo("Mountain", 283, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -262,6 +265,7 @@ public class LimitedEditionAlpha extends ExpansionSet { cards.add(new SetCardInfo("Thicket Basilisk", 127, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); cards.add(new SetCardInfo("Thoughtlace", 83, Rarity.RARE, mage.cards.t.Thoughtlace.class)); cards.add(new SetCardInfo("Throne of Bone", 273, Rarity.UNCOMMON, mage.cards.t.ThroneOfBone.class)); + cards.add(new SetCardInfo("Timber Wolves", 128, Rarity.RARE, mage.cards.t.TimberWolves.class)); cards.add(new SetCardInfo("Timetwister", 85, Rarity.RARE, mage.cards.t.Timetwister.class)); cards.add(new SetCardInfo("Time Vault", 274, Rarity.RARE, mage.cards.t.TimeVault.class)); cards.add(new SetCardInfo("Time Walk", 84, Rarity.RARE, mage.cards.t.TimeWalk.class)); From 71c395f5c764e1804c12815f656927f615095d00 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:38:50 +0000 Subject: [PATCH 17/77] Implemented cards --- Mage.Sets/src/mage/sets/LimitedEditionBeta.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage.Sets/src/mage/sets/LimitedEditionBeta.java b/Mage.Sets/src/mage/sets/LimitedEditionBeta.java index c02e0a923e4..ff30f36357b 100644 --- a/Mage.Sets/src/mage/sets/LimitedEditionBeta.java +++ b/Mage.Sets/src/mage/sets/LimitedEditionBeta.java @@ -37,6 +37,7 @@ public class LimitedEditionBeta extends ExpansionSet { cards.add(new SetCardInfo("Balance", 3, Rarity.RARE, mage.cards.b.Balance.class)); cards.add(new SetCardInfo("Basalt Monolith", 232, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class)); cards.add(new SetCardInfo("Bayou", 279, Rarity.RARE, mage.cards.b.Bayou.class)); + cards.add(new SetCardInfo("Benalish Hero", 4, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Berserk", 186, Rarity.UNCOMMON, mage.cards.b.Berserk.class)); cards.add(new SetCardInfo("Birds of Paradise", 187, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); cards.add(new SetCardInfo("Black Knight", 95, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); @@ -128,6 +129,7 @@ public class LimitedEditionBeta extends ExpansionSet { cards.add(new SetCardInfo("Grizzly Bears", 200, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); cards.add(new SetCardInfo("Guardian Angel", 22, Rarity.COMMON, mage.cards.g.GuardianAngel.class)); cards.add(new SetCardInfo("Healing Salve", 23, Rarity.COMMON, mage.cards.h.HealingSalve.class)); + cards.add(new SetCardInfo("Helm of Chatzuk", 247, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); cards.add(new SetCardInfo("Hill Giant", 158, Rarity.COMMON, mage.cards.h.HillGiant.class)); cards.add(new SetCardInfo("Holy Armor", 24, Rarity.COMMON, mage.cards.h.HolyArmor.class)); cards.add(new SetCardInfo("Holy Strength", 25, Rarity.COMMON, mage.cards.h.HolyStrength.class)); @@ -179,6 +181,7 @@ public class LimitedEditionBeta extends ExpansionSet { cards.add(new SetCardInfo("Manabarbs", 164, Rarity.RARE, mage.cards.m.Manabarbs.class)); cards.add(new SetCardInfo("Meekstone", 261, Rarity.RARE, mage.cards.m.Meekstone.class)); cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 67, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 29, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Mind Twist", 116, Rarity.RARE, mage.cards.m.MindTwist.class)); cards.add(new SetCardInfo("Mons's Goblin Raiders", 165, Rarity.COMMON, mage.cards.m.MonssGoblinRaiders.class)); cards.add(new SetCardInfo("Mountain", 297, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -268,6 +271,7 @@ public class LimitedEditionBeta extends ExpansionSet { cards.add(new SetCardInfo("Thicket Basilisk", 219, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); cards.add(new SetCardInfo("Thoughtlace", 83, Rarity.RARE, mage.cards.t.Thoughtlace.class)); cards.add(new SetCardInfo("Throne of Bone", 274, Rarity.UNCOMMON, mage.cards.t.ThroneOfBone.class)); + cards.add(new SetCardInfo("Timber Wolves", 220, Rarity.RARE, mage.cards.t.TimberWolves.class)); cards.add(new SetCardInfo("Time Vault", 275, Rarity.RARE, mage.cards.t.TimeVault.class)); cards.add(new SetCardInfo("Time Walk", 84, Rarity.RARE, mage.cards.t.TimeWalk.class)); cards.add(new SetCardInfo("Timetwister", 85, Rarity.RARE, mage.cards.t.Timetwister.class)); From b199771b13390da3b2275579a4bbe82aac6b4b15 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:39:07 +0000 Subject: [PATCH 18/77] Implemented cards --- Mage.Sets/src/mage/sets/UnlimitedEdition.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage.Sets/src/mage/sets/UnlimitedEdition.java b/Mage.Sets/src/mage/sets/UnlimitedEdition.java index 597123b77e6..e12d2c0d435 100644 --- a/Mage.Sets/src/mage/sets/UnlimitedEdition.java +++ b/Mage.Sets/src/mage/sets/UnlimitedEdition.java @@ -37,6 +37,7 @@ public class UnlimitedEdition extends ExpansionSet { cards.add(new SetCardInfo("Balance", 187, Rarity.RARE, mage.cards.b.Balance.class)); cards.add(new SetCardInfo("Basalt Monolith", 232, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class)); cards.add(new SetCardInfo("Bayou", 279, Rarity.RARE, mage.cards.b.Bayou.class)); + cards.add(new SetCardInfo("Benalish Hero", 188, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Berserk", 94, Rarity.UNCOMMON, mage.cards.b.Berserk.class)); cards.add(new SetCardInfo("Birds of Paradise", 95, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); cards.add(new SetCardInfo("Black Knight", 3, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); @@ -128,6 +129,7 @@ public class UnlimitedEdition extends ExpansionSet { cards.add(new SetCardInfo("Grizzly Bears", 108, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); cards.add(new SetCardInfo("Guardian Angel", 206, Rarity.COMMON, mage.cards.g.GuardianAngel.class)); cards.add(new SetCardInfo("Healing Salve", 207, Rarity.COMMON, mage.cards.h.HealingSalve.class)); + cards.add(new SetCardInfo("Helm of Chatzuk", 247, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); cards.add(new SetCardInfo("Hill Giant", 158, Rarity.COMMON, mage.cards.h.HillGiant.class)); cards.add(new SetCardInfo("Holy Armor", 208, Rarity.COMMON, mage.cards.h.HolyArmor.class)); cards.add(new SetCardInfo("Holy Strength", 209, Rarity.COMMON, mage.cards.h.HolyStrength.class)); @@ -179,6 +181,7 @@ public class UnlimitedEdition extends ExpansionSet { cards.add(new SetCardInfo("Mana Vault", 260, Rarity.RARE, mage.cards.m.ManaVault.class)); cards.add(new SetCardInfo("Meekstone", 261, Rarity.RARE, mage.cards.m.Meekstone.class)); cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 67, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 213, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Mind Twist", 24, Rarity.RARE, mage.cards.m.MindTwist.class)); cards.add(new SetCardInfo("Mons's Goblin Raiders", 165, Rarity.COMMON, mage.cards.m.MonssGoblinRaiders.class)); cards.add(new SetCardInfo("Mountain", 286, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -268,6 +271,7 @@ public class UnlimitedEdition extends ExpansionSet { cards.add(new SetCardInfo("Thicket Basilisk", 127, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); cards.add(new SetCardInfo("Thoughtlace", 83, Rarity.RARE, mage.cards.t.Thoughtlace.class)); cards.add(new SetCardInfo("Throne of Bone", 274, Rarity.UNCOMMON, mage.cards.t.ThroneOfBone.class)); + cards.add(new SetCardInfo("Timber Wolves", 128, Rarity.RARE, mage.cards.t.TimberWolves.class)); cards.add(new SetCardInfo("Timetwister", 85, Rarity.RARE, mage.cards.t.Timetwister.class)); cards.add(new SetCardInfo("Time Vault", 275, Rarity.RARE, mage.cards.t.TimeVault.class)); cards.add(new SetCardInfo("Time Walk", 84, Rarity.RARE, mage.cards.t.TimeWalk.class)); From c5e51e89a5239b13f7f0e5509cc892b0422a7ec9 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:39:28 +0000 Subject: [PATCH 19/77] Implemented cards --- Mage.Sets/src/mage/sets/RevisedEdition.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage.Sets/src/mage/sets/RevisedEdition.java b/Mage.Sets/src/mage/sets/RevisedEdition.java index ae43bcfa15e..dc011b70e35 100644 --- a/Mage.Sets/src/mage/sets/RevisedEdition.java +++ b/Mage.Sets/src/mage/sets/RevisedEdition.java @@ -40,6 +40,7 @@ public class RevisedEdition extends ExpansionSet { cards.add(new SetCardInfo("Balance", 187, Rarity.RARE, mage.cards.b.Balance.class)); cards.add(new SetCardInfo("Basalt Monolith", 235, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class)); cards.add(new SetCardInfo("Bayou", 283, Rarity.RARE, mage.cards.b.Bayou.class)); + cards.add(new SetCardInfo("Benalish Hero", 188, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Birds of Paradise", 94, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); cards.add(new SetCardInfo("Black Knight", 3, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); cards.add(new SetCardInfo("Black Vise", 236, Rarity.UNCOMMON, mage.cards.b.BlackVise.class)); @@ -134,6 +135,7 @@ public class RevisedEdition extends ExpansionSet { cards.add(new SetCardInfo("Grizzly Bears", 108, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); cards.add(new SetCardInfo("Guardian Angel", 205, Rarity.COMMON, mage.cards.g.GuardianAngel.class)); cards.add(new SetCardInfo("Healing Salve", 206, Rarity.COMMON, mage.cards.h.HealingSalve.class)); + cards.add(new SetCardInfo("Helm of Chatzuk", 250, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); cards.add(new SetCardInfo("Hill Giant", 157, Rarity.COMMON, mage.cards.h.HillGiant.class)); cards.add(new SetCardInfo("Holy Armor", 207, Rarity.COMMON, mage.cards.h.HolyArmor.class)); cards.add(new SetCardInfo("Holy Strength", 208, Rarity.COMMON, mage.cards.h.HolyStrength.class)); @@ -186,6 +188,7 @@ public class RevisedEdition extends ExpansionSet { cards.add(new SetCardInfo("Mana Vault", 263, Rarity.RARE, mage.cards.m.ManaVault.class)); cards.add(new SetCardInfo("Meekstone", 264, Rarity.RARE, mage.cards.m.Meekstone.class)); cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 68, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 212, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Mijae Djinn", 165, Rarity.RARE, mage.cards.m.MijaeDjinn.class)); cards.add(new SetCardInfo("Millstone", 265, Rarity.RARE, mage.cards.m.Millstone.class)); cards.add(new SetCardInfo("Mind Twist", 25, Rarity.RARE, mage.cards.m.MindTwist.class)); @@ -277,6 +280,7 @@ public class RevisedEdition extends ExpansionSet { cards.add(new SetCardInfo("Thicket Basilisk", 125, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); cards.add(new SetCardInfo("Thoughtlace", 85, Rarity.RARE, mage.cards.t.Thoughtlace.class)); cards.add(new SetCardInfo("Throne of Bone", 279, Rarity.UNCOMMON, mage.cards.t.ThroneOfBone.class)); + cards.add(new SetCardInfo("Timber Wolves", 126, Rarity.RARE, mage.cards.t.TimberWolves.class)); cards.add(new SetCardInfo("Titania's Song", 127, Rarity.RARE, mage.cards.t.TitaniasSong.class)); cards.add(new SetCardInfo("Tranquility", 128, Rarity.COMMON, mage.cards.t.Tranquility.class)); cards.add(new SetCardInfo("Tropical Island", 303, Rarity.RARE, mage.cards.t.TropicalIsland.class)); From e0cbd6550bff0e4c63d797164c15ee6d6e5a84fb Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:40:26 +0000 Subject: [PATCH 20/77] Implemented cards --- Mage.Sets/src/mage/sets/FourthEdition.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/FourthEdition.java b/Mage.Sets/src/mage/sets/FourthEdition.java index 0b8d9f8cacd..02cd856ac9e 100644 --- a/Mage.Sets/src/mage/sets/FourthEdition.java +++ b/Mage.Sets/src/mage/sets/FourthEdition.java @@ -205,6 +205,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Stream of Life", 272, Rarity.COMMON, mage.cards.s.StreamOfLife.class)); cards.add(new SetCardInfo("Sylvan Library", 273, Rarity.RARE, mage.cards.s.SylvanLibrary.class)); cards.add(new SetCardInfo("Thicket Basilisk", 274, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); + cards.add(new SetCardInfo("Timber Wolves", 275, Rarity.RARE, mage.cards.t.TimberWolves.class)); cards.add(new SetCardInfo("Titania's Song", 276, Rarity.RARE, mage.cards.t.TitaniasSong.class)); cards.add(new SetCardInfo("Tranquility", 277, Rarity.COMMON, mage.cards.t.Tranquility.class)); cards.add(new SetCardInfo("Tsunami", 278, Rarity.UNCOMMON, mage.cards.t.Tsunami.class)); @@ -299,6 +300,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Animate Wall", 4, Rarity.RARE, mage.cards.a.AnimateWall.class)); cards.add(new SetCardInfo("Armageddon", 5, Rarity.RARE, mage.cards.a.Armageddon.class)); cards.add(new SetCardInfo("Balance", 6, Rarity.RARE, mage.cards.b.Balance.class)); + cards.add(new SetCardInfo("Benalish Hero", 7, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Black Ward", 8, Rarity.UNCOMMON, mage.cards.b.BlackWard.class)); cards.add(new SetCardInfo("Blessing", 9, Rarity.RARE, mage.cards.b.Blessing.class)); cards.add(new SetCardInfo("Blue Ward", 10, Rarity.UNCOMMON, mage.cards.b.BlueWard.class)); @@ -325,6 +327,8 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Karma", 32, Rarity.UNCOMMON, mage.cards.k.Karma.class)); cards.add(new SetCardInfo("Kismet", 33, Rarity.UNCOMMON, mage.cards.k.Kismet.class)); cards.add(new SetCardInfo("Land Tax", 34, Rarity.RARE, mage.cards.l.LandTax.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 35, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); + cards.add(new SetCardInfo("Morale", 36, Rarity.COMMON, mage.cards.m.Morale.class)); cards.add(new SetCardInfo("Northern Paladin", 37, Rarity.RARE, mage.cards.n.NorthernPaladin.class)); cards.add(new SetCardInfo("Osai Vultures", 38, Rarity.UNCOMMON, mage.cards.o.OsaiVultures.class)); cards.add(new SetCardInfo("Pearled Unicorn", 39, Rarity.COMMON, mage.cards.p.PearledUnicorn.class)); @@ -376,6 +380,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Glasses of Urza", 321, Rarity.UNCOMMON, mage.cards.g.GlassesOfUrza.class)); cards.add(new SetCardInfo("Grapeshot Catapult", 322, Rarity.COMMON, mage.cards.g.GrapeshotCatapult.class)); cards.add(new SetCardInfo("Green Mana Battery", 323, Rarity.RARE, mage.cards.g.GreenManaBattery.class)); + cards.add(new SetCardInfo("Helm of Chatzuk", 324, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); cards.add(new SetCardInfo("Howling Mine", 325, Rarity.RARE, mage.cards.h.HowlingMine.class)); cards.add(new SetCardInfo("Iron Star", 326, Rarity.UNCOMMON, mage.cards.i.IronStar.class)); cards.add(new SetCardInfo("Ivory Cup", 327, Rarity.UNCOMMON, mage.cards.i.IvoryCup.class)); @@ -410,6 +415,5 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Winter Orb", 358, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wooden Sphere", 359, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); cards.add(new SetCardInfo("Yotian Soldier", 360, Rarity.COMMON, mage.cards.y.YotianSoldier.class)); - cards.add(new SetCardInfo("Morale", 36, Rarity.COMMON, mage.cards.m.Morale.class)); } } From 239fbc12bfbabc543ba90da15a796ff6919573f3 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:40:47 +0000 Subject: [PATCH 21/77] Implemented cards --- Mage.Sets/src/mage/sets/FifthEdition.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage.Sets/src/mage/sets/FifthEdition.java b/Mage.Sets/src/mage/sets/FifthEdition.java index 244e1875feb..c989c1fe348 100644 --- a/Mage.Sets/src/mage/sets/FifthEdition.java +++ b/Mage.Sets/src/mage/sets/FifthEdition.java @@ -62,6 +62,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Ball Lightning", 210, Rarity.RARE, mage.cards.b.BallLightning.class)); cards.add(new SetCardInfo("Barbed Sextant", 351, Rarity.COMMON, mage.cards.b.BarbedSextant.class)); cards.add(new SetCardInfo("Barl's Cage", 352, Rarity.RARE, mage.cards.b.BarlsCage.class)); + cards.add(new SetCardInfo("Benalish Hero", 286, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Binding Grasp", 74, Rarity.UNCOMMON, mage.cards.b.BindingGrasp.class)); cards.add(new SetCardInfo("Bird Maiden", 211, Rarity.COMMON, mage.cards.b.BirdMaiden.class)); cards.add(new SetCardInfo("Birds of Paradise", 142, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); @@ -205,6 +206,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Heal", 308, Rarity.COMMON, mage.cards.h.Heal.class)); cards.add(new SetCardInfo("Healing Salve", 309, Rarity.COMMON, mage.cards.h.HealingSalve.class)); cards.add(new SetCardInfo("Hecatomb", 29, Rarity.RARE, mage.cards.h.Hecatomb.class)); + cards.add(new SetCardInfo("Helm of Chatzuk", 376, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); cards.add(new SetCardInfo("Hill Giant", 239, Rarity.COMMON, mage.cards.h.HillGiant.class)); cards.add(new SetCardInfo("Hollow Trees", 422, Rarity.RARE, mage.cards.h.HollowTrees.class)); cards.add(new SetCardInfo("Holy Strength", 311, Rarity.COMMON, mage.cards.h.HolyStrength.class)); @@ -281,6 +283,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Memory Lapse", 103, Rarity.COMMON, mage.cards.m.MemoryLapse.class)); cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 104, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); cards.add(new SetCardInfo("Mesa Falcon", 322, Rarity.COMMON, MesaFalcon.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 323, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Millstone", 390, Rarity.RARE, mage.cards.m.Millstone.class)); cards.add(new SetCardInfo("Mind Bomb", 105, Rarity.UNCOMMON, mage.cards.m.MindBomb.class)); cards.add(new SetCardInfo("Mind Ravel", 38, Rarity.COMMON, mage.cards.m.MindRavel.class)); From 22df8585108e119d4db8d890a24ecb233d6c3292 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:41:09 +0000 Subject: [PATCH 22/77] Implemented cards --- Mage.Sets/src/mage/sets/MastersEdition.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/MastersEdition.java b/Mage.Sets/src/mage/sets/MastersEdition.java index c0c6451fead..accc77319bf 100644 --- a/Mage.Sets/src/mage/sets/MastersEdition.java +++ b/Mage.Sets/src/mage/sets/MastersEdition.java @@ -81,6 +81,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Ball Lightning", 87, Rarity.RARE, mage.cards.b.BallLightning.class)); cards.add(new SetCardInfo("Baron Sengir", 58, Rarity.RARE, mage.cards.b.BaronSengir.class)); cards.add(new SetCardInfo("Basal Thrull", 59, Rarity.COMMON, BasalThrull.class)); + cards.add(new SetCardInfo("Benalish Hero", 5, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Berserk", 114, Rarity.RARE, mage.cards.b.Berserk.class)); cards.add(new SetCardInfo("Black Knight", 60, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); cards.add(new SetCardInfo("Blight", 61, Rarity.UNCOMMON, mage.cards.b.Blight.class)); @@ -166,6 +167,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Lord of Tresserhorn", 149, Rarity.RARE, mage.cards.l.LordOfTresserhorn.class)); cards.add(new SetCardInfo("Mana Flare", 103, Rarity.RARE, mage.cards.m.ManaFlare.class)); cards.add(new SetCardInfo("Marton Stromgald", 104, Rarity.RARE, mage.cards.m.MartonStromgald.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 20, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Mindstab Thrull", 76, Rarity.COMMON, MindstabThrull.class)); cards.add(new SetCardInfo("Mirror Universe", 159, Rarity.RARE, mage.cards.m.MirrorUniverse.class)); cards.add(new SetCardInfo("Mishra's Factory", 178, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class)); From 1694922ef711d3d8f7ac7617b1267eccade3719f Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 00:45:15 +0000 Subject: [PATCH 23/77] Text edit --- Mage.Sets/src/mage/cards/w/WallOfVapor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/w/WallOfVapor.java b/Mage.Sets/src/mage/cards/w/WallOfVapor.java index 59beaf7cb0d..cd7fbe24469 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfVapor.java +++ b/Mage.Sets/src/mage/cards/w/WallOfVapor.java @@ -58,7 +58,7 @@ public class WallOfVapor extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); - // Flying + // Defender this.addAbility(DefenderAbility.getInstance()); // Prevent all damage that would be dealt to Wall of Vapor by creatures it's blocking. From 868b9d82fe28037cae15bfa62cbdeee411f28fc9 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 07:33:34 +0000 Subject: [PATCH 24/77] Fixed General Jarkeld --- .../src/mage/cards/g/GeneralJarkeld.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java b/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java index 703c8bb537e..467d55a9015 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java +++ b/Mage.Sets/src/mage/cards/g/GeneralJarkeld.java @@ -119,12 +119,16 @@ class GeneralJarkeldSwitchBlockersEffect extends OneShotEffect { if (blocker != null) { if (game.getCombat().blockingGroupsContains(blocker.getId())) { // if (blocker.getBlocking() > 1) { for (CombatGroup group : game.getCombat().getBlockingGroups()) { - if (group.getAttackers().size() > 1) { - multiBlockers.add(blocker); + if (group.getBlockers().contains(blocker.getId())) { + int attackerCount = group.getAttackers().size(); + if (attackerCount > 1) { + multiBlockers.add(blocker); + } else if (attackerCount == 1) { + blockers1.add(blocker); + } continue blockerSearch1; } } - blockers1.add(blocker); // this should not happen } else { blockers1.add(blocker); } @@ -137,12 +141,16 @@ class GeneralJarkeldSwitchBlockersEffect extends OneShotEffect { if (blocker != null) { if (game.getCombat().blockingGroupsContains(blocker.getId())) { // if (blocker.getBlocking() > 1) { for (CombatGroup group : game.getCombat().getBlockingGroups()) { - if (group.getAttackers().size() > 1) { - multiBlockers.add(blocker); + if (group.getBlockers().contains(blocker.getId())) { + int attackerCount = group.getAttackers().size(); + if (attackerCount > 1) { + multiBlockers.add(blocker); + } else if (attackerCount == 1) { + blockers2.add(blocker); + } continue blockerSearch2; } } - blockers2.add(blocker); // this should not happen } else { blockers2.add(blocker); } From cb63931d35a54648df29127b977a787c832a12f0 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 15:26:03 +0000 Subject: [PATCH 25/77] Adjusted banding arrow position --- Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java index ae9d28ea134..370faa19929 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java @@ -44,7 +44,7 @@ public final class ArrowUtil { if (permanent != null) { Point target = permanent.getLocationOnScreen(); target.translate(-parentPoint.x, -parentPoint.y); - ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 35, (int) me.getY(), (int) target.getX() + 40, (int) target.getY() + 10, Color.yellow, ArrowBuilder.Type.BANDED); + ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 65, (int) me.getY() + 25, (int) target.getX() + 70, (int) target.getY() + 35, Color.yellow, ArrowBuilder.Type.BANDED); } } } From f0ab1575f9dbc1d6951b1d7de2b759cb519f49da Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 15:27:01 +0000 Subject: [PATCH 26/77] Banding arrow fix --- Mage.Common/src/main/java/mage/view/CardView.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Mage.Common/src/main/java/mage/view/CardView.java b/Mage.Common/src/main/java/mage/view/CardView.java index a0647757a76..d9154f7418c 100644 --- a/Mage.Common/src/main/java/mage/view/CardView.java +++ b/Mage.Common/src/main/java/mage/view/CardView.java @@ -27,6 +27,8 @@ */ package mage.view; +import java.util.*; +import java.util.stream.Collectors; import mage.MageObject; import mage.ObjectColor; import mage.abilities.Abilities; @@ -51,9 +53,6 @@ import mage.target.Target; import mage.target.Targets; import mage.util.SubTypeList; -import java.util.*; -import java.util.stream.Collectors; - /** * @author BetaSteward_at_googlemail.com */ @@ -354,16 +353,16 @@ public class CardView extends SimpleCardView { if (game != null) { if (permanent.getCounters(game) != null && !permanent.getCounters(game).isEmpty()) { this.loyalty = Integer.toString(permanent.getCounters(game).getCount(CounterType.LOYALTY)); - this.pairedCard = permanent.getPairedCard() != null ? permanent.getPairedCard().getSourceId() : null; - this.bandedCards = new ArrayList<>(); - for (UUID bandedCard : permanent.getBandedCards()) { - bandedCards.add(bandedCard); - } counters = new ArrayList<>(); for (Counter counter : permanent.getCounters(game).values()) { counters.add(new CounterView(counter)); } } + this.pairedCard = permanent.getPairedCard() != null ? permanent.getPairedCard().getSourceId() : null; + this.bandedCards = new ArrayList<>(); + for (UUID bandedCard : permanent.getBandedCards()) { + bandedCards.add(bandedCard); + } if (!permanent.getControllerId().equals(permanent.getOwnerId())) { controlledByOwner = false; } From 773b9ea8f78ad809828dffc4192bd4b53b1fe652 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:11:48 +0000 Subject: [PATCH 27/77] Implemented Battering Ram --- Mage.Sets/src/mage/cards/b/BatteringRam.java | 86 ++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BatteringRam.java diff --git a/Mage.Sets/src/mage/cards/b/BatteringRam.java b/Mage.Sets/src/mage/cards/b/BatteringRam.java new file mode 100644 index 00000000000..7ffce8eac0c --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BatteringRam.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author L_J + */ +public class BatteringRam extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wall"); + + static { + filter.add(new SubtypePredicate(SubType.WALL)); + } + + public BatteringRam(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT,CardType.CREATURE}, "{2}"); + this.subtype.add(SubType.CONSTRUCT); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of combat on your turn, Battering Ram gains banding until end of combat. + this.addAbility(new BeginningOfCombatTriggeredAbility(new GainAbilitySourceEffect(BandingAbility.getInstance(), Duration.EndOfCombat), TargetController.YOU, false)); + + // Whenever Battering Ram becomes blocked by a Wall, destroy that Wall at end of combat. + Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); + effect.setText("destroy that Wall at end of combat"); + this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); + } + + public BatteringRam(final BatteringRam card) { + super(card); + } + + @Override + public BatteringRam copy() { + return new BatteringRam(this); + } +} From 343028a2949908b0baa402af54155f4e0602fa9a Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:12:48 +0000 Subject: [PATCH 28/77] Implemented Beast Walkers --- Mage.Sets/src/mage/cards/b/BeastWalkers.java | 72 ++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BeastWalkers.java diff --git a/Mage.Sets/src/mage/cards/b/BeastWalkers.java b/Mage.Sets/src/mage/cards/b/BeastWalkers.java new file mode 100644 index 00000000000..2b5ab973510 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BeastWalkers.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author L_J + */ +public class BeastWalkers extends CardImpl { + + public BeastWalkers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {G}: Beast Walkers gains banding until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(BandingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}"))); + } + + public BeastWalkers(final BeastWalkers card) { + super(card); + } + + @Override + public BeastWalkers copy() { + return new BeastWalkers(this); + } + +} From bfd0ffd973b79e9bc8e21249fd4d55cb1c47aec9 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:13:30 +0000 Subject: [PATCH 29/77] Implemented Benalish Infantry --- .../src/mage/cards/b/BenalishInfantry.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BenalishInfantry.java diff --git a/Mage.Sets/src/mage/cards/b/BenalishInfantry.java b/Mage.Sets/src/mage/cards/b/BenalishInfantry.java new file mode 100644 index 00000000000..d528ee4d296 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BenalishInfantry.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class BenalishInfantry extends CardImpl { + + public BenalishInfantry (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public BenalishInfantry (final BenalishInfantry card) { + super(card); + } + + @Override + public BenalishInfantry copy() { + return new BenalishInfantry(this); + } + +} From d91b07a2b8cad3139fc0730eab424e97b7e46d19 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:14:10 +0000 Subject: [PATCH 30/77] Implemented Cooperation --- Mage.Sets/src/mage/cards/c/Cooperation.java | 77 +++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/Cooperation.java diff --git a/Mage.Sets/src/mage/cards/c/Cooperation.java b/Mage.Sets/src/mage/cards/c/Cooperation.java new file mode 100644 index 00000000000..33bbb2f37f2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Cooperation.java @@ -0,0 +1,77 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class Cooperation extends CardImpl { + + public Cooperation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has banding. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(BandingAbility.getInstance(), AttachmentType.AURA))); + } + + public Cooperation(final Cooperation card) { + super(card); + } + + @Override + public Cooperation copy() { + return new Cooperation(this); + } + +} From 59d72edd8fb1b5d30a164cdcf141a25bbc4361f3 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:14:54 +0000 Subject: [PATCH 31/77] Implemented Dire Wolves --- Mage.Sets/src/mage/cards/d/DireWolves.java | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DireWolves.java diff --git a/Mage.Sets/src/mage/cards/d/DireWolves.java b/Mage.Sets/src/mage/cards/d/DireWolves.java new file mode 100644 index 00000000000..68afc3082cb --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireWolves.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author L_J + */ +public class DireWolves extends CardImpl { + + private static final String rule = "{this} has banding as long as you control a Plains."; + private static final FilterLandPermanent filter = new FilterLandPermanent("a Plains"); + + static { + filter.add(new SubtypePredicate(SubType.PLAINS)); + } + + public DireWolves(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + this.subtype.add(SubType.WOLF); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Dire Wolves has banding as long as you control a Plains. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(new BandingAbility()), new PermanentsOnTheBattlefieldCondition(filter), rule))); + } + + public DireWolves(final DireWolves card) { + super(card); + } + + @Override + public DireWolves copy() { + return new DireWolves(this); + } +} From cb5ec35de67c03dc29e17ab44bc58aaf104adee4 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:15:39 +0000 Subject: [PATCH 32/77] Implemented Formation --- Mage.Sets/src/mage/cards/f/Formation.java | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/Formation.java diff --git a/Mage.Sets/src/mage/cards/f/Formation.java b/Mage.Sets/src/mage/cards/f/Formation.java new file mode 100644 index 00000000000..2a629ad808f --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Formation.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class Formation extends CardImpl { + + public Formation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); + + // Target creature gains banding until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(BandingAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public Formation(final Formation card) { + super(card); + } + + @Override + public Formation copy() { + return new Formation(this); + } +} From 972d9d42dd995b443fdf9d8ae14cc6b292cc700b Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:17:05 +0000 Subject: [PATCH 33/77] Implemented Fortified Area --- Mage.Sets/src/mage/cards/f/FortifiedArea.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FortifiedArea.java diff --git a/Mage.Sets/src/mage/cards/f/FortifiedArea.java b/Mage.Sets/src/mage/cards/f/FortifiedArea.java new file mode 100644 index 00000000000..4ee704d1172 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FortifiedArea.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author L_J + */ +public class FortifiedArea extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wall creatures"); + + static { + filter.add(new SubtypePredicate(SubType.WALL)); + } + + public FortifiedArea(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}"); + + // Wall creatures you control get +1/+0 and have banding. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter)); + Effect effect = new GainAbilityControlledEffect(BandingAbility.getInstance(), Duration.WhileOnBattlefield, filter); + effect.setText("and have banding"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public FortifiedArea(final FortifiedArea card) { + super(card); + } + + @Override + public FortifiedArea copy() { + return new FortifiedArea(this); + } +} From 3d0b9a09b23c25ae6a79225340ebb838daf1aefb Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:17:51 +0000 Subject: [PATCH 34/77] Implemented Icatian Phalanx --- .../src/mage/cards/i/IcatianPhalanx.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/IcatianPhalanx.java diff --git a/Mage.Sets/src/mage/cards/i/IcatianPhalanx.java b/Mage.Sets/src/mage/cards/i/IcatianPhalanx.java new file mode 100644 index 00000000000..afee04009a7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IcatianPhalanx.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class IcatianPhalanx extends CardImpl { + + public IcatianPhalanx (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public IcatianPhalanx (final IcatianPhalanx card) { + super(card); + } + + @Override + public IcatianPhalanx copy() { + return new IcatianPhalanx(this); + } + +} From 6fa60cbd900fd53aa04309d41f247b23a635987e Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:18:56 +0000 Subject: [PATCH 35/77] Implemented Kjeldoran Escort --- .../src/mage/cards/k/KjeldoranEscort.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranEscort.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranEscort.java b/Mage.Sets/src/mage/cards/k/KjeldoranEscort.java new file mode 100644 index 00000000000..c3fb41e65f7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranEscort.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class KjeldoranEscort extends CardImpl { + + public KjeldoranEscort (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public KjeldoranEscort (final KjeldoranEscort card) { + super(card); + } + + @Override + public KjeldoranEscort copy() { + return new KjeldoranEscort(this); + } + +} From cbf54c77ad4550efe08e2c006ec85e5d13fc6be4 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:19:27 +0000 Subject: [PATCH 36/77] Implemented Kjeldoran Knight --- .../src/mage/cards/k/KjeldoranKnight.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranKnight.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranKnight.java b/Mage.Sets/src/mage/cards/k/KjeldoranKnight.java new file mode 100644 index 00000000000..c737b8f84aa --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranKnight.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author L_J + */ +public class KjeldoranKnight extends CardImpl { + + public KjeldoranKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Banding + this.addAbility(BandingAbility.getInstance()); + + // {1}{W}: Kjeldoran Knight gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{W}"))); + + // {W}{W}: Kjeldoran Knight gets +0/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 2, Duration.EndOfTurn), new ManaCostsImpl("{W}{W}"))); + } + + public KjeldoranKnight(final KjeldoranKnight card) { + super(card); + } + + @Override + public KjeldoranKnight copy() { + return new KjeldoranKnight(this); + } +} From d4424cb7d121e3e5f809c67eb10ec1adb9b15acc Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:20:04 +0000 Subject: [PATCH 37/77] Implemented Kjeldoran Phalanx --- .../src/mage/cards/k/KjeldoranPhalanx.java | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranPhalanx.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranPhalanx.java b/Mage.Sets/src/mage/cards/k/KjeldoranPhalanx.java new file mode 100644 index 00000000000..679e18446e4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranPhalanx.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class KjeldoranPhalanx extends CardImpl { + + public KjeldoranPhalanx (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public KjeldoranPhalanx (final KjeldoranPhalanx card) { + super(card); + } + + @Override + public KjeldoranPhalanx copy() { + return new KjeldoranPhalanx(this); + } + +} From f1ce0a4b06f3dce116812b20f0f67992c52b9150 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:20:46 +0000 Subject: [PATCH 38/77] Implemented Kjeldoran Skycaptain --- .../src/mage/cards/k/KjeldoranSkycaptain.java | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranSkycaptain.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranSkycaptain.java b/Mage.Sets/src/mage/cards/k/KjeldoranSkycaptain.java new file mode 100644 index 00000000000..c00db93a4f7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranSkycaptain.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class KjeldoranSkycaptain extends CardImpl { + + public KjeldoranSkycaptain (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public KjeldoranSkycaptain (final KjeldoranSkycaptain card) { + super(card); + } + + @Override + public KjeldoranSkycaptain copy() { + return new KjeldoranSkycaptain(this); + } + +} From b30fd0811f4bbe43c22928a062d484fb5601f415 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:21:27 +0000 Subject: [PATCH 39/77] Implemented Kjeldoran Skyknight --- .../src/mage/cards/k/KjeldoranSkyknight.java | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranSkyknight.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranSkyknight.java b/Mage.Sets/src/mage/cards/k/KjeldoranSkyknight.java new file mode 100644 index 00000000000..abafa67e3ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranSkyknight.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class KjeldoranSkyknight extends CardImpl { + + public KjeldoranSkyknight (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public KjeldoranSkyknight (final KjeldoranSkyknight card) { + super(card); + } + + @Override + public KjeldoranSkyknight copy() { + return new KjeldoranSkyknight(this); + } + +} From 43037909af8ececcf48dcb9fca8476e2702b4d78 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:22:06 +0000 Subject: [PATCH 40/77] Implemented Kjeldoran Warrior --- .../src/mage/cards/k/KjeldoranWarrior.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranWarrior.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranWarrior.java b/Mage.Sets/src/mage/cards/k/KjeldoranWarrior.java new file mode 100644 index 00000000000..d038a26ae63 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranWarrior.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class KjeldoranWarrior extends CardImpl { + + public KjeldoranWarrior (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public KjeldoranWarrior (final KjeldoranWarrior card) { + super(card); + } + + @Override + public KjeldoranWarrior copy() { + return new KjeldoranWarrior(this); + } + +} From 0c9ae3467e652c2a9e173e8177cb65bb9a8b5583 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:22:50 +0000 Subject: [PATCH 41/77] Implemented Knights of Thorn --- .../src/mage/cards/k/KnightsOfThorn.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KnightsOfThorn.java diff --git a/Mage.Sets/src/mage/cards/k/KnightsOfThorn.java b/Mage.Sets/src/mage/cards/k/KnightsOfThorn.java new file mode 100644 index 00000000000..50ce756de2e --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnightsOfThorn.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class KnightsOfThorn extends CardImpl { + + public KnightsOfThorn (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Protection from red + this.addAbility(ProtectionAbility.from(ObjectColor.RED)); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public KnightsOfThorn (final KnightsOfThorn card) { + super(card); + } + + @Override + public KnightsOfThorn copy() { + return new KnightsOfThorn(this); + } + +} From bfc09e255f4423730ba71537ce0e7f6673fa5394 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:23:50 +0000 Subject: [PATCH 42/77] Implemented Mishra's War Machine --- .../src/mage/cards/m/MishrasWarMachine.java | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MishrasWarMachine.java diff --git a/Mage.Sets/src/mage/cards/m/MishrasWarMachine.java b/Mage.Sets/src/mage/cards/m/MishrasWarMachine.java new file mode 100644 index 00000000000..8b36cf97ffc --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MishrasWarMachine.java @@ -0,0 +1,113 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.BandingAbility; +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.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth & L_J + */ +public class MishrasWarMachine extends CardImpl { + + public MishrasWarMachine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); + this.subtype.add(SubType.JUGGERNAUT); + + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Banding + this.addAbility(BandingAbility.getInstance()); + + // At the beginning of your upkeep, Mishra's War Machine deals 3 damage to you unless you discard a card. If Mishra's War Machine deals damage to you this way, tap it. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MishrasWarMachineEffect(), TargetController.YOU, false)); + + } + + public MishrasWarMachine(final MishrasWarMachine card) { + super(card); + } + + @Override + public MishrasWarMachine copy() { + return new MishrasWarMachine(this); + } +} + +class MishrasWarMachineEffect extends OneShotEffect { + + public MishrasWarMachineEffect() { + super(Outcome.Sacrifice); + staticText = "{this} deals 3 damage to you unless you discard a card. If Mishra's War Machine deals damage to you this way, tap it"; + } + + public MishrasWarMachineEffect(final MishrasWarMachineEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null + && sourcePermanent != null) { + DiscardCardCost cost = new DiscardCardCost(); + if (controller.chooseUse(Outcome.Benefit, "Do you wish to discard a card to prevent the 3 damage to you?", source, game) + && cost.canPay(source, source.getSourceId(), source.getControllerId(), game) + && cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return true; + } + if (controller.damage(3, sourcePermanent.getId(), game, false, true) > 0) { + sourcePermanent.tap(game); + return true; + } + } + return false; + } + + @Override + public MishrasWarMachineEffect copy() { + return new MishrasWarMachineEffect(this); + } +} From bb5e538bc74f85e18a506b1afbc0b1268e73e4e6 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:24:31 +0000 Subject: [PATCH 43/77] Implemented Noble Elephant --- Mage.Sets/src/mage/cards/n/NobleElephant.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NobleElephant.java diff --git a/Mage.Sets/src/mage/cards/n/NobleElephant.java b/Mage.Sets/src/mage/cards/n/NobleElephant.java new file mode 100644 index 00000000000..8df238acd35 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NobleElephant.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class NobleElephant extends CardImpl { + + public NobleElephant (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); + this.subtype.add(SubType.ELEPHANT); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public NobleElephant (final NobleElephant card) { + super(card); + } + + @Override + public NobleElephant copy() { + return new NobleElephant(this); + } + +} From 177c3c9e88f2df5129803840f39f6be536f58ada Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:25:13 +0000 Subject: [PATCH 44/77] Implemented Pikemen --- Mage.Sets/src/mage/cards/p/Pikemen.java | 70 +++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/Pikemen.java diff --git a/Mage.Sets/src/mage/cards/p/Pikemen.java b/Mage.Sets/src/mage/cards/p/Pikemen.java new file mode 100644 index 00000000000..e650c47a0f4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/Pikemen.java @@ -0,0 +1,70 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class Pikemen extends CardImpl { + + public Pikemen (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public Pikemen (final Pikemen card) { + super(card); + } + + @Override + public Pikemen copy() { + return new Pikemen(this); + } + +} From d808237589fea95acf8788d038957dbc33cb914d Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:25:48 +0000 Subject: [PATCH 45/77] Implemented Shield Bearer --- Mage.Sets/src/mage/cards/s/ShieldBearer.java | 66 ++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ShieldBearer.java diff --git a/Mage.Sets/src/mage/cards/s/ShieldBearer.java b/Mage.Sets/src/mage/cards/s/ShieldBearer.java new file mode 100644 index 00000000000..818f85fc83d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShieldBearer.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class ShieldBearer extends CardImpl { + + public ShieldBearer (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public ShieldBearer (final ShieldBearer card) { + super(card); + } + + @Override + public ShieldBearer copy() { + return new ShieldBearer(this); + } + +} From 47e2ed842af1f6c11ce856537288c65d70d8ffc2 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:26:40 +0000 Subject: [PATCH 46/77] Implemented Teremko Griffin --- .../src/mage/cards/t/TeremkoGriffin.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TeremkoGriffin.java diff --git a/Mage.Sets/src/mage/cards/t/TeremkoGriffin.java b/Mage.Sets/src/mage/cards/t/TeremkoGriffin.java new file mode 100644 index 00000000000..c74e9a1d402 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TeremkoGriffin.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class TeremkoGriffin extends CardImpl { + + public TeremkoGriffin (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); + this.subtype.add(SubType.GRIFFIN); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public TeremkoGriffin (final TeremkoGriffin card) { + super(card); + } + + @Override + public TeremkoGriffin copy() { + return new TeremkoGriffin(this); + } + +} From 7ef725d2cdada3f7eba9e36e80f5b6c0b26d3eeb Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:28:12 +0000 Subject: [PATCH 47/77] Implemented Urza's Avenger --- Mage.Sets/src/mage/cards/u/UrzasAvenger.java | 143 +++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/u/UrzasAvenger.java diff --git a/Mage.Sets/src/mage/cards/u/UrzasAvenger.java b/Mage.Sets/src/mage/cards/u/UrzasAvenger.java new file mode 100644 index 00000000000..e16b83fa6a4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UrzasAvenger.java @@ -0,0 +1,143 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.u; + +import java.util.HashSet; +import java.util.Set; +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.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author Styxo & L_J + */ +public class UrzasAvenger extends CardImpl { + + public UrzasAvenger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT,CardType.CREATURE}, "{6}"); + + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {0}: Urza's Avenger gets -1/-1 and gains your choice of banding, flying, first strike, or trample until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UrzasAvengerEffect(), new ManaCostsImpl("{0}"))); + } + + public UrzasAvenger(final UrzasAvenger card) { + super(card); + } + + @Override + public UrzasAvenger copy() { + return new UrzasAvenger(this); + } +} + +class UrzasAvengerEffect extends ContinuousEffectImpl { + + private static final Set choices = new HashSet<>(); + private Ability gainedAbility; + + static { + choices.add("Banding"); + choices.add("Flying"); + choices.add("First strike"); + choices.add("Trample"); + } + + public UrzasAvengerEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.AddAbility); + this.staticText = "{this} gets -1/-1 and gains your choice of banding, flying, first strike, or trample until end of turn"; + } + + public UrzasAvengerEffect(final UrzasAvengerEffect effect) { + super(effect); + } + + @Override + public UrzasAvengerEffect copy() { + return new UrzasAvengerEffect(this); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Choose one"); + choice.setChoices(choices); + if (controller.choose(outcome, choice, game)) { + switch (choice.getChoice()) { + case "Banding": + gainedAbility = BandingAbility.getInstance(); + break; + case "Flying": + gainedAbility = FlyingAbility.getInstance(); + break; + case "First strike": + gainedAbility = FirstStrikeAbility.getInstance(); + break; + default: + gainedAbility = TrampleAbility.getInstance(); + break; + } + } + } + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourceObject = game.getPermanent(source.getSourceId()); + if (sourceObject != null) { + sourceObject.addPower(-1); + sourceObject.addToughness(-1); + game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.EndOfTurn), source); + return true; + } + return false; + } +} From e0595d3484c3bfa7a5888e138302a0b6918357e3 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:29:13 +0000 Subject: [PATCH 48/77] Implemented Volunteer Reserves --- .../src/mage/cards/v/VolunteerReserves.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VolunteerReserves.java diff --git a/Mage.Sets/src/mage/cards/v/VolunteerReserves.java b/Mage.Sets/src/mage/cards/v/VolunteerReserves.java new file mode 100644 index 00000000000..8bb22fab5ba --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VolunteerReserves.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class VolunteerReserves extends CardImpl { + + public VolunteerReserves (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Banding + this.addAbility(BandingAbility.getInstance()); + + // Cumulative upkeep-Pay {1}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + } + + public VolunteerReserves (final VolunteerReserves card) { + super(card); + } + + @Override + public VolunteerReserves copy() { + return new VolunteerReserves(this); + } + +} From 09e4c17189dc68aec4f5d8d4f144f6248f526cb9 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:29:50 +0000 Subject: [PATCH 49/77] Implemented Wall of Shields --- Mage.Sets/src/mage/cards/w/WallOfShields.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WallOfShields.java diff --git a/Mage.Sets/src/mage/cards/w/WallOfShields.java b/Mage.Sets/src/mage/cards/w/WallOfShields.java new file mode 100644 index 00000000000..2d3a6737568 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WallOfShields.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class WallOfShields extends CardImpl { + + public WallOfShields (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); + this.subtype.add(SubType.WALL); + + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public WallOfShields (final WallOfShields card) { + super(card); + } + + @Override + public WallOfShields copy() { + return new WallOfShields(this); + } + +} From f22a944e43e10d5b2f0cabaeefb93cf57f5c4392 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:30:23 +0000 Subject: [PATCH 50/77] Implemented War Elephant --- Mage.Sets/src/mage/cards/w/WarElephant.java | 69 +++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WarElephant.java diff --git a/Mage.Sets/src/mage/cards/w/WarElephant.java b/Mage.Sets/src/mage/cards/w/WarElephant.java new file mode 100644 index 00000000000..df15582a75d --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WarElephant.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class WarElephant extends CardImpl { + + public WarElephant (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); + this.subtype.add(SubType.ELEPHANT); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Banding + this.addAbility(BandingAbility.getInstance()); + } + + public WarElephant (final WarElephant card) { + super(card); + } + + @Override + public WarElephant copy() { + return new WarElephant(this); + } + +} From 164d79ebebe71b16fd57524b690c96306915ea2b Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:36:04 +0000 Subject: [PATCH 51/77] Implemented cards --- Mage.Sets/src/mage/sets/Antiquities.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Antiquities.java b/Mage.Sets/src/mage/sets/Antiquities.java index ecf767f9fc1..e64f3108eaa 100644 --- a/Mage.Sets/src/mage/sets/Antiquities.java +++ b/Mage.Sets/src/mage/sets/Antiquities.java @@ -65,6 +65,7 @@ public class Antiquities extends ExpansionSet { cards.add(new SetCardInfo("Ashnod's Battle Gear", 4, Rarity.UNCOMMON, mage.cards.a.AshnodsBattleGear.class)); cards.add(new SetCardInfo("Ashnod's Transmogrant", 5, Rarity.UNCOMMON, mage.cards.a.AshnodsTransmogrant.class)); cards.add(new SetCardInfo("Atog", 88, Rarity.COMMON, mage.cards.a.Atog.class)); + cards.add(new SetCardInfo("Battering Ram", 6, Rarity.COMMON, mage.cards.b.BatteringRam.class)); cards.add(new SetCardInfo("Candelabra of Tawnos", 8, Rarity.RARE, mage.cards.c.CandelabraOfTawnos.class)); cards.add(new SetCardInfo("Circle of Protection: Artifacts", 97, Rarity.COMMON, mage.cards.c.CircleOfProtectionArtifacts.class)); cards.add(new SetCardInfo("Citanul Druid", 61, Rarity.UNCOMMON, mage.cards.c.CitanulDruid.class)); @@ -97,6 +98,7 @@ public class Antiquities extends ExpansionSet { cards.add(new SetCardInfo("Mishra's Factory", 67, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mishra's Factory", 68, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mishra's Factory", 69, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mishra's War Machine", 22, Rarity.RARE, mage.cards.m.MishrasWarMachine.class)); cards.add(new SetCardInfo("Mishra's Workshop", 70, Rarity.RARE, mage.cards.m.MishrasWorkshop.class)); cards.add(new SetCardInfo("Obelisk of Undoing", 23, Rarity.RARE, mage.cards.o.ObeliskOfUndoing.class)); cards.add(new SetCardInfo("Onulet", 24, Rarity.UNCOMMON, mage.cards.o.Onulet.class)); @@ -128,6 +130,7 @@ public class Antiquities extends ExpansionSet { cards.add(new SetCardInfo("Titania's Song", 65, Rarity.UNCOMMON, mage.cards.t.TitaniasSong.class)); cards.add(new SetCardInfo("Transmute Artifact", 58, Rarity.UNCOMMON, mage.cards.t.TransmuteArtifact.class)); cards.add(new SetCardInfo("Triskelion", 38, Rarity.RARE, mage.cards.t.Triskelion.class)); + cards.add(new SetCardInfo("Urza's Avenger", 39, Rarity.RARE, mage.cards.u.UrzasAvenger.class)); cards.add(new SetCardInfo("Urza's Chalice", 40, Rarity.COMMON, mage.cards.u.UrzasChalice.class)); cards.add(new SetCardInfo("Urza's Mine", 75, Rarity.UNCOMMON, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Urza's Mine", 76, Rarity.UNCOMMON, mage.cards.u.UrzasMine.class, NON_FULL_USE_VARIOUS)); From f508341648b883ae25f1714acc1691f841a17eed Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:38:23 +0000 Subject: [PATCH 52/77] Implemented cards --- Mage.Sets/src/mage/sets/ArabianNights.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/ArabianNights.java b/Mage.Sets/src/mage/sets/ArabianNights.java index ea52d56edc4..4ad6b42eaab 100644 --- a/Mage.Sets/src/mage/sets/ArabianNights.java +++ b/Mage.Sets/src/mage/sets/ArabianNights.java @@ -143,6 +143,8 @@ public class ArabianNights extends ExpansionSet { cards.add(new SetCardInfo("Stone-Throwing Devils", 14, Rarity.COMMON, StoneThrowingDevils.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Stone-Throwing Devils", 15, Rarity.COMMON, StoneThrowingDevils.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Unstable Mutation", 28, Rarity.COMMON, mage.cards.u.UnstableMutation.class)); + cards.add(new SetCardInfo("War Elephant", 68, Rarity.COMMON, mage.cards.w.WarElephant.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("War Elephant", 69, Rarity.COMMON, mage.cards.w.WarElephant.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Wyluli Wolf", 40, Rarity.COMMON, mage.cards.w.WyluliWolf.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Wyluli Wolf", 41, Rarity.COMMON, mage.cards.w.WyluliWolf.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ydwen Efreet", 54, Rarity.RARE, mage.cards.y.YdwenEfreet.class)); From 07b07d1bcfe893db1be6a9b8cb0bd944eeb190e2 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:41:03 +0000 Subject: [PATCH 53/77] Implemented cards --- Mage.Sets/src/mage/sets/TheDark.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/TheDark.java b/Mage.Sets/src/mage/sets/TheDark.java index 3cca00f1742..4fe90148e64 100644 --- a/Mage.Sets/src/mage/sets/TheDark.java +++ b/Mage.Sets/src/mage/sets/TheDark.java @@ -109,6 +109,7 @@ public class TheDark extends ExpansionSet { cards.add(new SetCardInfo("Holy Light", 83, Rarity.COMMON, mage.cards.h.HolyLight.class)); cards.add(new SetCardInfo("Inferno", 70, Rarity.RARE, mage.cards.i.Inferno.class)); cards.add(new SetCardInfo("Inquisition", 9, Rarity.COMMON, mage.cards.i.Inquisition.class)); + cards.add(new SetCardInfo("Knights of Thorn", 84, Rarity.RARE, mage.cards.k.KnightsOfThorn.class)); cards.add(new SetCardInfo("Land Leeches", 42, Rarity.COMMON, mage.cards.l.LandLeeches.class)); cards.add(new SetCardInfo("Leviathan", 29, Rarity.RARE, mage.cards.l.Leviathan.class)); cards.add(new SetCardInfo("Living Armor", 101, Rarity.UNCOMMON, mage.cards.l.LivingArmor.class)); @@ -129,6 +130,7 @@ public class TheDark extends ExpansionSet { cards.add(new SetCardInfo("Niall Silvain", 45, Rarity.RARE, mage.cards.n.NiallSilvain.class)); cards.add(new SetCardInfo("Orc General", 72, Rarity.UNCOMMON, mage.cards.o.OrcGeneral.class)); cards.add(new SetCardInfo("People of the Woods", 46, Rarity.UNCOMMON, mage.cards.p.PeopleOfTheWoods.class)); + cards.add(new SetCardInfo("Pikemen", 88, Rarity.COMMON, mage.cards.p.Pikemen.class)); cards.add(new SetCardInfo("Preacher", 89, Rarity.RARE, mage.cards.p.Preacher.class)); cards.add(new SetCardInfo("Psychic Allergy", 33, Rarity.RARE, mage.cards.p.PsychicAllergy.class)); cards.add(new SetCardInfo("Rag Man", 13, Rarity.RARE, mage.cards.r.RagMan.class)); From d265fb20f5af7e456357be2ee16bf8b05e0142fd Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:42:17 +0000 Subject: [PATCH 54/77] Implemented cards --- Mage.Sets/src/mage/sets/Legends.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/Legends.java b/Mage.Sets/src/mage/sets/Legends.java index 8ec19606aaa..5e4861ca68e 100644 --- a/Mage.Sets/src/mage/sets/Legends.java +++ b/Mage.Sets/src/mage/sets/Legends.java @@ -125,6 +125,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Flash Flood", 57, Rarity.COMMON, mage.cards.f.FlashFlood.class)); cards.add(new SetCardInfo("Floral Spuzzem", 101, Rarity.UNCOMMON, mage.cards.f.FloralSpuzzem.class)); cards.add(new SetCardInfo("Force Spike", 58, Rarity.COMMON, mage.cards.f.ForceSpike.class)); + cards.add(new SetCardInfo("Fortified Area", 183, Rarity.UNCOMMON, mage.cards.f.FortifiedArea.class)); cards.add(new SetCardInfo("Frost Giant", 146, Rarity.UNCOMMON, mage.cards.f.FrostGiant.class)); cards.add(new SetCardInfo("Gabriel Angelfire", 266, Rarity.RARE, mage.cards.g.GabrielAngelfire.class)); cards.add(new SetCardInfo("Gaseous Form", 59, Rarity.COMMON, mage.cards.g.GaseousForm.class)); From a1cdedd37274161fb6080e8a88c0a98703502f41 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:43:55 +0000 Subject: [PATCH 55/77] Implemented cards --- Mage.Sets/src/mage/sets/RevisedEdition.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/RevisedEdition.java b/Mage.Sets/src/mage/sets/RevisedEdition.java index dc011b70e35..a798e9d1fcd 100644 --- a/Mage.Sets/src/mage/sets/RevisedEdition.java +++ b/Mage.Sets/src/mage/sets/RevisedEdition.java @@ -192,6 +192,7 @@ public class RevisedEdition extends ExpansionSet { cards.add(new SetCardInfo("Mijae Djinn", 165, Rarity.RARE, mage.cards.m.MijaeDjinn.class)); cards.add(new SetCardInfo("Millstone", 265, Rarity.RARE, mage.cards.m.Millstone.class)); cards.add(new SetCardInfo("Mind Twist", 25, Rarity.RARE, mage.cards.m.MindTwist.class)); + cards.add(new SetCardInfo("Mishra's War Machine", 266, Rarity.RARE, mage.cards.m.MishrasWarMachine.class)); cards.add(new SetCardInfo("Mons's Goblin Raiders", 166, Rarity.COMMON, mage.cards.m.MonssGoblinRaiders.class)); cards.add(new SetCardInfo("Mountain", 290, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 291, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); From 62935b0ebbf839a9bea5afee4830be9641c57485 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:45:40 +0000 Subject: [PATCH 56/77] Implemented cards --- Mage.Sets/src/mage/sets/FallenEmpires.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/FallenEmpires.java b/Mage.Sets/src/mage/sets/FallenEmpires.java index e5e1a597ba4..f167b0ecbcd 100644 --- a/Mage.Sets/src/mage/sets/FallenEmpires.java +++ b/Mage.Sets/src/mage/sets/FallenEmpires.java @@ -182,6 +182,7 @@ public class FallenEmpires extends ExpansionSet { cards.add(new SetCardInfo("Icatian Moneychanger", 152, Rarity.COMMON, IcatianMoneychanger.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Icatian Moneychanger", 153, Rarity.COMMON, IcatianMoneychanger.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Icatian Moneychanger", 154, Rarity.COMMON, IcatianMoneychanger.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Icatian Phalanx", 155, Rarity.UNCOMMON, mage.cards.i.IcatianPhalanx.class)); cards.add(new SetCardInfo("Icatian Priest", 156, Rarity.UNCOMMON, mage.cards.i.IcatianPriest.class)); cards.add(new SetCardInfo("Icatian Scout", 157, Rarity.COMMON, IcatianScout.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Icatian Scout", 158, Rarity.COMMON, IcatianScout.class, NON_FULL_USE_VARIOUS)); From 214cfed8ac82e80694b06e94c3db5dffef4988d6 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:48:01 +0000 Subject: [PATCH 57/77] Implemented cards --- Mage.Sets/src/mage/sets/Homelands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java index 040b4010418..b38a7f5e8de 100644 --- a/Mage.Sets/src/mage/sets/Homelands.java +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -92,6 +92,7 @@ public class Homelands extends ExpansionSet { cards.add(new SetCardInfo("Aysen Highway", 107, Rarity.RARE, mage.cards.a.AysenHighway.class)); cards.add(new SetCardInfo("Baki's Curse", 27, Rarity.RARE, mage.cards.b.BakisCurse.class)); cards.add(new SetCardInfo("Baron Sengir", 1, Rarity.RARE, mage.cards.b.BaronSengir.class)); + cards.add(new SetCardInfo("Beast Walkers", 108, Rarity.RARE, mage.cards.b.BeastWalkers.class)); cards.add(new SetCardInfo("Black Carriage", 2, Rarity.RARE, mage.cards.b.BlackCarriage.class)); cards.add(new SetCardInfo("Broken Visage", 3, Rarity.RARE, mage.cards.b.BrokenVisage.class)); cards.add(new SetCardInfo("Carapace", 54, Rarity.COMMON, mage.cards.c.Carapace.class, NON_FULL_USE_VARIOUS)); From 87736543f3ca398dd3d24ef5e88126b5ddb0dabf Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:53:06 +0000 Subject: [PATCH 58/77] Implemented cards --- Mage.Sets/src/mage/sets/IceAge.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index 2d0f531bcdb..6616454b1e7 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -97,6 +97,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Clairvoyance", 63, Rarity.COMMON, mage.cards.c.Clairvoyance.class)); cards.add(new SetCardInfo("Cold Snap", 241, Rarity.UNCOMMON, mage.cards.c.ColdSnap.class)); cards.add(new SetCardInfo("Conquer", 180, Rarity.UNCOMMON, mage.cards.c.Conquer.class)); + cards.add(new SetCardInfo("Cooperation", 242, Rarity.COMMON, mage.cards.c.Cooperation.class)); cards.add(new SetCardInfo("Counterspell", 64, Rarity.COMMON, mage.cards.c.Counterspell.class)); cards.add(new SetCardInfo("Crown of the Ages", 290, Rarity.RARE, mage.cards.c.CrownOfTheAges.class)); cards.add(new SetCardInfo("Curse of Marit Lage", 181, Rarity.RARE, mage.cards.c.CurseOfMaritLage.class)); @@ -108,6 +109,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Demonic Consultation", 9, Rarity.UNCOMMON, mage.cards.d.DemonicConsultation.class)); cards.add(new SetCardInfo("Despotic Scepter", 291, Rarity.RARE, mage.cards.d.DespoticScepter.class)); cards.add(new SetCardInfo("Diabolic Vision", 362, Rarity.UNCOMMON, mage.cards.d.DiabolicVision.class)); + cards.add(new SetCardInfo("Dire Wolves", 118, Rarity.COMMON, mage.cards.d.DireWolves.class)); cards.add(new SetCardInfo("Disenchant", 244, Rarity.COMMON, mage.cards.d.Disenchant.class)); cards.add(new SetCardInfo("Drift of the Dead", 11, Rarity.UNCOMMON, mage.cards.d.DriftOfTheDead.class)); cards.add(new SetCardInfo("Dwarven Armory", 182, Rarity.RARE, mage.cards.d.DwarvenArmory.class)); @@ -137,6 +139,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Forest", 329, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 330, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forgotten Lore", 125, Rarity.UNCOMMON, mage.cards.f.ForgottenLore.class)); + cards.add(new SetCardInfo("Formation", 249, Rarity.RARE, mage.cards.f.Formation.class)); cards.add(new SetCardInfo("Foul Familiar", 14, Rarity.COMMON, mage.cards.f.FoulFamiliar.class)); cards.add(new SetCardInfo("Freyalise's Charm", 128, Rarity.UNCOMMON, mage.cards.f.FreyalisesCharm.class)); cards.add(new SetCardInfo("Foxfire", 126, Rarity.COMMON, mage.cards.f.Foxfire.class)); @@ -202,7 +205,12 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Kelsinko Ranger", 257, Rarity.COMMON, mage.cards.k.KelsinkoRanger.class)); cards.add(new SetCardInfo("Kjeldoran Dead", 25, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); cards.add(new SetCardInfo("Kjeldoran Frostbeast", 374, Rarity.UNCOMMON, mage.cards.k.KjeldoranFrostbeast.class)); + cards.add(new SetCardInfo("Kjeldoran Knight", 260, Rarity.RARE, mage.cards.k.KjeldoranKnight.class)); + cards.add(new SetCardInfo("Kjeldoran Phalanx", 261, Rarity.RARE, mage.cards.k.KjeldoranPhalanx.class)); cards.add(new SetCardInfo("Kjeldoran Royal Guard", 262, Rarity.RARE, mage.cards.k.KjeldoranRoyalGuard.class)); + cards.add(new SetCardInfo("Kjeldoran Skycaptain", 263, Rarity.UNCOMMON, mage.cards.k.KjeldoranSkycaptain.class)); + cards.add(new SetCardInfo("Kjeldoran Skyknight", 264, Rarity.COMMON, mage.cards.k.KjeldoranSkyknight.class)); + cards.add(new SetCardInfo("Kjeldoran Warrior", 265, Rarity.COMMON, mage.cards.k.KjeldoranWarrior.class)); cards.add(new SetCardInfo("Knight of Stromgald", 26, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); cards.add(new SetCardInfo("Krovikan Fetish", 28, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); cards.add(new SetCardInfo("Krovikan Sorcerer", 81, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class)); @@ -281,6 +289,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Seizures", 47, Rarity.COMMON, mage.cards.s.Seizures.class)); cards.add(new SetCardInfo("Shambling Strider", 151, Rarity.COMMON, mage.cards.s.ShamblingStrider.class)); cards.add(new SetCardInfo("Shatter", 216, Rarity.COMMON, mage.cards.s.Shatter.class)); + cards.add(new SetCardInfo("Shield Bearer", 276, Rarity.COMMON, mage.cards.s.ShieldBearer.class)); cards.add(new SetCardInfo("Shield of the Ages", 310, Rarity.UNCOMMON, mage.cards.s.ShieldOfTheAges.class)); cards.add(new SetCardInfo("Shyft", 96, Rarity.RARE, mage.cards.s.Shyft.class)); cards.add(new SetCardInfo("Sibilant Spirit", 97, Rarity.RARE, mage.cards.s.SibilantSpirit.class)); @@ -337,6 +346,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Walking Wall", 321, Rarity.UNCOMMON, mage.cards.w.WalkingWall.class)); cards.add(new SetCardInfo("Wall of Lava", 223, Rarity.UNCOMMON, mage.cards.w.WallOfLava.class)); cards.add(new SetCardInfo("Wall of Pine Needles", 162, Rarity.UNCOMMON, mage.cards.w.WallOfPineNeedles.class)); + cards.add(new SetCardInfo("Wall of Shields", 322, Rarity.UNCOMMON, mage.cards.w.WallOfShields.class)); cards.add(new SetCardInfo("War Chariot", 323, Rarity.UNCOMMON, mage.cards.w.WarChariot.class)); cards.add(new SetCardInfo("Warning", 279, Rarity.COMMON, mage.cards.w.Warning.class)); cards.add(new SetCardInfo("Whiteout", 163, Rarity.UNCOMMON, mage.cards.w.Whiteout.class)); From 3e14e5e640b8bc5a61f23789a24799738f7b46f2 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:55:08 +0000 Subject: [PATCH 59/77] Implemented cards --- Mage.Sets/src/mage/sets/Alliances.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index 1450c9bef04..af72df86351 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -103,6 +103,8 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Juniper Order Advocate", 132, Rarity.UNCOMMON, mage.cards.j.JuniperOrderAdvocate.class)); cards.add(new SetCardInfo("Kaysa", 80, Rarity.RARE, mage.cards.k.Kaysa.class)); cards.add(new SetCardInfo("Keeper of Tresserhorn", 14, Rarity.RARE, mage.cards.k.KeeperOfTresserhorn.class)); + cards.add(new SetCardInfo("Kjeldoran Escort", 133, Rarity.COMMON, mage.cards.k.KjeldoranEscort.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kjeldoran Escort", 134, Rarity.COMMON, mage.cards.k.KjeldoranEscort.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Kjeldoran Home Guard", 135, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class)); cards.add(new SetCardInfo("Kjeldoran Outpost", 184, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class)); cards.add(new SetCardInfo("Krovikan Horror", 15, Rarity.RARE, mage.cards.k.KrovikanHorror.class)); From cc55dbed14edabf7edf11ef0a490cc1dd5732c2c Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:57:47 +0000 Subject: [PATCH 60/77] Implemented cards --- Mage.Sets/src/mage/sets/Mirage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Mirage.java b/Mage.Sets/src/mage/sets/Mirage.java index c66a195dc92..27052f442cb 100644 --- a/Mage.Sets/src/mage/sets/Mirage.java +++ b/Mage.Sets/src/mage/sets/Mirage.java @@ -220,6 +220,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Mystical Tutor", 80, Rarity.UNCOMMON, mage.cards.m.MysticalTutor.class)); cards.add(new SetCardInfo("Natural Balance", 129, Rarity.RARE, mage.cards.n.NaturalBalance.class)); cards.add(new SetCardInfo("Nettletooth Djinn", 130, Rarity.UNCOMMON, mage.cards.n.NettletoothDjinn.class)); + cards.add(new SetCardInfo("Noble Elephant", 234, Rarity.COMMON, mage.cards.n.NobleElephant.class)); cards.add(new SetCardInfo("Nocturnal Raid", 30, Rarity.UNCOMMON, mage.cards.n.NocturnalRaid.class)); cards.add(new SetCardInfo("Pacifism", 236, Rarity.COMMON, mage.cards.p.Pacifism.class)); cards.add(new SetCardInfo("Painful Memories", 31, Rarity.UNCOMMON, mage.cards.p.PainfulMemories.class)); @@ -304,6 +305,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Telim'Tor", 197, Rarity.RARE, mage.cards.t.TelimTor.class)); cards.add(new SetCardInfo("Telim'Tor's Darts", 286, Rarity.UNCOMMON, mage.cards.t.TelimTorsDarts.class)); cards.add(new SetCardInfo("Telim'Tor's Edict", 198, Rarity.RARE, mage.cards.t.TelimTorsEdict.class)); + cards.add(new SetCardInfo("Teremko Griffin", 247, Rarity.COMMON, mage.cards.t.TeremkoGriffin.class)); cards.add(new SetCardInfo("Thirst", 99, Rarity.COMMON, mage.cards.t.Thirst.class)); cards.add(new SetCardInfo("Tidal Wave", 100, Rarity.UNCOMMON, mage.cards.t.TidalWave.class)); cards.add(new SetCardInfo("Tombstone Stairwell", 47, Rarity.RARE, mage.cards.t.TombstoneStairwell.class)); From 04b9edca40c67ff94887b28ad161add7cacc89c0 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 18:59:11 +0000 Subject: [PATCH 61/77] Implemented cards --- Mage.Sets/src/mage/sets/Weatherlight.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Weatherlight.java b/Mage.Sets/src/mage/sets/Weatherlight.java index 13d73b011fd..eafb35eba8d 100644 --- a/Mage.Sets/src/mage/sets/Weatherlight.java +++ b/Mage.Sets/src/mage/sets/Weatherlight.java @@ -72,6 +72,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Aura of Silence", 123, Rarity.UNCOMMON, mage.cards.a.AuraOfSilence.class)); cards.add(new SetCardInfo("Avizoa", 35, Rarity.RARE, mage.cards.a.Avizoa.class)); cards.add(new SetCardInfo("Barrow Ghoul", 3, Rarity.COMMON, mage.cards.b.BarrowGhoul.class)); + cards.add(new SetCardInfo("Benalish Infantry", 124, Rarity.COMMON, mage.cards.b.BenalishInfantry.class)); cards.add(new SetCardInfo("Benalish Knight", 125, Rarity.COMMON, mage.cards.b.BenalishKnight.class)); cards.add(new SetCardInfo("Benalish Missionary", 126, Rarity.COMMON, mage.cards.b.BenalishMissionary.class)); cards.add(new SetCardInfo("Bloodrock Cyclops", 90, Rarity.COMMON, mage.cards.b.BloodrockCyclops.class)); @@ -198,6 +199,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Veteran Explorer", 86, Rarity.UNCOMMON, mage.cards.v.VeteranExplorer.class)); cards.add(new SetCardInfo("Vitalize", 87, Rarity.COMMON, mage.cards.v.Vitalize.class)); cards.add(new SetCardInfo("Vodalian Illusionist", 58, Rarity.UNCOMMON, mage.cards.v.VodalianIllusionist.class)); + cards.add(new SetCardInfo("Volunteer Reserves", 145, Rarity.UNCOMMON, mage.cards.v.VolunteerReserves.class)); cards.add(new SetCardInfo("Wave of Terror", 28, Rarity.RARE, mage.cards.w.WaveOfTerror.class)); cards.add(new SetCardInfo("Well of Knowledge", 162, Rarity.RARE, mage.cards.w.WellOfKnowledge.class)); cards.add(new SetCardInfo("Winding Canyons", 167, Rarity.RARE, mage.cards.w.WindingCanyons.class)); From 178970d08b637586f3442259a42713df64e20fe4 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 19:00:42 +0000 Subject: [PATCH 62/77] Implemented cards --- Mage.Sets/src/mage/sets/Chronicles.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/Chronicles.java b/Mage.Sets/src/mage/sets/Chronicles.java index 983b3d91e75..44a3c47cfea 100644 --- a/Mage.Sets/src/mage/sets/Chronicles.java +++ b/Mage.Sets/src/mage/sets/Chronicles.java @@ -162,6 +162,7 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Wall of Opposition", 56, Rarity.UNCOMMON, mage.cards.w.WallOfOpposition.class)); cards.add(new SetCardInfo("Wall of Vapor", 27, Rarity.COMMON, mage.cards.w.WallOfVapor.class)); cards.add(new SetCardInfo("Wall of Wonder", 28, Rarity.UNCOMMON, mage.cards.w.WallOfWonder.class)); + cards.add(new SetCardInfo("War Elephant", 69, Rarity.COMMON, mage.cards.w.WarElephant.class)); cards.add(new SetCardInfo("Witch Hunter", 70, Rarity.UNCOMMON, mage.cards.w.WitchHunter.class)); cards.add(new SetCardInfo("Xira Arien", 125, Rarity.RARE, mage.cards.x.XiraArien.class)); cards.add(new SetCardInfo("Yawgmoth Demon", 14, Rarity.RARE, mage.cards.y.YawgmothDemon.class)); From 0847ab843bb909dcd4a0ae5943ad12aad4a2d374 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 19:06:40 +0000 Subject: [PATCH 63/77] Implemented cards --- Mage.Sets/src/mage/sets/FourthEdition.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mage.Sets/src/mage/sets/FourthEdition.java b/Mage.Sets/src/mage/sets/FourthEdition.java index 02cd856ac9e..a26914ba1f5 100644 --- a/Mage.Sets/src/mage/sets/FourthEdition.java +++ b/Mage.Sets/src/mage/sets/FourthEdition.java @@ -319,6 +319,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Divine Transformation", 23, Rarity.UNCOMMON, mage.cards.d.DivineTransformation.class)); cards.add(new SetCardInfo("Elder Land Wurm", 24, Rarity.RARE, mage.cards.e.ElderLandWurm.class)); cards.add(new SetCardInfo("Eye for an Eye", 25, Rarity.RARE, mage.cards.e.EyeForAnEye.class)); + cards.add(new SetCardInfo("Fortified Area", 26, Rarity.COMMON, mage.cards.f.FortifiedArea.class)); cards.add(new SetCardInfo("Green Ward", 27, Rarity.UNCOMMON, mage.cards.g.GreenWard.class)); cards.add(new SetCardInfo("Healing Salve", 28, Rarity.COMMON, mage.cards.h.HealingSalve.class)); cards.add(new SetCardInfo("Holy Armor", 29, Rarity.COMMON, mage.cards.h.HolyArmor.class)); @@ -334,6 +335,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Pearled Unicorn", 39, Rarity.COMMON, mage.cards.p.PearledUnicorn.class)); cards.add(new SetCardInfo("Personal Incarnation", 40, Rarity.RARE, mage.cards.p.PersonalIncarnation.class)); cards.add(new SetCardInfo("Piety", 41, Rarity.COMMON, Piety.class)); + cards.add(new SetCardInfo("Pikemen", 42, Rarity.COMMON, Pikemen.class)); cards.add(new SetCardInfo("Purelace", 43, Rarity.RARE, mage.cards.p.Purelace.class)); cards.add(new SetCardInfo("Red Ward", 44, Rarity.UNCOMMON, mage.cards.r.RedWard.class)); cards.add(new SetCardInfo("Reverse Damage", 45, Rarity.RARE, mage.cards.r.ReverseDamage.class)); @@ -355,6 +357,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Ankh of Mishra", 294, Rarity.RARE, mage.cards.a.AnkhOfMishra.class)); cards.add(new SetCardInfo("Armageddon Clock", 295, Rarity.RARE, mage.cards.a.ArmageddonClock.class)); cards.add(new SetCardInfo("Ashnod's Battle Gear", 296, Rarity.UNCOMMON, mage.cards.a.AshnodsBattleGear.class)); + cards.add(new SetCardInfo("Battering Ram", 297, Rarity.COMMON, mage.cards.b.BatteringRam.class)); cards.add(new SetCardInfo("Black Mana Battery", 298, Rarity.RARE, mage.cards.b.BlackManaBattery.class)); cards.add(new SetCardInfo("Black Vise", 299, Rarity.UNCOMMON, mage.cards.b.BlackVise.class)); cards.add(new SetCardInfo("Blue Mana Battery", 300, Rarity.RARE, mage.cards.b.BlueManaBattery.class)); @@ -393,6 +396,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Mana Vault", 334, Rarity.RARE, mage.cards.m.ManaVault.class)); cards.add(new SetCardInfo("Meekstone", 335, Rarity.RARE, mage.cards.m.Meekstone.class)); cards.add(new SetCardInfo("Millstone", 336, Rarity.RARE, mage.cards.m.Millstone.class)); + cards.add(new SetCardInfo("Mishra's War Machine", 337, Rarity.RARE, mage.cards.m.MishrasWarMachine.class)); cards.add(new SetCardInfo("Nevinyrral's Disk", 338, Rarity.RARE, mage.cards.n.NevinyrralsDisk.class)); cards.add(new SetCardInfo("Obsianus Golem", 339, Rarity.UNCOMMON, mage.cards.o.ObsianusGolem.class)); cards.add(new SetCardInfo("Onulet", 340, Rarity.RARE, mage.cards.o.Onulet.class)); @@ -410,6 +414,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("The Rack", 352, Rarity.UNCOMMON, mage.cards.t.TheRack.class)); cards.add(new SetCardInfo("Throne of Bone", 353, Rarity.UNCOMMON, mage.cards.t.ThroneOfBone.class)); cards.add(new SetCardInfo("Triskelion", 354, Rarity.RARE, mage.cards.t.Triskelion.class)); + cards.add(new SetCardInfo("Urza's Avenger", 355, Rarity.RARE, mage.cards.u.UrzasAvenger.class)); cards.add(new SetCardInfo("Wall of Spears", 356, Rarity.COMMON, mage.cards.w.WallOfSpears.class)); cards.add(new SetCardInfo("White Mana Battery", 357, Rarity.RARE, mage.cards.w.WhiteManaBattery.class)); cards.add(new SetCardInfo("Winter Orb", 358, Rarity.RARE, mage.cards.w.WinterOrb.class)); From 371d4bf67f0d3bf54a43645fd54e93583de0f594 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 19:11:32 +0000 Subject: [PATCH 64/77] Implemented cards --- Mage.Sets/src/mage/sets/FifthEdition.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mage.Sets/src/mage/sets/FifthEdition.java b/Mage.Sets/src/mage/sets/FifthEdition.java index c989c1fe348..74a66d2e135 100644 --- a/Mage.Sets/src/mage/sets/FifthEdition.java +++ b/Mage.Sets/src/mage/sets/FifthEdition.java @@ -62,6 +62,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Ball Lightning", 210, Rarity.RARE, mage.cards.b.BallLightning.class)); cards.add(new SetCardInfo("Barbed Sextant", 351, Rarity.COMMON, mage.cards.b.BarbedSextant.class)); cards.add(new SetCardInfo("Barl's Cage", 352, Rarity.RARE, mage.cards.b.BarlsCage.class)); + cards.add(new SetCardInfo("Battering Ram", 353, Rarity.COMMON, mage.cards.b.BatteringRam.class)); cards.add(new SetCardInfo("Benalish Hero", 286, Rarity.COMMON, mage.cards.b.BenalishHero.class)); cards.add(new SetCardInfo("Binding Grasp", 74, Rarity.UNCOMMON, mage.cards.b.BindingGrasp.class)); cards.add(new SetCardInfo("Bird Maiden", 211, Rarity.COMMON, mage.cards.b.BirdMaiden.class)); @@ -218,6 +219,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Hurloon Minotaur", 240, Rarity.COMMON, mage.cards.h.HurloonMinotaur.class)); cards.add(new SetCardInfo("Hurricane", 165, Rarity.UNCOMMON, mage.cards.h.Hurricane.class)); cards.add(new SetCardInfo("Hydroblast", 94, Rarity.UNCOMMON, mage.cards.h.Hydroblast.class)); + cards.add(new SetCardInfo("Icatian Phalanx", 312, Rarity.UNCOMMON, mage.cards.i.IcatianPhalanx.class)); cards.add(new SetCardInfo("Icatian Scout", 313, Rarity.COMMON, IcatianScout.class)); cards.add(new SetCardInfo("Icatian Store", 423, Rarity.RARE, mage.cards.i.IcatianStore.class)); cards.add(new SetCardInfo("Icatian Town", 314, Rarity.RARE, mage.cards.i.IcatianTown.class)); @@ -255,6 +257,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Kismet", 319, Rarity.UNCOMMON, mage.cards.k.Kismet.class)); cards.add(new SetCardInfo("Kjeldoran Dead", 32, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); cards.add(new SetCardInfo("Kjeldoran Royal Guard", 320, Rarity.RARE, mage.cards.k.KjeldoranRoyalGuard.class)); + cards.add(new SetCardInfo("Kjeldoran Skycaptain", 321, Rarity.UNCOMMON, mage.cards.k.KjeldoranSkycaptain.class)); cards.add(new SetCardInfo("Knight of Stromgald", 33, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); cards.add(new SetCardInfo("Krovikan Fetish", 34, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); cards.add(new SetCardInfo("Krovikan Sorcerer", 96, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class)); @@ -321,6 +324,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Phantasmal Forces", 106, Rarity.UNCOMMON, mage.cards.p.PhantasmalForces.class)); cards.add(new SetCardInfo("Phantasmal Terrain", 107, Rarity.COMMON, mage.cards.p.PhantasmalTerrain.class)); cards.add(new SetCardInfo("Phantom Monster", 108, Rarity.UNCOMMON, mage.cards.p.PhantomMonster.class)); + cards.add(new SetCardInfo("Pikemen", 328, Rarity.COMMON, mage.cards.p.Pikemen.class)); cards.add(new SetCardInfo("Pirate Ship", 109, Rarity.RARE, mage.cards.p.PirateShip.class)); cards.add(new SetCardInfo("Pit Scorpion", 49, Rarity.COMMON, mage.cards.p.PitScorpion.class)); cards.add(new SetCardInfo("Plague Rats", 50, Rarity.COMMON, mage.cards.p.PlagueRats.class)); @@ -373,6 +377,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Shapeshifter", 398, Rarity.UNCOMMON, mage.cards.s.Shapeshifter.class)); cards.add(new SetCardInfo("Shatter", 265, Rarity.COMMON, mage.cards.s.Shatter.class)); cards.add(new SetCardInfo("Shatterstorm", 266, Rarity.UNCOMMON, mage.cards.s.Shatterstorm.class)); + cards.add(new SetCardInfo("Shield Bearer", 338, Rarity.COMMON, mage.cards.s.ShieldBearer.class)); cards.add(new SetCardInfo("Shield Wall", 339, Rarity.COMMON, mage.cards.s.ShieldWall.class)); cards.add(new SetCardInfo("Shivan Dragon", 267, Rarity.RARE, mage.cards.s.ShivanDragon.class)); cards.add(new SetCardInfo("Shrink", 188, Rarity.COMMON, mage.cards.s.Shrink.class)); @@ -424,6 +429,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Unsummon", 132, Rarity.COMMON, mage.cards.u.Unsummon.class)); cards.add(new SetCardInfo("Untamed Wilds", 197, Rarity.UNCOMMON, mage.cards.u.UntamedWilds.class)); cards.add(new SetCardInfo("Updraft", 133, Rarity.COMMON, mage.cards.u.Updraft.class)); + cards.add(new SetCardInfo("Urza's Avenger", 405, Rarity.RARE, mage.cards.u.UrzasAvenger.class)); cards.add(new SetCardInfo("Urza's Bauble", 406, Rarity.UNCOMMON, mage.cards.u.UrzasBauble.class)); cards.add(new SetCardInfo("Urza's Mine", 447, Rarity.COMMON, mage.cards.u.UrzasMine.class)); cards.add(new SetCardInfo("Urza's Power Plant", 448, Rarity.COMMON, mage.cards.u.UrzasPowerPlant.class)); From 392d2c0677fc2f33081e9f74c84771ffaf60c9eb Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 19:12:53 +0000 Subject: [PATCH 65/77] Implemented cards --- Mage.Sets/src/mage/sets/MastersEdition.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/MastersEdition.java b/Mage.Sets/src/mage/sets/MastersEdition.java index accc77319bf..d38ce5df2e2 100644 --- a/Mage.Sets/src/mage/sets/MastersEdition.java +++ b/Mage.Sets/src/mage/sets/MastersEdition.java @@ -161,6 +161,7 @@ public class MastersEdition extends ExpansionSet { cards.add(new SetCardInfo("Juzam Djinn", 74, Rarity.RARE, mage.cards.j.JuzamDjinn.class)); cards.add(new SetCardInfo("Keldon Warlord", 101, Rarity.UNCOMMON, mage.cards.k.KeldonWarlord.class)); cards.add(new SetCardInfo("Khabal Ghoul", 75, Rarity.RARE, mage.cards.k.KhabalGhoul.class)); + cards.add(new SetCardInfo("Knights of Thorn", 19, Rarity.COMMON, mage.cards.k.KnightsOfThorn.class)); cards.add(new SetCardInfo("Lake of the Dead", 177, Rarity.RARE, mage.cards.l.LakeOfTheDead.class)); cards.add(new SetCardInfo("Lightning Bolt", 102, Rarity.COMMON, mage.cards.l.LightningBolt.class)); cards.add(new SetCardInfo("Lim-Dul's Vault", 148, Rarity.UNCOMMON, mage.cards.l.LimDulsVault.class)); From 2657383960bf7d877fe6157a04580f441fc35905 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 19:15:38 +0000 Subject: [PATCH 66/77] Implemented cards --- Mage.Sets/src/mage/sets/MastersEditionII.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index 4949f587622..f71a932a7aa 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -150,6 +150,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Heart of Yavimaya", 231, Rarity.RARE, mage.cards.h.HeartOfYavimaya.class)); cards.add(new SetCardInfo("Helm of Obedience", 210, Rarity.RARE, mage.cards.h.HelmOfObedience.class)); cards.add(new SetCardInfo("Icatian Javelineers", 15, Rarity.COMMON, IcatianJavelineers.class)); + cards.add(new SetCardInfo("Icatian Phalanx", 16, Rarity.COMMON, mage.cards.i.IcatianPhalanx.class)); cards.add(new SetCardInfo("Icatian Scout", 17, Rarity.COMMON, IcatianScout.class)); cards.add(new SetCardInfo("Ice Floe", 232, Rarity.UNCOMMON, mage.cards.i.IceFloe.class)); cards.add(new SetCardInfo("Iceberg", 49, Rarity.UNCOMMON, mage.cards.i.Iceberg.class)); @@ -171,6 +172,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Kjeldoran Dead", 98, Rarity.COMMON, mage.cards.k.KjeldoranDead.class)); cards.add(new SetCardInfo("Kjeldoran Home Guard", 22, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class)); cards.add(new SetCardInfo("Kjeldoran Outpost", 233, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class)); + cards.add(new SetCardInfo("Kjeldoran Skycaptain", 23, Rarity.COMMON, mage.cards.k.KjeldoranSkycaptain.class)); cards.add(new SetCardInfo("Knight of Stromgald", 99, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); cards.add(new SetCardInfo("Krovikan Fetish", 100, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); cards.add(new SetCardInfo("Krovikan Horror", 101, Rarity.RARE, mage.cards.k.KrovikanHorror.class)); @@ -221,6 +223,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Screeching Drake", 63, Rarity.COMMON, mage.cards.s.ScreechingDrake.class)); cards.add(new SetCardInfo("Sea Drake", 64, Rarity.RARE, mage.cards.s.SeaDrake.class)); cards.add(new SetCardInfo("Sea Spirit", 65, Rarity.UNCOMMON, mage.cards.s.SeaSpirit.class)); + cards.add(new SetCardInfo("Shield Bearer", 35, Rarity.COMMON, mage.cards.s.ShieldBearer.class)); cards.add(new SetCardInfo("Shrink", 175, Rarity.COMMON, mage.cards.s.Shrink.class)); cards.add(new SetCardInfo("Shyft", 66, Rarity.COMMON, mage.cards.s.Shyft.class)); cards.add(new SetCardInfo("Sibilant Spirit", 67, Rarity.RARE, mage.cards.s.SibilantSpirit.class)); From 3f1499ef761e9cb11ee722d7d9c80d525635ce2f Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 23:44:31 +0000 Subject: [PATCH 67/77] Adjusted banding arrow position --- Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java index 370faa19929..991a40add4b 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java @@ -44,7 +44,7 @@ public final class ArrowUtil { if (permanent != null) { Point target = permanent.getLocationOnScreen(); target.translate(-parentPoint.x, -parentPoint.y); - ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 65, (int) me.getY() + 25, (int) target.getX() + 70, (int) target.getY() + 35, Color.yellow, ArrowBuilder.Type.BANDED); + ArrowBuilder.getBuilder().addArrow(data.gameId, (int) me.getX() + 55, (int) me.getY() + 25, (int) target.getX() + 60, (int) target.getY() + 35, Color.yellow, ArrowBuilder.Type.BANDED); } } } From 04fbd593a4cd4132944a982a4f47ea02eecbd7bf Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 23:58:52 +0000 Subject: [PATCH 68/77] Fix Fortified Area --- Mage.Sets/src/mage/cards/f/FortifiedArea.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/cards/f/FortifiedArea.java b/Mage.Sets/src/mage/cards/f/FortifiedArea.java index 4ee704d1172..b02d4e98de9 100644 --- a/Mage.Sets/src/mage/cards/f/FortifiedArea.java +++ b/Mage.Sets/src/mage/cards/f/FortifiedArea.java @@ -39,6 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; From b0d69dda33372485098a2cffb2add40a7dd5d773 Mon Sep 17 00:00:00 2001 From: L_J Date: Wed, 14 Feb 2018 23:59:56 +0000 Subject: [PATCH 69/77] Fix Pikemen --- Mage.Sets/src/mage/sets/FourthEdition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/FourthEdition.java b/Mage.Sets/src/mage/sets/FourthEdition.java index a26914ba1f5..3b5f2616571 100644 --- a/Mage.Sets/src/mage/sets/FourthEdition.java +++ b/Mage.Sets/src/mage/sets/FourthEdition.java @@ -335,7 +335,7 @@ public class FourthEdition extends ExpansionSet { cards.add(new SetCardInfo("Pearled Unicorn", 39, Rarity.COMMON, mage.cards.p.PearledUnicorn.class)); cards.add(new SetCardInfo("Personal Incarnation", 40, Rarity.RARE, mage.cards.p.PersonalIncarnation.class)); cards.add(new SetCardInfo("Piety", 41, Rarity.COMMON, Piety.class)); - cards.add(new SetCardInfo("Pikemen", 42, Rarity.COMMON, Pikemen.class)); + cards.add(new SetCardInfo("Pikemen", 42, Rarity.COMMON, mage.cards.p.Pikemen.class)); cards.add(new SetCardInfo("Purelace", 43, Rarity.RARE, mage.cards.p.Purelace.class)); cards.add(new SetCardInfo("Red Ward", 44, Rarity.UNCOMMON, mage.cards.r.RedWard.class)); cards.add(new SetCardInfo("Reverse Damage", 45, Rarity.RARE, mage.cards.r.ReverseDamage.class)); From 836a2f8facf7d1f33575a8ca74827c634868f691 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 00:01:36 +0000 Subject: [PATCH 70/77] Fix Dire Wolves --- Mage.Sets/src/mage/cards/d/DireWolves.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/d/DireWolves.java b/Mage.Sets/src/mage/cards/d/DireWolves.java index 68afc3082cb..224cb7f92bd 100644 --- a/Mage.Sets/src/mage/cards/d/DireWolves.java +++ b/Mage.Sets/src/mage/cards/d/DireWolves.java @@ -64,7 +64,7 @@ public class DireWolves extends CardImpl { // Dire Wolves has banding as long as you control a Plains. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new ConditionalContinuousEffect(new GainAbilitySourceEffect(new BandingAbility()), new PermanentsOnTheBattlefieldCondition(filter), rule))); + new ConditionalContinuousEffect(new GainAbilitySourceEffect(BandingAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(filter), rule))); } public DireWolves(final DireWolves card) { From 58fde7db50b0931b0661e8b3cb4c793aadcbb1b7 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 00:05:44 +0000 Subject: [PATCH 71/77] Reverted accidental change --- Mage/src/main/java/mage/game/combat/CombatGroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index d9525cee320..2a42f65b5e9 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -307,7 +307,7 @@ public class CombatGroup implements Serializable, Copyable { Map assigned = new HashMap<>(); if (blocked) { boolean excessDamageToDefender = true; - for (UUID blockerId : blockerOrder) { + for (UUID blockerId : new ArrayList<>(blockerOrder)) { // prevent ConcurrentModificationException Permanent blocker = game.getPermanent(blockerId); if (blocker != null) { int lethalDamage; From 7b4eb5193e0df6013f5a846167814fb3fec39ad0 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 00:08:40 +0000 Subject: [PATCH 72/77] Permitted AI to band attackers --- Mage/src/main/java/mage/game/combat/Combat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index e40bf95aaed..97463088660 100644 --- a/Mage/src/main/java/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -329,7 +329,7 @@ public class Combat implements Serializable, Copyable { target.setRequired(false); if (!target.canChoose(attackingPlayerId, game) || game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARING_ATTACKERS, attackingPlayerId, attackingPlayerId)) - || !player.chooseUse(Outcome.AIDontUseIt, "Do you wish to " + (isBanded ? "band " + attacker.getLogName() + " with another " : "form a band with " + attacker.getLogName() + " and an " ) + "attacking creature?", null, game)) { + || !player.chooseUse(Outcome.Benefit, "Do you wish to " + (isBanded ? "band " + attacker.getLogName() + " with another " : "form a band with " + attacker.getLogName() + " and an " ) + "attacking creature?", null, game)) { break; } if (target.choose(Outcome.Benefit, attackingPlayerId, null, game)) { From 9e797e4ed413ecc44a7d848acd1122786eafb27f Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 10:40:33 +0000 Subject: [PATCH 73/77] Implemented Errand of Duty --- .../token/ErrandOfDutyKnightToken.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Mage/src/main/java/mage/game/permanent/token/ErrandOfDutyKnightToken.java diff --git a/Mage/src/main/java/mage/game/permanent/token/ErrandOfDutyKnightToken.java b/Mage/src/main/java/mage/game/permanent/token/ErrandOfDutyKnightToken.java new file mode 100644 index 00000000000..acd818a06ee --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/ErrandOfDutyKnightToken.java @@ -0,0 +1,50 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com AS IS AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.game.permanent.token; +import mage.MageInt; +import mage.abilities.keyword.BandingAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class ErrandOfDutyKnightToken extends Token { + + public ErrandOfDutyKnightToken() { + super("Knight", "1/1 white Knight creature token with banding"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.KNIGHT); + color.setWhite(true); + power = new MageInt(1); + toughness = new MageInt(1); + this.addAbility(BandingAbility.getInstance()); + } +} From 6393d5d311fcd95502e68b8d30b79f8c5e3ca55b Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 10:41:03 +0000 Subject: [PATCH 74/77] Implemented Errand of Duty --- Mage.Sets/src/mage/cards/e/ErrandOfDuty.java | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/ErrandOfDuty.java diff --git a/Mage.Sets/src/mage/cards/e/ErrandOfDuty.java b/Mage.Sets/src/mage/cards/e/ErrandOfDuty.java new file mode 100644 index 00000000000..764284694d8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ErrandOfDuty.java @@ -0,0 +1,58 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.e; + +import java.util.UUID; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.ErrandOfDutyKnightToken; + +/** + * + * @author L_J + */ +public class ErrandOfDuty extends CardImpl { + + public ErrandOfDuty(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); + + // Create a 1/1 white Knight creature token with banding. + this.getSpellAbility().addEffect(new CreateTokenEffect(new ErrandOfDutyKnightToken())); + } + + public ErrandOfDuty(final ErrandOfDuty card) { + super(card); + } + + @Override + public ErrandOfDuty copy() { + return new ErrandOfDuty(this); + } +} From ce53a6f927c9a5bef54a3a89cc21034cb29f1574 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 10:41:56 +0000 Subject: [PATCH 75/77] Implemented Nature's Blessing --- .../src/mage/cards/n/NaturesBlessing.java | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NaturesBlessing.java diff --git a/Mage.Sets/src/mage/cards/n/NaturesBlessing.java b/Mage.Sets/src/mage/cards/n/NaturesBlessing.java new file mode 100644 index 00000000000..924d9c01b53 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NaturesBlessing.java @@ -0,0 +1,138 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.n; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.BandingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class NaturesBlessing extends CardImpl { + + public NaturesBlessing(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{W}"); + + // {G}{W}, Discard a card: Put a +1/+1 counter on target creature or that creature gains banding, first strike, or trample. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NaturesBlessingEffect(), new ManaCostsImpl("{G}{W}")); + ability.addCost(new DiscardCardCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public NaturesBlessing(final NaturesBlessing card) { + super(card); + } + + @Override + public NaturesBlessing copy() { + return new NaturesBlessing(this); + } +} + +class NaturesBlessingEffect extends OneShotEffect { + + private static final Set choices = new HashSet<>(); + private Ability gainedAbility; + + static { + choices.add("+1/+1 counter"); + choices.add("Banding"); + choices.add("First strike"); + choices.add("Trample"); + } + + public NaturesBlessingEffect() { + super(Outcome.AddAbility); + this.staticText = "Put a +1/+1 counter on target creature or that creature gains banding, first strike, or trample"; + } + + public NaturesBlessingEffect(final NaturesBlessingEffect effect) { + super(effect); + } + + @Override + public NaturesBlessingEffect copy() { + return new NaturesBlessingEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent targetPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (controller != null && targetPermanent != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Choose one"); + choice.setChoices(choices); + if (controller.choose(outcome, choice, game)) { + switch (choice.getChoice()) { + case "Banding": + gainedAbility = BandingAbility.getInstance(); + break; + case "First strike": + gainedAbility = FirstStrikeAbility.getInstance(); + break; + case "Trample": + gainedAbility = TrampleAbility.getInstance(); + } + } + if (gainedAbility != null) { + game.addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.Custom), source); + } else { + targetPermanent.getCounters(game).addCounter(CounterType.P1P1.createInstance()); + game.informPlayers(controller.getLogName() + " puts a +1/+1 counter on " + targetPermanent.getLogName()); + } + return true; + } + return false; + } +} From 4d0cafdf36b1a0ce66578ac3ae14cf4f3a7eacf5 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 10:43:19 +0000 Subject: [PATCH 76/77] Implemented Errand of Duty and Nature's Blessing --- Mage.Sets/src/mage/sets/MastersEditionII.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index f71a932a7aa..9fc0fbda65d 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -124,6 +124,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Elvish Spirit Guide", 159, Rarity.UNCOMMON, mage.cards.e.ElvishSpiritGuide.class)); cards.add(new SetCardInfo("Energy Storm", 11, Rarity.RARE, mage.cards.e.EnergyStorm.class)); cards.add(new SetCardInfo("Enervate", 47, Rarity.COMMON, mage.cards.e.Enervate.class)); + cards.add(new SetCardInfo("Errand of Duty", 12, Rarity.UNCOMMON, mage.cards.e.ErrandOfDuty.class)); cards.add(new SetCardInfo("Errantry", 124, Rarity.COMMON, mage.cards.e.Errantry.class)); cards.add(new SetCardInfo("Essence Filter", 160, Rarity.UNCOMMON, mage.cards.e.EssenceFilter.class)); cards.add(new SetCardInfo("Essence Flare", 48, Rarity.COMMON, mage.cards.e.EssenceFlare.class)); @@ -189,6 +190,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Misinformation", 105, Rarity.UNCOMMON, mage.cards.m.Misinformation.class)); cards.add(new SetCardInfo("Mudslide", 136, Rarity.RARE, mage.cards.m.Mudslide.class)); cards.add(new SetCardInfo("Narwhal", 57, Rarity.UNCOMMON, mage.cards.n.Narwhal.class)); + cards.add(new SetCardInfo("Nature's Blessing", 196, Rarity.UNCOMMON, mage.cards.n.NaturesBlessing.class)); cards.add(new SetCardInfo("Nature's Wrath", 172, Rarity.RARE, mage.cards.n.NaturesWrath.class)); cards.add(new SetCardInfo("Necrite", 106, Rarity.COMMON, Necrite.class)); cards.add(new SetCardInfo("Necropotence", 107, Rarity.RARE, mage.cards.n.Necropotence.class)); From 519f8593ab898c777223034d8427e3f27f34469f Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 15 Feb 2018 10:43:51 +0000 Subject: [PATCH 77/77] Implemented Errand of Duty and Nature's Blessing --- Mage.Sets/src/mage/sets/Alliances.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index af72df86351..d3563c28b3f 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -73,6 +73,8 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Energy Arc", 190, Rarity.UNCOMMON, mage.cards.e.EnergyArc.class)); cards.add(new SetCardInfo("Enslaved Scout", 104, Rarity.COMMON, EnslavedScout.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Enslaved Scout", 105, Rarity.COMMON, EnslavedScout.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Errand of Duty", 127, Rarity.COMMON, mage.cards.e.ErrandOfDuty.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Errand of Duty", 128, Rarity.COMMON, mage.cards.e.ErrandOfDuty.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Exile", 129, Rarity.RARE, mage.cards.e.Exile.class)); cards.add(new SetCardInfo("False Demise", 40, Rarity.COMMON, mage.cards.f.FalseDemise.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("False Demise", 41, Rarity.COMMON, mage.cards.f.FalseDemise.class, NON_FULL_USE_VARIOUS)); @@ -122,6 +124,7 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Mishra's Groundbreaker", 165, Rarity.UNCOMMON, mage.cards.m.MishrasGroundbreaker.class)); cards.add(new SetCardInfo("Misinformation", 19, Rarity.UNCOMMON, mage.cards.m.Misinformation.class)); cards.add(new SetCardInfo("Mystic Compass", 166, Rarity.UNCOMMON, mage.cards.m.MysticCompass.class)); + cards.add(new SetCardInfo("Nature's Blessing", 195, Rarity.UNCOMMON, mage.cards.n.NaturesBlessing.class)); cards.add(new SetCardInfo("Nature's Chosen", 81, Rarity.UNCOMMON, mage.cards.n.NaturesChosen.class)); cards.add(new SetCardInfo("Nature's Wrath", 82, Rarity.RARE, mage.cards.n.NaturesWrath.class)); cards.add(new SetCardInfo("Noble Steeds", 140, Rarity.COMMON, mage.cards.n.NobleSteeds.class, NON_FULL_USE_VARIOUS));