From 00b4fa8e1ca55837a855cca174d764a3ef228574 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Thu, 4 Jan 2018 20:06:48 +0000 Subject: [PATCH 01/18] Implemented Etali, Primal Storm --- .../src/mage/cards/e/EtaliPrimalStorm.java | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java diff --git a/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java b/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java new file mode 100644 index 00000000000..9981dd15a22 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java @@ -0,0 +1,144 @@ +/* + * 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.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author ciaccona007 & L_J + */ +public class EtaliPrimalStorm extends CardImpl { + + public EtaliPrimalStorm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Whenever Etali, Primal Storm attacks, exile the top card of each player's library, then you may cast any number of nonland cards exiled this way without paying their mana costs. + this.addAbility(new AttacksTriggeredAbility(new EtaliPrimalStormEffect(), false)); + + } + + public EtaliPrimalStorm(final EtaliPrimalStorm card) { + super(card); + } + + @Override + public EtaliPrimalStorm copy() { + return new EtaliPrimalStorm(this); + } +} + +class EtaliPrimalStormEffect extends OneShotEffect { + + private final static FilterCard filter = new FilterCard("nonland cards"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + + public EtaliPrimalStormEffect() { + super(Outcome.Benefit); + this.staticText = "exile the top card of each player's library, then you may cast any number of nonland cards exiled this way without paying their mana costs"; + } + + public EtaliPrimalStormEffect(final EtaliPrimalStormEffect effect) { + super(effect); + } + + @Override + public EtaliPrimalStormEffect copy() { + return new EtaliPrimalStormEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + // move cards from library to exile + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + controller.moveCardsToExile(player.getLibrary().getTopCards(game, 1), source, game, true, source.getSourceId(), sourceObject.getIdName()); + } + } + // cast the possible cards without paying the mana + ExileZone etaliExileZone = game.getExile().getExileZone(source.getSourceId()); + if (etaliExileZone == null) { + return true; + } + Cards cardsToCast = new CardsImpl(); + cardsToCast.addAll(etaliExileZone.getCards(filter, source.getSourceId(), source.getControllerId(), game)); + while (!cardsToCast.isEmpty()) { + if (!controller.chooseUse(Outcome.PlayForFree, "Cast a card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) { + break; + } + TargetCard targetCard = new TargetCard(1, Zone.EXILED, new FilterCard("nonland card to cast for free")); + if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) { + Card card = game.getCard(targetCard.getFirstTarget()); + if (card != null) { + if (controller.cast(card.getSpellAbility(), game, true)) { + cardsToCast.remove(card); + } else { + game.informPlayer(controller, "You're not able to cast " + card.getIdName() + " or you canceled the casting."); + } + } + } + } + return true; + } + return false; + } +} From a94e7fa0236df0cf759aa87da1213b76c8a2a7b4 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Thu, 4 Jan 2018 20:09:26 +0000 Subject: [PATCH 02/18] Implemented Etali, Primal Storm, fixed Evolving Wilds rarity --- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 48c57cc0b0d..54b02574a78 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -66,7 +66,8 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); cards.add(new SetCardInfo("Dusk Charger", 69, Rarity.COMMON, mage.cards.d.DuskCharger.class)); cards.add(new SetCardInfo("Elenda, the Dusk Rose", 157, Rarity.MYTHIC, mage.cards.e.ElendaTheDuskRose.class)); - cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.RARE, mage.cards.e.EvolvingWilds.class)); + cards.add(new SetCardInfo("Etali, Primal Storm", 100, Rarity.RARE, mage.cards.e.EtaliPrimalStorm.class)); + cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); cards.add(new SetCardInfo("Forerunner of the Coalition", 72, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheCoalition.class)); cards.add(new SetCardInfo("Forerunner of the Empire", 102, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheEmpire.class)); cards.add(new SetCardInfo("Forerunner of the Heralds", 129, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheHeralds.class)); From e67c0093386cc8f16badc77d928cefab7ad48e5d Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Thu, 4 Jan 2018 20:57:11 +0000 Subject: [PATCH 03/18] Etali ability rewrite Fixed being able to cast previously exiled cards --- .../src/mage/cards/e/EtaliPrimalStorm.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java b/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java index 9981dd15a22..f48ef2ec728 100644 --- a/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java +++ b/Mage.Sets/src/mage/cards/e/EtaliPrimalStorm.java @@ -27,6 +27,8 @@ */ package mage.cards.e; +import java.util.HashSet; +import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.MageObject; @@ -46,7 +48,6 @@ import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.ExileZone; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; @@ -108,25 +109,30 @@ class EtaliPrimalStormEffect extends OneShotEffect { MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { // move cards from library to exile + Set currentExiledCards = new HashSet<>(); for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - controller.moveCardsToExile(player.getLibrary().getTopCards(game, 1), source, game, true, source.getSourceId(), sourceObject.getIdName()); + if (!player.getLibrary().getTopCards(game, 1).isEmpty()) { + Card topCard = player.getLibrary().getTopCards(game, 1).iterator().next(); + if (filter.match(topCard, source.getSourceId(), source.getControllerId(), game)) { + currentExiledCards.add(topCard); + } + controller.moveCardsToExile(topCard, source, game, true, source.getSourceId(), sourceObject.getIdName()); + } } } // cast the possible cards without paying the mana - ExileZone etaliExileZone = game.getExile().getExileZone(source.getSourceId()); - if (etaliExileZone == null) { - return true; - } Cards cardsToCast = new CardsImpl(); - cardsToCast.addAll(etaliExileZone.getCards(filter, source.getSourceId(), source.getControllerId(), game)); + cardsToCast.addAll(currentExiledCards); + boolean alreadyCast = false; while (!cardsToCast.isEmpty()) { - if (!controller.chooseUse(Outcome.PlayForFree, "Cast a card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) { + if (!controller.chooseUse(Outcome.PlayForFree, "Cast a" + (alreadyCast ? "nother" : "" ) + " card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) { break; } TargetCard targetCard = new TargetCard(1, Zone.EXILED, new FilterCard("nonland card to cast for free")); if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) { + alreadyCast = true; Card card = game.getCard(targetCard.getFirstTarget()); if (card != null) { if (controller.cast(card.getSpellAbility(), game, true)) { From 4ff75347783c09f89581e537c1bb30defb0a3002 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Thu, 4 Jan 2018 21:55:45 +0000 Subject: [PATCH 04/18] Implemented Heart of Bogardan --- .../src/mage/cards/h/HeartOfBogardan.java | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HeartOfBogardan.java diff --git a/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java b/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java new file mode 100644 index 00000000000..62e1dc72cfc --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java @@ -0,0 +1,141 @@ +/* + * 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.TriggeredAbilityImpl; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +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.target.TargetPlayer; + +/** + * + * @author emerald000 & L_J + */ +public class HeartOfBogardan extends CardImpl { + + public HeartOfBogardan(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); + + // Cumulative upkeep-Pay {2}. + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}"))); + + // When a player doesn't pay Heart of Bogardan's cumulative upkeep, Heart of Bogardan deals X damage to target player and each creature he or she controls, where X is twice the number of age counters on Heart of Bogardan minus 2. + this.addAbility(new HeartOfBogardanTriggeredAbility()); + } + + public HeartOfBogardan(final HeartOfBogardan card) { + super(card); + } + + @Override + public HeartOfBogardan copy() { + return new HeartOfBogardan(this); + } +} + +class HeartOfBogardanTriggeredAbility extends TriggeredAbilityImpl { + + HeartOfBogardanTriggeredAbility() { + super(Zone.BATTLEFIELD, new HeartOfBogardanEffect(), false); + this.addTarget(new TargetPlayer()); + } + + HeartOfBogardanTriggeredAbility(final HeartOfBogardanTriggeredAbility ability) { + super(ability); + } + + @Override + public HeartOfBogardanTriggeredAbility copy() { + return new HeartOfBogardanTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DIDNT_PAY_CUMULATIVE_UPKEEP; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getSourceId() != null && event.getSourceId().equals(this.getSourceId()); + } + + @Override + public String getRule() { + return "When a player doesn't pay {this}'s cumulative upkeep, {this} deals X damage to target player and each creature he or she controls, where X is twice the number of age counters on {this} minus 2."; + } +} + +class HeartOfBogardanEffect extends OneShotEffect { + + public HeartOfBogardanEffect() { + super(Outcome.Damage); + staticText = "{this} deals X damage to target player and each creature he or she controls, where X is twice the number of age counters on {this} minus 2"; + } + + public HeartOfBogardanEffect(final HeartOfBogardanEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (player != null && sourcePermanent != null) { + int damage = sourcePermanent.getCounters(game).getCount(CounterType.AGE) * 2 - 2; + if (damage > 0) { + player.damage(damage, source.getSourceId(), game, false, true); + for (Permanent perm: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) { + perm.damage(damage, source.getSourceId(), game, false, true); + } + } + return true; + } + return false; + } + + @Override + public HeartOfBogardanEffect copy() { + return new HeartOfBogardanEffect(this); + } + +} From adae3e22bc6dfab1baeedf823dcf905d7bd8aca0 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Thu, 4 Jan 2018 21:56:23 +0000 Subject: [PATCH 05/18] Implemented Heart of Bogardan --- Mage.Sets/src/mage/sets/Weatherlight.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/Weatherlight.java b/Mage.Sets/src/mage/sets/Weatherlight.java index c3832ecdd95..13d73b011fd 100644 --- a/Mage.Sets/src/mage/sets/Weatherlight.java +++ b/Mage.Sets/src/mage/sets/Weatherlight.java @@ -121,6 +121,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Guided Strike", 132, Rarity.COMMON, mage.cards.g.GuidedStrike.class)); cards.add(new SetCardInfo("Harvest Wurm", 72, Rarity.COMMON, mage.cards.h.HarvestWurm.class)); cards.add(new SetCardInfo("Haunting Misery", 13, Rarity.COMMON, mage.cards.h.HauntingMisery.class)); + cards.add(new SetCardInfo("Heart of Bogardan", 106, Rarity.RARE, mage.cards.h.HeartOfBogardan.class)); cards.add(new SetCardInfo("Heat Stroke", 107, Rarity.RARE, mage.cards.h.HeatStroke.class)); cards.add(new SetCardInfo("Heavy Ballista", 133, Rarity.COMMON, mage.cards.h.HeavyBallista.class)); cards.add(new SetCardInfo("Hidden Horror", 14, Rarity.UNCOMMON, mage.cards.h.HiddenHorror.class)); From bc75f82524683d8b167a1c85797f817a9a71f0c8 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 5 Jan 2018 02:21:16 +0400 Subject: [PATCH 06/18] Fixed wrong ability texts with duplicated card name (see #4335) --- Mage.Sets/src/mage/cards/f/FiremawKavu.java | 2 +- Mage.Sets/src/mage/cards/f/FoundryChampion.java | 2 +- Mage.Sets/src/mage/cards/g/GangOfDevils.java | 2 +- Mage.Sets/src/mage/cards/g/GhituSlinger.java | 2 +- Mage.Sets/src/mage/cards/g/GibberingFiend.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java | 4 +--- Mage.Sets/src/mage/cards/g/GoblinCommando.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinMedics.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinShrine.java | 2 +- Mage.Sets/src/mage/cards/g/GoblinSwineRider.java | 2 +- .../src/mage/cards/i/ImplementOfCombustion.java | 2 +- Mage.Sets/src/mage/cards/i/InfernoTitan.java | 2 +- Mage.Sets/src/mage/cards/k/KeldonChampion.java | 2 +- Mage.Sets/src/mage/cards/k/KeldonMarauders.java | 2 +- .../src/mage/cards/k/KessigMalcontents.java | 2 +- Mage.Sets/src/mage/cards/l/LavaHounds.java | 2 +- Mage.Sets/src/mage/cards/l/LightningDiadem.java | 2 +- Mage.Sets/src/mage/cards/m/Meteorite.java | 2 +- .../src/mage/cards/m/MudbuttonTorchrunner.java | 2 +- .../src/mage/cards/o/OrdealOfPurphoros.java | 2 +- Mage.Sets/src/mage/cards/p/PardicArsonist.java | 2 +- Mage.Sets/src/mage/cards/p/PerilousMyr.java | 2 +- Mage.Sets/src/mage/cards/p/PitchburnDevils.java | 2 +- Mage.Sets/src/mage/cards/r/RagingSwordtooth.java | 2 +- .../effects/common/DamageAllEffect.java | 5 ++++- .../effects/common/DamageEverythingEffect.java | 16 +++++++++++++++- .../effects/common/DamagePlayersEffect.java | 11 ++++++++++- 27 files changed, 53 insertions(+), 29 deletions(-) diff --git a/Mage.Sets/src/mage/cards/f/FiremawKavu.java b/Mage.Sets/src/mage/cards/f/FiremawKavu.java index abae4ff254c..76f90b6612d 100644 --- a/Mage.Sets/src/mage/cards/f/FiremawKavu.java +++ b/Mage.Sets/src/mage/cards/f/FiremawKavu.java @@ -56,7 +56,7 @@ public class FiremawKavu extends CardImpl { this.addAbility(new EchoAbility("{5}{R}")); // When Firemaw Kavu enters the battlefield, it deals 2 damage to target creature. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/f/FoundryChampion.java b/Mage.Sets/src/mage/cards/f/FoundryChampion.java index 48487db89d4..cf5f12c9813 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryChampion.java +++ b/Mage.Sets/src/mage/cards/f/FoundryChampion.java @@ -62,7 +62,7 @@ public class FoundryChampion extends CardImpl { this.toughness = new MageInt(4); //When Foundry Champion enters the battlefield, it deals damage to target creature or player equal to the number of creatures you control. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), "it")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GangOfDevils.java b/Mage.Sets/src/mage/cards/g/GangOfDevils.java index 0323f03e6f9..f7046cd9387 100644 --- a/Mage.Sets/src/mage/cards/g/GangOfDevils.java +++ b/Mage.Sets/src/mage/cards/g/GangOfDevils.java @@ -53,7 +53,7 @@ public class GangOfDevils extends CardImpl { this.toughness = new MageInt(3); // When Gang of Devils dies, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players. - Ability ability = new DiesTriggeredAbility(new DamageMultiEffect(3)); + Ability ability = new DiesTriggeredAbility(new DamageMultiEffect(3, "it")); ability.addTarget(new TargetCreatureOrPlayerAmount(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GhituSlinger.java b/Mage.Sets/src/mage/cards/g/GhituSlinger.java index dbcc7361d36..677d71ed48f 100644 --- a/Mage.Sets/src/mage/cards/g/GhituSlinger.java +++ b/Mage.Sets/src/mage/cards/g/GhituSlinger.java @@ -56,7 +56,7 @@ public class GhituSlinger extends CardImpl { // Echo {2}{R} this.addAbility(new EchoAbility("{2}{R}")); // When Ghitu Slinger enters the battlefield, it deals 2 damage to target creature or player. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GibberingFiend.java b/Mage.Sets/src/mage/cards/g/GibberingFiend.java index d6e3400efa8..e875f2d4264 100644 --- a/Mage.Sets/src/mage/cards/g/GibberingFiend.java +++ b/Mage.Sets/src/mage/cards/g/GibberingFiend.java @@ -55,7 +55,7 @@ public class GibberingFiend extends CardImpl { this.toughness = new MageInt(1); // When Gibbering Fiend enters the battlefield, it deals 1 damage to each opponent. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT), false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT, "it"), false)); // Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, // Gibbering Fiend deals 1 damage to that player. diff --git a/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java b/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java index ca4c307cab5..25eb3214432 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java @@ -53,9 +53,7 @@ public class GoblinBoomKeg extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false)); // When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to target creature or player. - Effect effect = new DamageTargetEffect(3); - effect.setText("it deals 3 damage to target creature or player"); - Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(effect, false); + Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DamageTargetEffect(3, "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinCommando.java b/Mage.Sets/src/mage/cards/g/GoblinCommando.java index 7dba905b8a8..d5c2f5ca99b 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCommando.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCommando.java @@ -52,7 +52,7 @@ public class GoblinCommando extends CardImpl { this.toughness = new MageInt(2); // When Goblin Commando enters the battlefield, it deals 2 damage to target creature. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinMedics.java b/Mage.Sets/src/mage/cards/g/GoblinMedics.java index a3a1cb6b133..43c8e4ef104 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMedics.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMedics.java @@ -53,7 +53,7 @@ public class GoblinMedics extends CardImpl { this.toughness = new MageInt(1); // Whenever Goblin Medics becomes tapped, it deals 1 damage to target creature or player. - Ability ability = new BecomesTappedSourceTriggeredAbility(new DamageTargetEffect(1)); + Ability ability = new BecomesTappedSourceTriggeredAbility(new DamageTargetEffect(1, "it")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinShrine.java b/Mage.Sets/src/mage/cards/g/GoblinShrine.java index bba9f70d00a..b50e60b10a3 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinShrine.java +++ b/Mage.Sets/src/mage/cards/g/GoblinShrine.java @@ -82,7 +82,7 @@ public class GoblinShrine extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // When Goblin Shrine leaves the battlefield, it deals 1 damage to each Goblin creature. - this.addAbility(new LeavesBattlefieldTriggeredAbility(new DamageAllEffect(1, filterGoblin), false)); + this.addAbility(new LeavesBattlefieldTriggeredAbility(new DamageAllEffect(1, "it", filterGoblin), false)); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java b/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java index 28c954a59ab..ce4a79c8768 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSwineRider.java @@ -50,7 +50,7 @@ public class GoblinSwineRider extends CardImpl { this.toughness = new MageInt(1); // Whenever Goblin Swine-Rider becomes blocked, it deals 2 damage to each attacking creature and each blocking creature. - this.addAbility(new BecomesBlockedTriggeredAbility(new DamageAllEffect(2, new FilterAttackingOrBlockingCreature("attacking creature and each blocking creature")), false)); + this.addAbility(new BecomesBlockedTriggeredAbility(new DamageAllEffect(2, "it", new FilterAttackingOrBlockingCreature("attacking creature and each blocking creature")), false)); } public GoblinSwineRider(final GoblinSwineRider card) { diff --git a/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java b/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java index c37e3d849f5..879f7b82667 100644 --- a/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java +++ b/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java @@ -51,7 +51,7 @@ public class ImplementOfCombustion extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // {R}, Sacrifice Implement of Combustion: It deals 1 damage to target player. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/i/InfernoTitan.java b/Mage.Sets/src/mage/cards/i/InfernoTitan.java index 9bc6f6b876c..335f7120a09 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoTitan.java +++ b/Mage.Sets/src/mage/cards/i/InfernoTitan.java @@ -60,7 +60,7 @@ public class InfernoTitan extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); // Whenever Inferno Titan enters the battlefield or attacks, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players. - Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageMultiEffect(3)); + Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageMultiEffect(3, "it")); ability.addTarget(new TargetCreatureOrPlayerAmount(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonChampion.java b/Mage.Sets/src/mage/cards/k/KeldonChampion.java index e91da00a2a2..caf5f284fcd 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonChampion.java +++ b/Mage.Sets/src/mage/cards/k/KeldonChampion.java @@ -58,7 +58,7 @@ public class KeldonChampion extends CardImpl { // Echo {2}{R}{R} this.addAbility(new EchoAbility("{2}{R}{R}")); // When Keldon Champion enters the battlefield, it deals 3 damage to target player. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it"), false); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java index a36293ed4c5..24b59faa441 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java +++ b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java @@ -65,7 +65,7 @@ public class KeldonMarauders extends CardImpl { this.addAbility(new VanishingSacrificeAbility()); // When Keldon Marauders enters the battlefield or leaves the battlefield, it deals 1 damage to target player. - ability = new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageTargetEffect(1), false); + ability = new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageTargetEffect(1, "it"), false); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java index b740242d690..38fde758bce 100644 --- a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java +++ b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java @@ -61,7 +61,7 @@ public class KessigMalcontents extends CardImpl { this.toughness = new MageInt(1); // When Kessig Malcontents enters the battlefield, it deals damage to target player equal to the number of Humans you control. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter), "it")); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LavaHounds.java b/Mage.Sets/src/mage/cards/l/LavaHounds.java index f5ee035b66e..23f20e2b587 100644 --- a/Mage.Sets/src/mage/cards/l/LavaHounds.java +++ b/Mage.Sets/src/mage/cards/l/LavaHounds.java @@ -53,7 +53,7 @@ public class LavaHounds extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // When Lava Hounds enters the battlefield, it deals 4 damage to you. - this.addAbility(new EntersBattlefieldTriggeredAbility(new DamageControllerEffect(4))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new DamageControllerEffect(4, "it"))); } public LavaHounds(final LavaHounds card) { diff --git a/Mage.Sets/src/mage/cards/l/LightningDiadem.java b/Mage.Sets/src/mage/cards/l/LightningDiadem.java index 6c7f4172432..0f20e8d40ad 100644 --- a/Mage.Sets/src/mage/cards/l/LightningDiadem.java +++ b/Mage.Sets/src/mage/cards/l/LightningDiadem.java @@ -65,7 +65,7 @@ public class LightningDiadem extends CardImpl { this.addAbility(ability); // When Lightning Diadem enters the battlefield, it deals 2 damage to target creature or player. - ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); + ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/m/Meteorite.java b/Mage.Sets/src/mage/cards/m/Meteorite.java index 1edc8c70310..227ea2cb55e 100644 --- a/Mage.Sets/src/mage/cards/m/Meteorite.java +++ b/Mage.Sets/src/mage/cards/m/Meteorite.java @@ -47,7 +47,7 @@ public class Meteorite extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); // When Meteorite enters the battlefield, it deals 2 damage to target creature or player. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java b/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java index fee4bc3f5f7..6b1e5d852c0 100644 --- a/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java +++ b/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java @@ -52,7 +52,7 @@ public class MudbuttonTorchrunner extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); // When Mudbutton Torchrunner dies, it deals 3 damage to target creature or player. - Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(3), false); + Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(3, "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java b/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java index 4a82940d13d..618ac9b1c06 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java @@ -73,7 +73,7 @@ public class OrdealOfPurphoros extends CardImpl { this.addAbility(ability); // When you sacrifice Ordeal of Purphoros, it deals 3 damage to target creature or player. ability = new SacrificeSourceTriggeredAbility( - new DamageTargetEffect(3),false); + new DamageTargetEffect(3, "it"),false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PardicArsonist.java b/Mage.Sets/src/mage/cards/p/PardicArsonist.java index ddd8f0f9e84..e3b268f78da 100644 --- a/Mage.Sets/src/mage/cards/p/PardicArsonist.java +++ b/Mage.Sets/src/mage/cards/p/PardicArsonist.java @@ -58,7 +58,7 @@ public class PardicArsonist extends CardImpl { this.toughness = new MageInt(3); // Threshold - As long as seven or more cards are in your graveyard, Pardic Arsonist has "When Pardic Arsonist enters the battlefield, it deals 3 damage to target creature or player." - Ability gainedAbility = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)); + Ability gainedAbility = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); gainedAbility.addTarget(new TargetCreatureOrPlayer()); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( diff --git a/Mage.Sets/src/mage/cards/p/PerilousMyr.java b/Mage.Sets/src/mage/cards/p/PerilousMyr.java index 78f65d51345..196975e2e9a 100644 --- a/Mage.Sets/src/mage/cards/p/PerilousMyr.java +++ b/Mage.Sets/src/mage/cards/p/PerilousMyr.java @@ -51,7 +51,7 @@ public class PerilousMyr extends CardImpl { this.toughness = new MageInt(1); // When Perilous Myr dies, it deals 2 damage to target creature or player. - Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(2), false); + Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(2, "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PitchburnDevils.java b/Mage.Sets/src/mage/cards/p/PitchburnDevils.java index 468641efb12..a29fcaf59ee 100644 --- a/Mage.Sets/src/mage/cards/p/PitchburnDevils.java +++ b/Mage.Sets/src/mage/cards/p/PitchburnDevils.java @@ -51,7 +51,7 @@ public class PitchburnDevils extends CardImpl { this.toughness = new MageInt(3); // When Pitchburn Devils dies, it deals 3 damage to target creature or player. - DiesTriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(3)); + DiesTriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(3, "it")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java b/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java index cf4f97889d9..b723e23c491 100644 --- a/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java +++ b/Mage.Sets/src/mage/cards/r/RagingSwordtooth.java @@ -62,7 +62,7 @@ public class RagingSwordtooth extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // When Raging Swordtooth enters the battlefield, it deals 1 damage to each other creature. - addAbility(new EntersBattlefieldTriggeredAbility(new DamageAllEffect(1, filter))); + addAbility(new EntersBattlefieldTriggeredAbility(new DamageAllEffect(1, "it", filter))); } public RagingSwordtooth(final RagingSwordtooth card) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java index a456d90f152..92e3099d357 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageAllEffect.java @@ -53,13 +53,16 @@ public class DamageAllEffect extends OneShotEffect { public DamageAllEffect(int amount, String whoDealDamageName, FilterPermanent filter) { this(new StaticValue(amount), filter); + this.sourceName = whoDealDamageName; + setText(); // TODO: replace to @Override public String getText() } public DamageAllEffect(DynamicValue amount, FilterPermanent filter) { super(Outcome.Damage); this.amount = amount; this.filter = filter; + setText(); } @@ -84,7 +87,7 @@ public class DamageAllEffect extends OneShotEffect { return true; } - private void setText() { + public void setText() { StringBuilder sb = new StringBuilder(); sb.append(this.sourceName).append(" deals ").append(amount.toString()).append(" damage to each ").append(filter.getMessage()); String message = amount.getMessage(); diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java index 364726e363c..3e353a9c54e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageEverythingEffect.java @@ -50,11 +50,19 @@ public class DamageEverythingEffect extends OneShotEffect { private DynamicValue amount; private FilterPermanent filter; private UUID damageSource; + private String sourceName = "{source}"; public DamageEverythingEffect(int amount) { this(new StaticValue(amount), new FilterCreaturePermanent()); } + public DamageEverythingEffect(int amount, String whoDealDamageName) { + this(new StaticValue(amount), new FilterCreaturePermanent()); + + this.sourceName = whoDealDamageName; + setText(); // TODO: replace to @Override public String getText() + } + public DamageEverythingEffect(DynamicValue amount) { this(amount, new FilterCreaturePermanent()); } @@ -62,6 +70,7 @@ public class DamageEverythingEffect extends OneShotEffect { public DamageEverythingEffect(int amount, FilterPermanent filter) { this(new StaticValue(amount), filter); } + public DamageEverythingEffect(DynamicValue amount, FilterPermanent filter) { this(amount, filter, null); } @@ -71,7 +80,11 @@ public class DamageEverythingEffect extends OneShotEffect { this.amount = amount; this.filter = filter; this.damageSource = damageSource; - staticText = "{source} deals " + amount.toString() + " damage to each " + filter.getMessage() + " and each player"; + setText(); + } + + private void setText() { + staticText = this.sourceName + " deals " + this.amount.toString() + " damage to each " + this.filter.getMessage() + " and each player"; } public DamageEverythingEffect(final DamageEverythingEffect effect) { @@ -79,6 +92,7 @@ public class DamageEverythingEffect extends OneShotEffect { this.amount = effect.amount; this.filter = effect.filter; this.damageSource = effect.damageSource; + this.sourceName = effect.sourceName; } @Override diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java index 4ec652807ba..c5e0e34fe5d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamagePlayersEffect.java @@ -44,6 +44,7 @@ import mage.players.Player; public class DamagePlayersEffect extends OneShotEffect { private DynamicValue amount; private TargetController controller; + private String sourceName = "{source}"; public DamagePlayersEffect(int amount) { this(Outcome.Damage, new StaticValue(amount)); @@ -53,6 +54,13 @@ public class DamagePlayersEffect extends OneShotEffect { this(Outcome.Damage, new StaticValue(amount), controller); } + public DamagePlayersEffect(int amount, TargetController controller, String whoDealDamageName) { + this(Outcome.Damage, new StaticValue(amount), controller); + + this.sourceName = whoDealDamageName; + setText(); // TODO: replace to @Override public String getText() + } + public DamagePlayersEffect(Outcome outcome, DynamicValue amount) { this(outcome, amount, TargetController.ANY); } @@ -69,6 +77,7 @@ public class DamagePlayersEffect extends OneShotEffect { super(effect); this.amount = effect.amount; this.controller = effect.controller; + this.sourceName = effect.sourceName; } @Override @@ -103,7 +112,7 @@ public class DamagePlayersEffect extends OneShotEffect { private void setText() { - StringBuilder sb = new StringBuilder("{source} deals ").append(amount.toString()); + StringBuilder sb = new StringBuilder().append(this.sourceName).append(" deals ").append(amount.toString()); switch (controller) { case ANY: sb.append(" damage to each player"); From f80aae5161c71ba654d17d60549c3122baa859d8 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 5 Jan 2018 02:21:56 +0400 Subject: [PATCH 07/18] Updated tests --- Mage.Client/src/test/java/mage/client/util/ChrismasTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Client/src/test/java/mage/client/util/ChrismasTest.java b/Mage.Client/src/test/java/mage/client/util/ChrismasTest.java index 93d4b26c708..cbd40cc1ac1 100644 --- a/Mage.Client/src/test/java/mage/client/util/ChrismasTest.java +++ b/Mage.Client/src/test/java/mage/client/util/ChrismasTest.java @@ -13,11 +13,12 @@ public class ChrismasTest { private Date getDate(int Year, int Month, int Day){ Calendar cal = new GregorianCalendar(Year, Month - 1, Day); + cal.add(Calendar.HOUR, 10); return cal.getTime(); } @Test - public void ignoreDefaultResponse() throws Exception { + public void testChrismasDays() throws Exception { // chrismas from 15 december to 15 january Assert.assertEquals(false, isChrismasTime(getDate(2017, 11, 1))); Assert.assertEquals(false, isChrismasTime(getDate(2017, 11, 15))); From 24bd06a3a517dc7b25eec9a993999666e60b11c4 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 5 Jan 2018 02:41:19 +0400 Subject: [PATCH 08/18] Fixed wrong ability texts with duplicated card name (see #4335) --- Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java | 2 +- Mage.Sets/src/mage/cards/s/SellSwordBrute.java | 2 +- Mage.Sets/src/mage/cards/s/Showstopper.java | 2 +- Mage.Sets/src/mage/cards/s/SkirkMarauder.java | 2 +- Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java | 2 +- Mage.Sets/src/mage/cards/s/SorrowsPath.java | 2 +- Mage.Sets/src/mage/cards/s/Sparkcaster.java | 2 +- Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java | 2 +- Mage.Sets/src/mage/cards/s/Spitebellows.java | 2 +- Mage.Sets/src/mage/cards/s/SubterraneanShambler.java | 2 +- Mage.Sets/src/mage/cards/s/SunscorchedDesert.java | 2 +- Mage.Sets/src/mage/cards/t/ThorncasterSliver.java | 2 +- Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java | 2 +- Mage.Sets/src/mage/cards/t/ThunderDragon.java | 2 +- Mage.Sets/src/mage/cards/t/ThundermawHellkite.java | 2 +- Mage.Sets/src/mage/cards/t/TrialOfZeal.java | 2 +- Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java | 2 +- Mage.Sets/src/mage/cards/v/VoraciousDragon.java | 2 +- Mage.Sets/src/mage/cards/w/WalkingBallista.java | 4 +--- Mage.Sets/src/mage/cards/w/WhiptailMoloch.java | 2 +- 20 files changed, 20 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java index 0140e90c04d..3cc12b78430 100644 --- a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java +++ b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java @@ -67,7 +67,7 @@ public class ScuttlingDoomEngine extends CardImpl { // Scuttling Doom Engine can't be blocked by creatures with power 2 or less. this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); // When Scuttling Doom Engine dies, it deals 6 damage to target opponnent - Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(6), false); + Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(6, "it"), false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SellSwordBrute.java b/Mage.Sets/src/mage/cards/s/SellSwordBrute.java index 08c1129d110..1ba093afc0a 100644 --- a/Mage.Sets/src/mage/cards/s/SellSwordBrute.java +++ b/Mage.Sets/src/mage/cards/s/SellSwordBrute.java @@ -51,7 +51,7 @@ public class SellSwordBrute extends CardImpl { this.toughness = new MageInt(2); // When Sell-Sword Brute dies, it deals 2 damage to you. - this.addAbility(new DiesTriggeredAbility(new DamageControllerEffect(2), false)); + this.addAbility(new DiesTriggeredAbility(new DamageControllerEffect(2, "it"), false)); } public SellSwordBrute(final SellSwordBrute card) { diff --git a/Mage.Sets/src/mage/cards/s/Showstopper.java b/Mage.Sets/src/mage/cards/s/Showstopper.java index eb4729a62bb..e0d67689fe9 100644 --- a/Mage.Sets/src/mage/cards/s/Showstopper.java +++ b/Mage.Sets/src/mage/cards/s/Showstopper.java @@ -64,7 +64,7 @@ public class Showstopper extends CardImpl { // Until end of turn, creatures you control gain "When this creature dies, it deals 2 damage to target creature an opponent controls." - TriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(2), false); + TriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(2, "it"), false); Target target = new TargetCreaturePermanent(filter2); ability.addTarget(target); Effect effect = new GainAbilityControlledEffect(ability, Duration.EndOfTurn, filter); diff --git a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java index b0d98f1c18e..3e1506a866b 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java @@ -56,7 +56,7 @@ public class SkirkMarauder extends CardImpl { this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}"))); // When Skirk Marauder is turned face up, it deals 2 damage to target creature or player. - Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageTargetEffect(2)); + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageTargetEffect(2, "it")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java b/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java index 162e6326f84..21d159e0f78 100644 --- a/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java +++ b/Mage.Sets/src/mage/cards/s/SkysovereignConsulFlagship.java @@ -67,7 +67,7 @@ public class SkysovereignConsulFlagship extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever Skysovereign, Consul Flagship enters the battlefield or attacks, it deals 3 damage to target creature or planeswalker an opponent controls. - Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageTargetEffect(3)); + Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageTargetEffect(3, "it")); ability.addTarget(new TargetCreatureOrPlaneswalker(1, 1, filter, false)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SorrowsPath.java b/Mage.Sets/src/mage/cards/s/SorrowsPath.java index 18df5894f89..3c6534ae6da 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 )); + Ability ability2 = new BecomesTappedSourceTriggeredAbility(new DamageControllerEffect(2 , "it")); ability2.addEffect(new DamageAllEffect(2, new FilterControlledCreaturePermanent()).setText("and each creature you control")); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/s/Sparkcaster.java b/Mage.Sets/src/mage/cards/s/Sparkcaster.java index 12127302f17..a55b95df7d4 100644 --- a/Mage.Sets/src/mage/cards/s/Sparkcaster.java +++ b/Mage.Sets/src/mage/cards/s/Sparkcaster.java @@ -65,7 +65,7 @@ public class Sparkcaster extends CardImpl { // When Sparkcaster enters the battlefield, return a red or green creature you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false)); // When Sparkcaster enters the battlefield, it deals 1 damage to target player. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it"), false); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java b/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java index fcbc8eee436..c5d4abffa93 100644 --- a/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java +++ b/Mage.Sets/src/mage/cards/s/SpiresideInfiltrator.java @@ -51,7 +51,7 @@ public class SpiresideInfiltrator extends CardImpl { this.toughness = new MageInt(2); // Whenever Spireside Infiltrator becomes tapped, it deals one damage to each opponent. - this.addAbility(new BecomesTappedSourceTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT))); + this.addAbility(new BecomesTappedSourceTriggeredAbility(new DamagePlayersEffect(1, TargetController.OPPONENT, "it"))); } public SpiresideInfiltrator(final SpiresideInfiltrator card) { diff --git a/Mage.Sets/src/mage/cards/s/Spitebellows.java b/Mage.Sets/src/mage/cards/s/Spitebellows.java index b33d4961506..56834d77921 100644 --- a/Mage.Sets/src/mage/cards/s/Spitebellows.java +++ b/Mage.Sets/src/mage/cards/s/Spitebellows.java @@ -53,7 +53,7 @@ public class Spitebellows extends CardImpl { this.toughness = new MageInt(1); // When Spitebellows leaves the battlefield, it deals 6 damage to target creature. - Ability ability = new LeavesBattlefieldTriggeredAbility(new DamageTargetEffect(6), false); + Ability ability = new LeavesBattlefieldTriggeredAbility(new DamageTargetEffect(6, "it"), false); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); // Evoke {1}{R}{R} diff --git a/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java b/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java index 05cac8abffd..c6a20d0e129 100644 --- a/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java +++ b/Mage.Sets/src/mage/cards/s/SubterraneanShambler.java @@ -64,7 +64,7 @@ public class SubterraneanShambler extends CardImpl { this.addAbility(new EchoAbility("{3}{R}")); // When Subterranean Shambler enters the battlefield or leaves the battlefield, it deals 1 damage to each creature without flying. - this.addAbility(new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageAllEffect(1, filter), false)); + this.addAbility(new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageAllEffect(1, "it", filter), false)); } diff --git a/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java b/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java index 63d54229a8a..5bbd753ec06 100644 --- a/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java +++ b/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java @@ -50,7 +50,7 @@ public class SunscorchedDesert extends CardImpl { this.subtype.add(SubType.DESERT); // When Sunscorced Desert enters the battlefield, it deals 1 damage to target player. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it")); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java index 8a92e0610a5..f3dd09dbfed 100644 --- a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java +++ b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java @@ -57,7 +57,7 @@ public class ThorncasterSliver extends CardImpl { this.toughness = new MageInt(2); // Sliver creatures you control have "Whenever this creature attacks, it deals 1 damage to target creature or player." - Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1), false); + Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ability, diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java index 71493e17482..ba25667c34c 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java @@ -62,7 +62,7 @@ public class ThornscapeBattlemage extends CardImpl { this.addAbility(kickerAbility); // When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to target creature or player. - TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); + TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability1.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new ConditionalTriggeredAbility(ability1, new KickedCostCondition("{R}"), "When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to target creature or player.")); diff --git a/Mage.Sets/src/mage/cards/t/ThunderDragon.java b/Mage.Sets/src/mage/cards/t/ThunderDragon.java index 00068fed6c9..8676ae840b0 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderDragon.java +++ b/Mage.Sets/src/mage/cards/t/ThunderDragon.java @@ -63,7 +63,7 @@ public class ThunderDragon extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Thunder Dragon enters the battlefield, it deals 3 damage to each creature without flying. - TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageAllEffect(3, filter)); + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageAllEffect(3, "it", filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java b/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java index 07bc483ef31..390ed9461c7 100644 --- a/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java +++ b/Mage.Sets/src/mage/cards/t/ThundermawHellkite.java @@ -74,7 +74,7 @@ public class ThundermawHellkite extends CardImpl { this.addAbility(HasteAbility.getInstance()); // When Thundermaw Hellkite enters the battlefield, it deals 1 damage to each creature with flying your opponents control. Tap those creatures. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageAllEffect(1, filter)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageAllEffect(1, "it", filter)); ability.addEffect(new TapAllEffect(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java index 740d434734d..f699fff7263 100644 --- a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java +++ b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java @@ -57,7 +57,7 @@ public class TrialOfZeal extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // When Trial of Zeal enters the battlefield, it deals 3 damage to target creature or player. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java b/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java index b6c126cbc3c..41f1a0a6419 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java +++ b/Mage.Sets/src/mage/cards/t/TyrantsFamiliar.java @@ -68,7 +68,7 @@ public class TyrantsFamiliar extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Lieutenant - As long as you control your commander, Tyrant's Familiar gets +2/+2 and has "Whenever Tyrant's Familiar attacks, it deals 7 damage to target creature defending player controls." - Ability gainedAbility = new AttacksTriggeredAbility(new DamageTargetEffect(7), false); + Ability gainedAbility = new AttacksTriggeredAbility(new DamageTargetEffect(7, "it"), false); gainedAbility.addTarget(new TargetCreaturePermanent()); ContinuousEffect effect = new GainAbilitySourceEffect(gainedAbility); effect.setText("and has \"Whenever {this} attacks, it deals 7 damage to target creature defending player controls\""); diff --git a/Mage.Sets/src/mage/cards/v/VoraciousDragon.java b/Mage.Sets/src/mage/cards/v/VoraciousDragon.java index aac4d5491ec..a85e511f0ea 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousDragon.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousDragon.java @@ -68,7 +68,7 @@ public class VoraciousDragon extends CardImpl { this.addAbility(new DevourAbility(DevourFactor.Devour1)); // When Voracious Dragon enters the battlefield, it deals damage to target creature or player equal to twice the number of Goblins it devoured. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new TwiceDevouredGoblins()), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new TwiceDevouredGoblins(), "it"), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WalkingBallista.java b/Mage.Sets/src/mage/cards/w/WalkingBallista.java index 8b250484798..5bc3c0bf4bb 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingBallista.java +++ b/Mage.Sets/src/mage/cards/w/WalkingBallista.java @@ -66,9 +66,7 @@ public class WalkingBallista extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(4))); // Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to target creature or player. - Effect effect = new DamageTargetEffect(1); - effect.setText("It deals 1 damage to target creature or player"); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java b/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java index 6c28b90be89..37bb42e8362 100644 --- a/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java +++ b/Mage.Sets/src/mage/cards/w/WhiptailMoloch.java @@ -51,7 +51,7 @@ public class WhiptailMoloch extends CardImpl { this.toughness = new MageInt(3); // When Whiptail Moloch enters the battlefield, it deals 3 damage to target creature you control. - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it"), false); ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); } From 333f9fc2e63e72f3a95af5e747a7f1bfe2ebf88c Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 5 Jan 2018 03:50:43 +0400 Subject: [PATCH 09/18] [RIX] Added 4 cards --- .../mage/cards/d/DireFleetNeckbreaker.java | 81 +++++++++++++++++++ .../src/mage/cards/d/DuskLegionZealot.java | 73 +++++++++++++++++ .../src/mage/cards/f/FanaticalFirebrand.java | 80 ++++++++++++++++++ .../src/mage/cards/s/StormFleetSprinter.java | 67 +++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 4 + 5 files changed, 305 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DireFleetNeckbreaker.java create mode 100644 Mage.Sets/src/mage/cards/d/DuskLegionZealot.java create mode 100644 Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java create mode 100644 Mage.Sets/src/mage/cards/s/StormFleetSprinter.java diff --git a/Mage.Sets/src/mage/cards/d/DireFleetNeckbreaker.java b/Mage.Sets/src/mage/cards/d/DireFleetNeckbreaker.java new file mode 100644 index 00000000000..d43b15d8f4f --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetNeckbreaker.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.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author JayDi85 + */ +public class DireFleetNeckbreaker extends CardImpl { + + private static final FilterAttackingCreature filterYourAttackingPirates = new FilterAttackingCreature("Attacking Pirates"); + static { + filterYourAttackingPirates.add(new ControllerPredicate(TargetController.YOU)); + filterYourAttackingPirates.add(new SubtypePredicate(SubType.PIRATE)); + } + + public DireFleetNeckbreaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Attacking Pirates you control get +2/+0. + GainAbilityControlledEffect gainEffect = new GainAbilityControlledEffect( + new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Duration.Custom)), + Duration.WhileOnBattlefield, + filterYourAttackingPirates, + false + ); + gainEffect.setText("Attacking Pirates you control get +2/+0."); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, gainEffect)); + } + + public DireFleetNeckbreaker(final DireFleetNeckbreaker card) { + super(card); + } + + @Override + public DireFleetNeckbreaker copy() { + return new DireFleetNeckbreaker(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/d/DuskLegionZealot.java b/Mage.Sets/src/mage/cards/d/DuskLegionZealot.java new file mode 100644 index 00000000000..edd9a6ec82b --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DuskLegionZealot.java @@ -0,0 +1,73 @@ +/* + * 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.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; + +/** + * + * @author JayDi85 + */ +public class DuskLegionZealot extends CardImpl { + + public DuskLegionZealot (UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Dusk Legion Zealot enters the battlefield, you draw a card and you lose 1 life. + Effect drawEffect = new DrawCardSourceControllerEffect(1); + drawEffect.setText("you draw a card"); + Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect); + Effect lifeEffect = new LoseLifeSourceControllerEffect(1); + lifeEffect.setText("and you lose 1 life"); + ability.addEffect(lifeEffect); + this.addAbility(ability); + } + + public DuskLegionZealot (final DuskLegionZealot card) { + super(card); + } + + @Override + public DuskLegionZealot copy() { + return new DuskLegionZealot (this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java b/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java new file mode 100644 index 00000000000..42d3d2dab56 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java @@ -0,0 +1,80 @@ +package mage.cards.f; + +/* + * 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. + */ + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +import java.util.UUID; + + +/** + * + * @author JayDi85 + */ +public class FanaticalFirebrand extends CardImpl { + + public FanaticalFirebrand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {T}, Sacrifice Fanatical Firebrand: It deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public FanaticalFirebrand(final FanaticalFirebrand card) { + super(card); + } + + @Override + public FanaticalFirebrand copy() { + return new FanaticalFirebrand(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java b/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java new file mode 100644 index 00000000000..7e9c9287407 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java @@ -0,0 +1,67 @@ +/* + * 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.CantBeBlockedSourceAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; + +/** + * + * @author JayDi85 + */ +public class StormFleetSprinter extends CardImpl { + + public StormFleetSprinter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Storm Fleet Sprinter can’t be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + } + + public StormFleetSprinter(final StormFleetSprinter card) { + super(card); + } + + @Override + public StormFleetSprinter copy() { + return new StormFleetSprinter(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 48c57cc0b0d..6c3055c522e 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -64,9 +64,12 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Captain's Hook", 177, Rarity.RARE, mage.cards.c.CaptainsHook.class)); cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.RARE, mage.cards.c.CinderBarrens.class)); cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); + cards.add(new SetCardInfo("Dire Fleet Neckbreaker", 156, Rarity.UNCOMMON, mage.cards.d.DireFleetNeckbreaker.class)); cards.add(new SetCardInfo("Dusk Charger", 69, Rarity.COMMON, mage.cards.d.DuskCharger.class)); + cards.add(new SetCardInfo("Dusk Legion Zealot", 70, Rarity.COMMON, mage.cards.d.DuskLegionZealot.class)); cards.add(new SetCardInfo("Elenda, the Dusk Rose", 157, Rarity.MYTHIC, mage.cards.e.ElendaTheDuskRose.class)); cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.RARE, mage.cards.e.EvolvingWilds.class)); + cards.add(new SetCardInfo("Fanatical Firebrand", 101, Rarity.COMMON, mage.cards.f.FanaticalFirebrand.class)); cards.add(new SetCardInfo("Forerunner of the Coalition", 72, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheCoalition.class)); cards.add(new SetCardInfo("Forerunner of the Empire", 102, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheEmpire.class)); cards.add(new SetCardInfo("Forerunner of the Heralds", 129, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheHeralds.class)); @@ -91,6 +94,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Silvergill Adept", 53, Rarity.UNCOMMON, mage.cards.s.SilvergillAdept.class)); cards.add(new SetCardInfo("Skymarcher Aspirant", 21, Rarity.UNCOMMON, mage.cards.s.SkymarcherAspirant.class)); cards.add(new SetCardInfo("Sphinx's Decree", 24, Rarity.RARE, mage.cards.s.SphinxsDecree.class)); + cards.add(new SetCardInfo("Storm Fleet Sprinter", 172, Rarity.UNCOMMON, mage.cards.s.StormFleetSprinter.class)); cards.add(new SetCardInfo("Storm the Vault", 173, Rarity.RARE, mage.cards.s.StormTheVault.class)); cards.add(new SetCardInfo("Swab Goblin", 203, Rarity.COMMON, mage.cards.s.SwabGoblin.class)); cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); From 8681a09a0d2447a519a8d34ee5e1a7eb40110377 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 5 Jan 2018 06:04:49 +0000 Subject: [PATCH 10/18] Implemented Gabriel Angelfire --- .../src/mage/cards/g/GabrielAngelfire.java | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GabrielAngelfire.java diff --git a/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java b/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java new file mode 100644 index 00000000000..aea3ead01bf --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java @@ -0,0 +1,144 @@ +/* + * 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.g; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.RampageAbility; +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.players.Player; + +/** + * + * @author Styxo & L_J + */ +public class GabrielAngelfire extends CardImpl { + + public GabrielAngelfire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{G}{G}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, choose flying, first strike, trample, or rampage 3. Gabriel Angelfire gains that ability until your next upkeep. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new GabrielAngelfireGainAbilityEffect(), TargetController.YOU, false)); + } + + public GabrielAngelfire(final GabrielAngelfire card) { + super(card); + } + + @Override + public GabrielAngelfire copy() { + return new GabrielAngelfire(this); + } +} + +class GabrielAngelfireGainAbilityEffect extends GainAbilitySourceEffect { + + private static final Set choices = new LinkedHashSet<>(); + private boolean sameStep = true; + + static { + choices.add("Flying"); + choices.add("First strike"); + choices.add("Trample"); + choices.add("Rampage 3"); + } + + public GabrielAngelfireGainAbilityEffect() { + super(FlyingAbility.getInstance(), Duration.Custom); + staticText = "choose flying, first strike, trample, or rampage 3. {this} gains that ability until your next upkeep"; + } + + public GabrielAngelfireGainAbilityEffect(final GabrielAngelfireGainAbilityEffect effect) { + super(effect); + ability.newId(); + } + + @Override + public GabrielAngelfireGainAbilityEffect copy() { + return new GabrielAngelfireGainAbilityEffect(this); + } + + @Override + public boolean isInactive(Ability source, Game game) { + if (game.getPhase().getStep().getType() == PhaseStep.UPKEEP) { + if (!sameStep && game.getActivePlayerId().equals(source.getControllerId()) || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) { + return true; + } + } else { + sameStep = false; + } + return false; + } + + 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 "Flying": + // ability = FlyingAbility.getInstance(); + // break; + case "First strike": + ability = FirstStrikeAbility.getInstance(); + break; + case "Trample": + ability = TrampleAbility.getInstance(); + break; + case "Rampage 3": + ability = new RampageAbility(3); + break; + default: + ability = FlyingAbility.getInstance(); + break; + } + } + } + } + +} From 2be16d467a59b180f06356f16c6d8c35e1ed168e Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 5 Jan 2018 06:05:29 +0000 Subject: [PATCH 11/18] Implemented Halfdane --- Mage.Sets/src/mage/cards/h/Halfdane.java | 136 +++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/Halfdane.java diff --git a/Mage.Sets/src/mage/cards/h/Halfdane.java b/Mage.Sets/src/mage/cards/h/Halfdane.java new file mode 100644 index 00000000000..591be18213c --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/Halfdane.java @@ -0,0 +1,136 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class Halfdane extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature other than Halfdane"); + + static { + filter.add(new AnotherPredicate()); + } + + public Halfdane(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}{B}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of your upkeep, change Halfdane's base power and toughness to the power and toughness of target creature other than Halfdane until the end of your next upkeep. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new HalfdaneUpkeepEffect(), TargetController.YOU, false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public Halfdane(final Halfdane card) { + super(card); + } + + @Override + public Halfdane copy() { + return new Halfdane(this); + } +} + +class HalfdaneUpkeepEffect extends OneShotEffect { + + public HalfdaneUpkeepEffect() { + super(Outcome.Detriment); + this.staticText = "change {this}'s base power and toughness to the power and toughness of target creature other than Halfdane until the end of your next upkeep"; + } + + public HalfdaneUpkeepEffect(final HalfdaneUpkeepEffect effect) { + super(effect); + } + + @Override + public HalfdaneUpkeepEffect copy() { + return new HalfdaneUpkeepEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (permanent != null) { + ContinuousEffect effect = new HalfdaneSetPowerToughnessEffect(permanent.getPower().getValue(), permanent.getToughness().getValue()); + game.addEffect(effect, source); + return true; + } + } + return false; + } +} + +class HalfdaneSetPowerToughnessEffect extends SetPowerToughnessSourceEffect { + + public HalfdaneSetPowerToughnessEffect(int power, int toughness) { + super(power, toughness, Duration.UntilYourNextTurn, SubLayer.SetPT_7b); + } + + public HalfdaneSetPowerToughnessEffect(final HalfdaneSetPowerToughnessEffect effect) { + super(effect); + } + + @Override + public boolean isInactive(Ability source, Game game) { + if (super.isInactive(source, game) && game.getStep().getType().isAfter(PhaseStep.UPKEEP)) { + return true; + } + return false; + } + + @Override + public HalfdaneSetPowerToughnessEffect copy() { + return new HalfdaneSetPowerToughnessEffect(this); + } + +} From 8c430ea752a7acfd4ce2aed27e6cf4de737afb10 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 5 Jan 2018 06:06:37 +0000 Subject: [PATCH 12/18] Implemented Shimian Night Stalker --- .../src/mage/cards/s/ShimianNightStalker.java | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ShimianNightStalker.java diff --git a/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java b/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java new file mode 100644 index 00000000000..31e80d7ce29 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java @@ -0,0 +1,122 @@ +/* + * 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.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.RedirectionEffect; +import mage.cards.CardImpl; +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.permanent.AttackingPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 & L_J + */ +public class ShimianNightStalker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking creature"); + + static { + filter.add(new AttackingPredicate()); + } + + public ShimianNightStalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.subtype.add(SubType.NIGHTSTALKER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {B}, {T}: All damage that would be dealt to you this turn by target attacking creature is dealt to Shimian Night Stalker instead. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShimianNightStalkerRedirectDamageEffect(), new ManaCostsImpl("{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ShimianNightStalker(final ShimianNightStalker card) { + super(card); + } + + @Override + public ShimianNightStalker copy() { + return new ShimianNightStalker(this); + } +} + +class ShimianNightStalkerRedirectDamageEffect extends RedirectionEffect { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + public ShimianNightStalkerRedirectDamageEffect() { + super(Duration.EndOfTurn, Integer.MAX_VALUE, true); + this.staticText = "All damage that would be dealt to you this turn by target attacking creature is dealt to {this} instead"; + } + + public ShimianNightStalkerRedirectDamageEffect(final ShimianNightStalkerRedirectDamageEffect effect) { + super(effect); + } + + @Override + public ShimianNightStalkerRedirectDamageEffect copy() { + return new ShimianNightStalkerRedirectDamageEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + if (permanent != null) { + if (filter.match(permanent, permanent.getId(), permanent.getControllerId(), game)) { + if (event.getSourceId() != null && event.getTargetId() != null) { + if (event.getSourceId().equals(getTargetPointer().getFirst(game, source)) + && event.getTargetId().equals(source.getControllerId())) { + TargetPermanent target = new TargetPermanent(); + target.add(source.getSourceId(), game); + redirectTarget = target; + return true; + } + } + } + } + return false; + } +} From b7f3fc19f9600b85ad563d7e54224830c887747e Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 5 Jan 2018 06:07:35 +0000 Subject: [PATCH 13/18] Implemented cards --- 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 688c6f068eb..267ba6d0339 100644 --- a/Mage.Sets/src/mage/sets/Chronicles.java +++ b/Mage.Sets/src/mage/sets/Chronicles.java @@ -92,6 +92,7 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Fire Drake", 47, Rarity.UNCOMMON, mage.cards.f.FireDrake.class)); cards.add(new SetCardInfo("Flash Flood", 21, Rarity.COMMON, mage.cards.f.FlashFlood.class)); cards.add(new SetCardInfo("Fountain of Youth", 78, Rarity.COMMON, mage.cards.f.FountainOfYouth.class)); + cards.add(new SetCardInfo("Gabriel Angelfire", 111, Rarity.RARE, mage.cards.g.GabrielAngelfire.class)); cards.add(new SetCardInfo("Ghazban Ogre", 37, Rarity.COMMON, mage.cards.g.GhazbanOgre.class)); cards.add(new SetCardInfo("Goblin Artisans", 48, Rarity.UNCOMMON, mage.cards.g.GoblinArtisans.class)); cards.add(new SetCardInfo("Goblin Digging Team", 49, Rarity.COMMON, mage.cards.g.GoblinDiggingTeam.class)); @@ -129,6 +130,7 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Sentinel", 281, Rarity.RARE, mage.cards.s.Sentinel.class)); cards.add(new SetCardInfo("Serpent Generator", 88, Rarity.RARE, mage.cards.s.SerpentGenerator.class)); cards.add(new SetCardInfo("Shield Wall", 68, Rarity.UNCOMMON, mage.cards.s.ShieldWall.class)); + cards.add(new SetCardInfo("Shimian Night Stalker", 8, Rarity.UNCOMMON, mage.cards.s.ShimianNightStalker.class)); cards.add(new SetCardInfo("Sivitri Scarzam", 119, Rarity.UNCOMMON, mage.cards.s.SivitriScarzam.class)); cards.add(new SetCardInfo("Sol'kanar the Swamp King", 120, Rarity.RARE, mage.cards.s.SolkanarTheSwampKing.class)); cards.add(new SetCardInfo("Storm Seeker", 42, Rarity.UNCOMMON, mage.cards.s.StormSeeker.class)); From 9d591b5172cedd34697ad06f0adebb435e335b2c Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 5 Jan 2018 06:08:08 +0000 Subject: [PATCH 14/18] Implemented cards --- Mage.Sets/src/mage/sets/MastersEditionIII.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/sets/MastersEditionIII.java b/Mage.Sets/src/mage/sets/MastersEditionIII.java index 540f53d38cc..a13e298cd19 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIII.java @@ -124,6 +124,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Forest", 229, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 230, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Frost Giant", 101, Rarity.UNCOMMON, mage.cards.f.FrostGiant.class)); + cards.add(new SetCardInfo("Gabriel Angelfire", 148, Rarity.RARE, mage.cards.g.GabrielAngelfire.class)); cards.add(new SetCardInfo("Gaea's Touch", 120, Rarity.UNCOMMON, mage.cards.g.GaeasTouch.class)); cards.add(new SetCardInfo("Ghostly Visit", 67, Rarity.COMMON, mage.cards.g.GhostlyVisit.class)); cards.add(new SetCardInfo("Ghosts of the Damned", 68, Rarity.COMMON, mage.cards.g.GhostsOfTheDamned.class)); @@ -132,6 +133,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Guan Yu's 1,000-Li March", 13, Rarity.RARE, mage.cards.g.GuanYus1000LiMarch.class)); cards.add(new SetCardInfo("Guan Yu, Sainted Warrior", 12, Rarity.UNCOMMON, mage.cards.g.GuanYuSaintedWarrior.class)); cards.add(new SetCardInfo("Gwendlyn Di Corci", 149, Rarity.RARE, mage.cards.g.GwendlynDiCorci.class)); + cards.add(new SetCardInfo("Halfdane", 150, Rarity.RARE, mage.cards.h.Halfdane.class)); cards.add(new SetCardInfo("Hammerheim", 207, Rarity.UNCOMMON, mage.cards.h.Hammerheim.class)); cards.add(new SetCardInfo("Hazezon Tamar", 151, Rarity.RARE, mage.cards.h.HazezonTamar.class)); cards.add(new SetCardInfo("Heal", 14, Rarity.COMMON, mage.cards.h.Heal.class)); From 4b24a15bd11eac89454f05befd75a5689a42b603 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Fri, 5 Jan 2018 06:08:46 +0000 Subject: [PATCH 15/18] Implemented cards --- Mage.Sets/src/mage/sets/Legends.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage.Sets/src/mage/sets/Legends.java b/Mage.Sets/src/mage/sets/Legends.java index e2c6548a2ec..144d0db8944 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("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("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)); cards.add(new SetCardInfo("Ghosts of the Damned", 12, Rarity.COMMON, mage.cards.g.GhostsOfTheDamned.class)); cards.add(new SetCardInfo("Giant Strength", 147, Rarity.COMMON, mage.cards.g.GiantStrength.class)); @@ -137,6 +138,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Greed", 15, Rarity.RARE, mage.cards.g.Greed.class)); cards.add(new SetCardInfo("Green Mana Battery", 223, Rarity.UNCOMMON, mage.cards.g.GreenManaBattery.class)); cards.add(new SetCardInfo("Gwendlyn Di Corci", 268, Rarity.RARE, mage.cards.g.GwendlynDiCorci.class)); + cards.add(new SetCardInfo("Halfdane", 269, Rarity.RARE, mage.cards.h.Halfdane.class)); cards.add(new SetCardInfo("Hammerheim", 247, Rarity.UNCOMMON, mage.cards.h.Hammerheim.class)); cards.add(new SetCardInfo("Hazezon Tamar", 270, Rarity.RARE, mage.cards.h.HazezonTamar.class)); cards.add(new SetCardInfo("Headless Horseman", 16, Rarity.COMMON, mage.cards.h.HeadlessHorseman.class)); @@ -239,6 +241,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Sentinel", 239, Rarity.RARE, mage.cards.s.Sentinel.class)); cards.add(new SetCardInfo("Serpent Generator", 240, Rarity.RARE, mage.cards.s.SerpentGenerator.class)); cards.add(new SetCardInfo("Shield Wall", 205, Rarity.UNCOMMON, mage.cards.s.ShieldWall.class)); + cards.add(new SetCardInfo("Shimian Night Stalker", 30, Rarity.UNCOMMON, mage.cards.s.ShimianNightStalker.class)); cards.add(new SetCardInfo("Sir Shandlar of Eberyn", 297, Rarity.UNCOMMON, mage.cards.s.SirShandlarOfEberyn.class)); cards.add(new SetCardInfo("Sivitri Scarzam", 298, Rarity.UNCOMMON, mage.cards.s.SivitriScarzam.class)); cards.add(new SetCardInfo("Sol'kanar the Swamp King", 299, Rarity.RARE, mage.cards.s.SolkanarTheSwampKing.class)); From 95b7742428543c073b1a61e3d3e95a9732f29fd8 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 5 Jan 2018 10:40:10 +0100 Subject: [PATCH 16/18] Updated mtg-cards-data.txt with spoilers 127/196 of 2018-01-05 10:40 CET --- Utils/mtg-cards-data.txt | 45 +++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index d7fa24cb8f9..89dbebdd584 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32705,40 +32705,50 @@ Radiant Destiny|Rivals of Ixalan|18|R|{2}{W}|Enchantment|||Ascend (If you con Skymarcher Aspirant|Rivals of Ixalan|21|U|{W}|Creature - Vampire Soldier|2|1|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Skymarcher Aspirant has flying as long as you have the city's blessing.| Slaughter the Strong|Rivals of Ixalan|22|R|{1}{W}{W}|Sorcery|||Each player chooses any number of creatures he or she controls with total power 4 or less, then sacrifices all other creatures he or she controls.| Sphinx's Decree|Rivals of Ixalan|24|R|{1}{W}|Sorcery|||Each opponent can't cast instant or sorcery spells during that player's next turn.| +Sun-Crested Pterodon|Rivals of Ixalan|27|C|{4}{W}|Creature - Dinosaur|2|5|Flying$Sun-Crested Pterodon has vigilance as long as you control another Dinosaur.| Temple Altisaur|Rivals of Ixalan|28|R|{4}{W}|Creature - Dinosaur|3|4|If a source would deal damage to another Dinosaur you control, prevent all but 1 of that damage.| Vicious Cagemaw|Rivals of Ixalan|29|M|{3}{W}{W}|Creature - Dinosaur|5|5|Enrage — Whenever Vicious Cagemaw is dealt damage, exile target creature an opponent controls until Vicious Cagemaw leaves the battlefield.| Zetalpa, Primal Dawn|Rivals of Ixalan|30|R|{6}{W}{W}|Legendary Creature - Elder Dinosaur|4|8|Flying, double strike, vigilance, trample, indestructible| Admiral's Order|Rivals of Ixalan|31|R|{1}{U}{U}|Instant|||Raid — If you attacked with a creature this turn, you may pay {U} rather than pay this spell's mana cost.$Counter target spell.| Aquatic Incursion|Rivals of Ixalan|32|U|{3}{U}|Enchantment|||When Aquatic Incursion enters the battlefield, create two 1/1 blue Merfolk creature tokens with hexproof. (They can't be the target of spells or abilities your opponents control.)${3}{U}: Target Merfolk can't be blocked this turn.| Crafty Cutpurse|Rivals of Ixalan|33|R|{3}{U}|Creature - Human Pirate|2|2|Flash$When Crafty Cutpurse enters the battlefield, each token that would be created under an opponent's control this turn is created your control instead.| -Deadeye Rig Hauler|Rivals of Ixalan|36|C|{3}{U}|Creature - Human Pirate|3|2|Raid— When Fathom Fleet Rig-Hauler enters the battlefield, if you attacked with a creature this turn, you may return target creature to its owner's hand.| +Deadeye Rig-Hauler|Rivals of Ixalan|36|C|{3}{U}|Creature - Human Pirate|3|2|Raid— When Deadeye Rig-Hauler enters the battlefield, if you attacked with a creature this turn, you may return target creature to its owner's hand.| Flood of Recollection|Rivals of Ixalan|38|U|{U}{U}|Sorcery|||Return target instant or sorcery card from your graveyard to your hand. Exile Flood of Recollection.| +Hornswoggle|Rivals of Ixalan|39|U|{2}{U}|Instant|||Counter target creature spell. You create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| Induced Amnesia|Rivals of Ixalan|40|R|{2}{U}|Enchantment|||When Induced Amnesia enters the battlefield, target player exiles all the cards in his or her hand face down, then draws that many cards.$When Induced Amnesia is put into a graveyard from the battlefield, return the exiled cards to their owner's hand.| Kumena's Awakening|Rivals of Ixalan|42|R|{2}{U}{U}|Enchantment|||Ascend (If you control ten or more permenants, you get the city's blessing for the rest of the game.)$At the beginning of your upkeep, each player draws a card. If you have the city's blessing, instead only you draw a card.| Negate|Rivals of Ixalan|44|C|{1}{U}|Instant|||Counter target noncreature spell.| Nezahal, Primal Tide|Rivals of Ixalan|45|M|{5}{U}{U}|Legendary Creature - Elder Dinosaur|7|7|Nezahal, Primal Tide can't be countered.$You have no maximum hand size.$Whenever an opponent casts a noncreature spell, draw a card.$Discard three cards: Exile Nezahal. Return it to the battlefield tapped under its owner's control at the beginning of the next end step.| -Disperse in the Wind|Rivals of Ixalan|46|R|{2}{U}|Instant|||Exile target nonland permanent. For as long as that card remains exiled, it's owner may cast it without paying its mana cost.| +Return to the Wind|Rivals of Ixalan|46|R|{2}{U}|Instant|||Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.| River Darter|Rivals of Ixalan|47|C|{2}{U}|Creature - Merfolk Warrior|2|3|River Darter can't be blocked by Dinosaurs.| +Sea Legs|Rivals of Ixalan|50|C|{U}|Enchantment - Aura|||Flash$Enchant creature$Enchanted creature gets +0/+2 as long as it's a Pirate. Otherwise, it gets -2/-0.| Seafloor Oracle|Rivals of Ixalan|51|R|{2}{U}{U}|Creature - Merfolk Wizard|2|3|Whenever a Merfolk you controls deals combat damage to a player, draw a card.| Secrets of the Golden City|Rivals of Ixalan|52|C|{1}{U}{U}|Sorcery|||Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Draw two cards. If you have the city's blessing, draw three cards instead.| Silvergill Adept|Rivals of Ixalan|53|U|{1}{U}|Creature - Merfolk Wizard|2|1|As an additional cost to cast Silvergill Adept, reveal a Merfolk card from your hand or pay {3}.$When Silvergill Adept enters the battlefield, draw a card.| Timestream Navigator|Rivals of Ixalan|59|M|{1}{U}|Creature - Human Pirate Wizard|1|1|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)${2}{U}{U}, {T}, Put Timestream Navigator on the bottom of its owner's library: Take an extra turn after this one. Activate this ability only if you have the city's blessing.| -Warsail Marauder|Rivals of Ixalan|60|R|{1}{U}|Creature - Human Pirate|2|1|Flying$Whenever Warsail Marauder attacks, target creature loses all abilities and has base power and toughness 0/1 until end of turn.| -Arterial Flow|Rivals of Ixalan|62|U|{1}{B}{B}|Sorcery|||Each opponent discards two cards.$If you control a Vampire, each opponent loses 2 life and you gain 2 life.| +Warkite Marauder|Rivals of Ixalan|60|R|{1}{U}|Creature - Human Pirate|2|1|Flying$Whenever Warkite Marauder attacks, target creature defending player controls loses all abilities and has base power and toughness 0/1 until end of turn.| +Arterial Flow|Rivals of Ixalan|62|U|{1}{B}{B}|Sorcery|||Each opponent discards two cards. If you control a Vampire, each opponent loses 2 life and you gain 2 life.| +Champion of Dusk|Rivals of Ixalan|64|R|{3}{B}{B}|Creature - Vampire Knight|4|4|When Champion of Dusk enters the battlefield, you draw X cards and you lose X life, where X is the number of Vampires you control.| Dead Man's Chest|Rivals of Ixalan|66|R|{1}{B}|Enchantment - Aura|||Enchant creature an opponent controls$When enchanted creature dies, exile cards equal to its power from the top of its owner's library. You may cast nonland cards from among them as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.| +Dinosaur Hunter|Rivals of Ixalan|67|C|{1}{B}|Creature - Human Pirate|2|2|Whenever Dinosaur Hunter deals damage to a Dinosaur, destroy that creature.| Dire Fleet Poisoner|Rivals of Ixalan|68|R|{1}{B}|Creature - Human Pirate|2|2|Flash$Deathtouch$When Dire Fleet Poisoner enters the battlefield, target attacking Pirate you control gets +1/+1 and gains deathtouch until end of turn.| Dusk Charger|Rivals of Ixalan|69|C|{3}{B}|Creature - Horse|3|3|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Dusk Charger gets +2/+2 as long as you have the city's blessing.| Dusk Legion Zealot|Rivals of Ixalan|70|C|{1}{B}|Creature - Vampire Soldier|1|1|When Dusk Legion Zealot enters the battlefield, you draw a card and you lose 1 life.| Forerunner of the Coalition|Rivals of Ixalan|72|U|{2}{B}|Creature - Human Pirate|2|2|When Forerunner of the Coalition enters the battlefield, you may search your library for a Pirate card, reveal it, then shuffle your library and put that card on top of it.$Whenever another Pirate enters the battlefield under your control, each opponent loses 1 life.| Golden Demise|Rivals of Ixalan|73|U|{1}{B}{B}|Sorcery|||Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$All creatures get -2/-2 until end of turn. If you have the city's blessing, instead only creatures your opponents control get -2/-2 until end of turn.| +Mastermind's Acquisition|Rivals of Ixalan|77|R|{2}{B}{B}|Sorcery|||Choose one —$• Search your library for a card, put it into your hand, then shuffle your library.$• Choose a card you own from outside the game and put it into your hand.| Moment of Craving|Rivals of Ixalan|79|C|{1}{B}|Instant|||Target creature gets -2/-2 until end of turn. You gain 2 life.| +Pitiless Plunderer|Rivals of Ixalan|81|U|{3}{B}|Creature - Human Pirate|1|4|Whenever another creature you control dies, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."| Ravenous Chupacabra|Rivals of Ixalan|82|U|{2}{B}{B}|Creature - Beast Horror|2|2|When Ravenous Chupacabra enters the battlefield, destroy target creature an opponent controls.| Tetzimoc, Primal Death|Rivals of Ixalan|86|R|{4}{B}{B}|Legendary Creature - Elder Dinosaur|6|6|Deathtouch${B}, Reveal Tetzimoc, Primal Death from your hand: Put a prey counter on target creature. Activate this ability only during your turn.$When Tetzimoc, Primal Death enters the battlefield, destroy each creature your opponents control with a prey counter on it.| Tomb Robber|Rivals of Ixalan|87|R|{2}{B}|Creature - Human Pirate|1|1|Menace${1}, Discard a card: Tomb Robber explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.)| +Twilight Prophet|Rivals of Ixalan|88|M|{2}{B}{B}|Creature - Vampire Cleric|2|4|Flying$Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand. Each opponent loses X life and you gain X life, where X is that card's converted mana cost.| Vona's Hunger|Rivals of Ixalan|90|R|{2}{B}|Instant|||Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Each opponent sacrifices a creature. If you have the city's blessing, instead each opponent sacrifices half the creatures he or she controls rounded up.| +Blood Sun|Rivals of Ixalan|92|R|{2}{R}|Enchantment|||When Blood Sun enters the battlefield, draw a card.$All lands lose all abilities except mana abilities.| Brass's Bounty|Rivals of Ixalan|94|R|{6}{R}|Sorcery|||For each land you control, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| +Buccaneer's Bravado|Rivals of Ixalan|96|C|{1}{R}|Instant|||Choose one —$• Target creature gets +1/+1 and gains first strike until end of turn.$• Target Pirate gets +1/+1 and gains double strike until end of turn.| Daring Buccaneer|Rivals of Ixalan|98|U|{R}|Creature - Human Pirate|2|2|As an additional cost to cast Daring Buccaneer, reveal a Pirate card from your hand or pay {2}.| -Dire Fleet Daredevil|Rivals of Ixalan|99|R|{1}{R}|Creature - Human Pirate|2|1|First strike$When this enters the battlefield, exile target instant or sorcery card from an opponent's graveyard. You may cast that card this turn and you may spend mana as though it were mana of any color. If that card would be put into a graveyard this turn, exile it instead.| +Dire Fleet Daredevil|Rivals of Ixalan|99|R|{1}{R}|Creature - Human Pirate|2|1|First strike$When Dire Fleet Daredevil enters the battlefield, exile target instant or sorcery card from an opponent's graveyard. You may cast that card this turn, and you may spend mana as though it were mana of any type to cast that spell. If that card would be put into a graveyard this turn, exile it instead.| Etali, Primal Storm|Rivals of Ixalan|100|R|{4}{R}{R}|Legendary Creature - Elder Dinosaur|6|6|Whenever Etali, Primal Storm attacks, exile the top card of each player's library, then you may cast any number of nonland cards exiled this way without paying their mana costs.| Fanatical Firebrand|Rivals of Ixalan|101|C|{R}|Creature - Goblin Pirate|1|1|Haste${t}, Sacrifice Fanatical Firebrand: It deals one damage to target creature or player.| Forerunner of the Empire|Rivals of Ixalan|102|U|{3}{R}|Creature - Human Soldier|1|3|When Forerunner of the Empire enters the battlefield, you may search your library for a Dinosaur card, reveal it, then shuffle your library and put that card on top of it.$Whenever a Dinosaur enters the battlefield under your control, you may have Forerunner of the Empire deal 1 damage to each creature.| @@ -32748,6 +32758,7 @@ Mutiny|Rivals of Ixalan|106|C|{R}|Sorcery|||Target creature an opponent controls Pirate's Pillage|Rivals of Ixalan|109|U|{3}{R}|Sorcery|||As an additional cost to cast Pirate's Pillage, discard a card.$Draw two cards and create two colorless Treasure artifacts with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| Rekindling Phoenix|Rivals of Ixalan|111|M|{2}{R}{R}|Creature - Phoenix|4|3|Flying$When Rekindling Phoenix dies, create a 0/1 red Elemental creature token with "At the beginning of your upkeep, sacrifice this creature and return target card named Rekindling Phoenix from your graveyard to the battlefield. It gains haste until end of turn."| Steelclad Ferocidons|Rivals of Ixalan|115|R|{5}{R}{R}|Creature - Dinosaur|8|5|Enrage — Whenever Steelclad Ferocidons is dealt damage, each opponent sacrifices a permanent.| +Sun-Collared Raptor|Rivals of Ixalan|118|C|{1}{R}|Creature - Dinosaur|1|2|Trample${2}{R}: Sun-Collared Raptor gets +3/+0 until end of turn.| Swaggering Corsair|Rivals of Ixalan|119|C|{2}{R}|Creature - Human Pirate|2|2|Raid — Swaggering Corsair enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.| Tilonalli's Summoner|Rivals of Ixalan|121|R|{1}{R}|Creature - Human Shaman|1|1|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Whenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.| Cherished Hatchling|Rivals of Ixalan|124|U|{1}{G}|Creature - Dinosaur|2|1|When Cherished Hatchling dies, you may cast Dinosaur spells this turn as though they had flash, and whenever you cast a Dinosaur spell this turn, it gains "When this creature enters the battlefield, you may have it fight another target creature."| @@ -32756,46 +32767,52 @@ Enter the Unknown|Rivals of Ixalan|128|U|{G}|Sorcery|||Target creature you contr Forerunner of the Heralds|Rivals of Ixalan|129|U|{3}{G}|Creature - Merfolk Scout|3|2|When Forerunner of the Heralds enters the battlefield, you may search your library for a Merfolk card, reveal it, then shuffle your library and put that card on top of it.$Whenever another Merfolk enters the battlefield under your control, put a +1/+1 counter on Forerunner of the Heralds.| Ghalta, Primal Hunger|Rivals of Ixalan|130|R|{1}{0}{G}{G}|Legendary Creature - Elder Dinosaur|12|12|Ghalta, Primal Hunger costs {X} less to cast, where X is the total power of creatures you control.$Trample| Jadelight Ranger|Rivals of Ixalan|136|R|{1}{G}{G}|Creature - Merfolk Scout|2|1|When Jadelight Ranger enters the battlefield it explores, then it explores again. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard. Then repeat this process.) | -Naturalize|Rivals of Ixalan|139|C|{1}{G}|Instant|||Destroy target artifact or enchantment| +Naturalize|Rivals of Ixalan|139|C|{1}{G}|Instant|||Destroy target artifact or enchantment.| Path to Discovery|Rivals of Ixalan|142|R|{3}{G}|Enchantment|||Whenever a creature enters the battlefield under your control, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on the creature, then put the card back or put it into your graveyard.)| Polyraptor|Rivals of Ixalan|144|M|{6}{G}{G}|Creature - Dinosaur|5|5|Enrage — Whenever Polyraptor is dealt damage, create a token that is a copy of Polyraptor.| Swift Warden|Rivals of Ixalan|146|U|{1}{G}{G}|Creature - Merfolk Warrior|3|3|When Swift Warden enters the battlefield, target Merfolk you control gains hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.)| Tendershoot Dryad|Rivals of Ixalan|147|R|{4}{G}|Creature - Dryad|2|2|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$At the beginning of each upkeep, create a 1/1 green Saproling creature token.$Saprolings you control get +2/+2 as long as you have the city's blessing.| Thrashing Brontodon|Rivals of Ixalan|148|U|{1}{G}{G}|Creature - Dinosaur|3|4|{1}, Sacrificing Thrashing Brontodon: Destroy target artifact or enchantment.| Thunderherd Migration|Rivals of Ixalan|149|U|{1}{G}|Sorcery|||As an additional cost to cast Thunderherd Migration, reveal a Dinosaur card from your hand or pay {1}.$Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| +Wayward Swordtooth|Rivals of Ixalan|150|R|{2}{G}|Creature - Dinosaur|5|5|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$You may play an additional land on each of your turns. $Wayward Sawtooth can't attack or block unless you have the city's blessing.| World Shaper|Rivals of Ixalan|151|R|{3}{G}|Creature - Merfolk Shaman|3|3|Whenever World Shaper attacks, you may put the top three cards of your library into your graveyard.$When World Shaper dies, put all land cards from your graveyard onto the battlefield tapped.| Angrath, the Flame-Chained|Rivals of Ixalan|152|M|{3}{B}{R}|Legendary Planeswalker - Angrath|4|+1: Each opponent discards a card and loses 2 life.$-3: Gain control of target creature until end of turn. Untap it. It gains haste until end of turn. Sacrifice it at the beginning of the next end step if it has converted mana cost 3 or less.$-8: Each opponent loses life equal to the number of cards in his or her graveyard.| Atzocan Seer|Rivals of Ixalan|153|U|{1}{G}{W}|Creature - Human Druid|2|3|{t}: Add one mana of any color to your manan pool.$Sacrifice Atzocan Seer: Return target Dinosaur card from your graveyard to your hand.| Azor, the Lawbringer|Rivals of Ixalan|154|M|{2}{W}{W}{U}{U}|Legendary Creature - Sphinx|6|6|Flying$When Azor, the Lawbringer enters the battlefield, each opponent can't cast instant and sorcery spells during that player's next turn.$Whenever Azor attacks, you may pay {X}{W}{U}{U}. If you do, you gain X life and draw X cards.| -Deadeye Brawler|Rivals of Ixalan|155|U|{2}{U}{B}|Creature - Human Pirate|2|4|Deathtouch$Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Whenever Deadeye Brawler deals combat damage to a player, if you have the city's blessing, draw a card.| +Deadeye Brawler|Rivals of Ixalan|155|U|{2}{U}{B}|Creature - Human Pirate|2|4|Deathtouch$Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Whenever Deadeye Brawler deals combat damage to a player, if you have the city's blessing, draw a card.| Dire Fleet Neckbreaker|Rivals of Ixalan|156|U|{2}{B}{R}|Creature - Orc Pirate|3|2|Attacking Pirates you control get +2/+0.| Elenda, the Dusk Rose|Rivals of Ixalan|157|M|{2}{W}{B}|Legendary Creature - Vampire Knight|1|1|Lifelink$Whenever another creature dies, put a +1/+1 counter on Elenda, the Dusk Rose.$When Elenda dies, create X 1/1 white Vampire creature tokens with lifelink, where X is Elenda's power| +Hadana's Climb|Rivals of Ixalan|158|R|{1}{G}{U}|Legendary Enchantment|||At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. Then if that creature has three or more +1/+1 counters on it, transform Hadana's Climb.| +Winged Temple of Orazca|Rivals of Ixalan|158|R||Legendary Land|||(Transforms from Hadana's Climb.)${T}: Add one mana of any color to your mana pool.${1}{G}{U}, {T}: Target creature you control gains flying and gets +X/+X until end of turn, where X is its power.| Huatli, Radiant Champion|Rivals of Ixalan|159|M|{2}{G}{W}|Legendary Planeswalker - Huatli|3|+1: Put a loyalty counter on Huatli, Radiant Champion for each creature you control.$-1: Target creature gets +X/+X until end of turn, where X is the number of creatures you control.$-8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may draw a card."| Journey to Eternity|Rivals of Ixalan|160|R|{1}{B}{G}|Legendary Enchantment - Aura|||Enchant creature you control$When enchanted creature dies, return it to the battlefield under your control, then return Journey to Eternity to the battlefield transformed under your control.| Atzal, Cave of Eternity|Rivals of Ixalan|160|R||Legendary Land|||(Transforms from Journey to Eternity.)${t}: Add one mana of any color to your mana pool.${3}{B}{G}, {t}: Return target creature card from your graveyard to the battlefield.| Jungle Creeper|Rivals of Ixalan|161|U|{1}{B}{G}|Creature - Elemental|3|3|{3}{B}{G}: Return Jungle Creeper from your graveyard to your hand.| -Kumena, Tyrant of Orzca|Rivals of Ixalan|162|M|{1}{G}{U}|Legendary Creature - Merfolk Shaman|2|4|Tap another untapped Merfolk you control: Kumena, Tyrant of Orzca can't be blocked this turn.$Tap three untapped Merfolk you control: Draw a card.$Tap five untapped Merfolk you control: Put a +1/+1 counter on each Merfolk you control.| +Kumena, Tyrant of Orazca|Rivals of Ixalan|162|M|{1}{G}{U}|Legendary Creature - Merfolk Shaman|2|4|Tap another untapped Merfolk you control: Kumena, Tyrant of Orzaca can't be blocked this turn.$Tap three untapped Merfolk you control: Draw a card.$Tap five untapped Merfolk you control: Put a +1/+1 counter on each Merfolk you control.| Legion Lieutenant|Rivals of Ixalan|163|U|{W}{B}|Creature - Vampire Knight|2|2|Other Vampires you control get +1/+1.| Merfolk Mistbinder|Rivals of Ixalan|164|U|{G}{U}|Creature - Merfolk Shaman|2|2|Other Merfolk you control get +1/+1.| -Path of Mettle|Rivals of Ixalan|165|R|{R}{W}|Legendary Enchantment|||When ~ enters the battlefield, it deals 1 damage to each creature that doesn't have first strike, double strike, vigilance, or haste.$Whenever you attack with at least two creatures that have first strike, double strike, vigilance, and/or haste, transform ~.| -Metzali, Tower of Triumph|Rivals of Ixalan|165|R||Legendary Land|||{t}: Add one mana of any color to your mana pool.${1}{R}, {T}: Metzali, Tower of Triumph deals 2 damage to each opponent.${2}{W}, {T}: Choose a creature at random that attacked this turn. Destroy that creature.| +Path of Mettle|Rivals of Ixalan|165|R|{R}{W}|Legendary Enchantment|||When Path of Mettle enters the battlefield, it deals 1 damage to each creature that doesn't have first strike, double strike, vigilance, or haste.$Whenever you attack with at least two creatures that have first strike, double strike, vigilance, and/or haste, transform Path of Mettle.| +Metzali, Tower of Triumph|Rivals of Ixalan|165|R||Legendary Land|||(Transforms from Path of Mettle.)${t}: Add one mana of any color to your mana pool.${1}{R}, {T}: Metzali, Tower of Triumph deals 2 damage to each opponent.${2}{W}, {T}: Choose a creature at random that attacked this turn. Destroy that creature.| Profane Procession|Rivals of Ixalan|166|R|{1}{W}{B}|Legendary Enchantment|||{3}{W}{B}: Exile target creature. Then if there are three or more cards exiled with Profane Procession, transform it.| Tomb of the Dusk Rose|Rivals of Ixalan|166|R||Legendary Land|||(Transforms from Profane Procession.)${T}: Add one mana of any color to your mana pool.${2}{W}{B},{T} : Put a creature card exiled with this permanent onto the battlefield under your control.| Protean Raider|Rivals of Ixalan|167|R|{1}{U}{R}|Creature - Shapeshifter Pirate|2|2|Raid — If you attacked with a creature this turn, you may have Protean Raider enter the battlefield as a copy of any creature on the battlefield.| +Raging Regisaur|Rivals of Ixalan|168|U|{2}{R}{G}|Creature - Dinosaur|4|4|Whenever Raging Regisaur attacks, it deals 1 damage to target creature or player.| +Resplendent Griffin|Rivals of Ixalan|170|U|{1}{W}{U}|Creature - Griffin|2|2|Flying$Ascend (If you control ten or more permenants, you get the city's blessing for the rest of the game.)$Whenever Resplendent Griffin attacks, if you have the city's blessing, put a +1/+1 counter on it.| Siegehorn Ceratops|Rivals of Ixalan|171|R|{G}{W}|Creature - Dinosaur|2|2|Enrage — Whenever Siegehorn Ceratops is dealt damage, put two +1/+1 counters on it. (It must survive the damage to get the counters.)| Storm Fleet Sprinter|Rivals of Ixalan|172|U|{1}{U}{R}|Creature - Human Pirate|2|2|Haste$Storm Fleet Sprinter can't be blocked.| Storm the Vault|Rivals of Ixalan|173|R|{2}{U}{R}|Legendary Enchantment|||Whenever one or more creatures you control deal combat damage to a player, create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool."$At the beginning of your end step, if you control five or more artifacts, transform Storm the Vault.| Vault of Catlacan|Rivals of Ixalan|173|R||Legendary Land|||(Transforms from Storm the Vault.)${T}: Add one mana of any color to your mana pool.${T}: Add {U} to your mana pool for each artifact you control.| +Zacama, Primal Calamity|Rivals of Ixalan|174|M|{6}{R}{G}{W}|Legendary Creature - Elder Dinosaur|9|9|Vigilance, reach, trample$When Zacama, Primal Calamity enters the battlefield, if you cast it, untap all lands you control.${2}{R}: Zacama deals 3 damage to target creature.${2}{G}: Destroy target artifact or enchantment.${2}{W}: You gain 3 life.| Awakened Amalgam|Rivals of Ixalan|175|R|{4}|Artifact Creature - Golem|0|0|Awakened Amalgam's power and toughness are each equal to the number of differently named lands you control.| -Azor's Gateway|Rivals of Ixalan|176|M|{2}|Legendary Artifact|||{1}, {t}: Draw a card, then exile a card from your hand. If cards with five or more different covernted mana costs are exiled with Azor's Gateway, you gain 5 life, untap Azor's Gateway, and transform it.| -Sanctum of the Sun|Rivals of Ixalan|176|M||Legendary Land|||(Transforms from Azor's Gateway.)${t}: Add X mana of any one color to your mana pool, where X is your life total.| +Azor's Gateway|Rivals of Ixalan|176|M|{2}|Legendary Artifact|||{1}, {t}: Draw a card, then exile a card from your hand. If cards with five or more different converted mana costs are exiled with Azor's Gateway, you gain 5 life, untap Azor's Gateway, and transform it.| +Sanctum of the Sun|Rivals of Ixalan|176|M||Legendary Land|||(Transforms from Azor's Gateway.)${t}: Add X mana of any one color to your mana pool, where X is your life total.| Captain's Hook|Rivals of Ixalan|177|R|{3}|Artifact - Equipment|||Equipped creature gets +2/+0, has menace, and is a Pirate in addition to its other creature types.$Whenever Captain's Hook becomes unattached from a permanent, destroy that permanent.$Equip {1}| Gleaming Barrier|Rivals of Ixalan|178|C|{2}|Artifact Creature - Wall|0|4|Defender$When Gleaming Barrier dies, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color to your mana pool."| Golden Guardian|Rivals of Ixalan|179|R|{4}|Artifact Creature - Golem|4|4|Defender${2}: Golden Guardian fights another target creature you control. When Golden Guardian dies this turn, return it to the battlefield transformed under your control.| Gold-Forge Garrison|Rivals of Ixalan|179|R||Land|||(Transforms from Golden Guardian.)${t}: Add two mana of any one color to your mana pool.${4}, {T}: Create a 4/4 colorless Golem artifact creature token.| The Immortal Sun|Rivals of Ixalan|180|M|{6}|Legendary Artifact|||Players can't activate planeswalkers' loyalty abilities.$At the beginning of your draw step, draw an additional card.$Spells you cast cost {1} less to cast.$Creatures you control get +1/+1.| Silent Gravestone|Rivals of Ixalan|182|R|{1}|Artifact|||Cards in graveyards can't be the targets of spells or abilities.${4}, {t}: Exile Silent Gravestone and all cards from all graveyards. Draw a card.| -Arch of Orazca|Rivals of Ixalan|185|R||Land|||Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)${t}: Add {C} to your mana pool.${5}, {t}: Draw a card. Activate this ability only if you have the city's blessing.| +Arch of Orazca|Rivals of Ixalan|185|R||Land|||Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)${t}: Add {C} to your mana pool.${5}, {t}: Draw a card. Activate this ability only if you have the city's blessing.| Evolving Wilds|Rivals of Ixalan|186|C||Land|||{T}, Sacrifice Evolving Wilds: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| Vraska, Scheming Gorgon|Rivals of Ixalan|197|M|{4}{B}{B}|Legendary Planeswalker - Vraska|5|+2: Creatures you control get +1/+0 until end of turn.$-3: Destroy target creature.$-10: Until end of turn, creatures you control gain deathtouch and "Whenever this creature deals damage to an opponent, that player loses the game."| Vampire Champion|Rivals of Ixalan|198|C|{3}{B}|Creature - Vampire Soldier|3|3|Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)| @@ -32805,7 +32822,7 @@ Angrath, Minotaur Pirate|Rivals of Ixalan|201|M|{4}{B}{R}|Legendary Planeswalker Angrath's Ambusher|Rivals of Ixalan|202|U|{2}{B}|Creature - Orc Pirate|2|3|Angrath's Ambusher gets +2/+0 as long as you control an Angrath planeswalker.| Swab Goblin|Rivals of Ixalan|203|C|{1}{R}|Creature - Goblin Pirate|2|2|| Angrath's Fury|Rivals of Ixalan|204|R|{3}{B}{R}|Sorcery|||Destroy target creature. Angrath's Fury deals 3 damage to target player. You may search your library and/or graveyard for a card named Angrath, Minotaur Pirate, reveal it, and put it into your hand. If you search your library this way, shuffle it.| -Cinder Barrens|Rivals of Ixalan|205|C||Land|||Cinder Barrens enters the battlefield tapped.${T}: Add {B} or {R} to your mana pool.|Angelic Rocket|Unstable|139|R|{8}|Host Creature - Angel|4|4|Flying$When this creature enters the battlefield, you may destroy target nonland permanent.| +Cinder Barrens|Rivals of Ixalan|205|C||Land|||Cinder Barrens enters the battlefield tapped.${T}: Add {B} or {R} to your mana pool.| As Luck Would Have It|Unstable|102|R|{G}|Enchantment|||Hexproof$Whenever you roll a die, put a number of luck counters on As Luck Would Have It equal to the result. Then is there are 100 or more luck counters on As Luck Would Have It, you win the game. (Count both rolls if you reroll a die.)| Baron Von Count|Unstable|127|M|{1}{B}{R}|Legendary Creature - Human Villain|3|3|Baron Von Count enters the battlefield with a doom counter on "5."$Whenever you cast a spell with the indicated numeral in its mana cost, text box, power, or toughness, move the doom counter one numeral to the left.$When the doom counter moves from "1," destroy target player and put that doom counter on "5."| Big Boa Constrictor|Unstable|51|C|{3}{B}|Host Creature - Snake|1|2|When this creature enters the battlefield, roll a six-sided die. Target opponent loses life equal to the result.| From a5388456e4e6d00b81a4d14ec8a8a9c95b8ee925 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 5 Jan 2018 15:06:20 +0400 Subject: [PATCH 17/18] Typos --- Mage.Sets/src/mage/cards/g/GabrielAngelfire.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java b/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java index aea3ead01bf..b7a41426a24 100644 --- a/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java +++ b/Mage.Sets/src/mage/cards/g/GabrielAngelfire.java @@ -53,7 +53,7 @@ import mage.players.Player; public class GabrielAngelfire extends CardImpl { public GabrielAngelfire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{W}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); From f0494383fdce890ec78d9477286b9190863c02d7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 5 Jan 2018 15:26:10 +0100 Subject: [PATCH 18/18] [RIX] Added 4 cards. --- .../src/mage/cards/b/BlindSpotGiant.java | 63 ++------- .../src/mage/cards/d/DireFleetPoisoner.java | 95 ++++++++++++++ Mage.Sets/src/mage/cards/h/HadanasClimb.java | 78 +++++++++++ .../src/mage/cards/h/HazoretTheFervent.java | 45 +------ ...sailMarauder.java => WarkiteMarauder.java} | 38 +++++- .../src/mage/cards/w/WaywardSwordtooth.java | 77 +++++++++++ .../mage/cards/w/WingedTempleOfOrazca.java | 123 ++++++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 6 +- .../common/CitysBlessingCondition.java | 2 +- ...ttackBlockUnlessConditionSourceEffect.java | 74 +++++++++++ 10 files changed, 502 insertions(+), 99 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/d/DireFleetPoisoner.java create mode 100644 Mage.Sets/src/mage/cards/h/HadanasClimb.java rename Mage.Sets/src/mage/cards/w/{WarsailMarauder.java => WarkiteMarauder.java} (61%) create mode 100644 Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java create mode 100644 Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java diff --git a/Mage.Sets/src/mage/cards/b/BlindSpotGiant.java b/Mage.Sets/src/mage/cards/b/BlindSpotGiant.java index 0080adc0b6c..1b736e2ee42 100644 --- a/Mage.Sets/src/mage/cards/b/BlindSpotGiant.java +++ b/Mage.Sets/src/mage/cards/b/BlindSpotGiant.java @@ -29,20 +29,17 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.RestrictionEffect; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.effects.common.combat.CantAttackBlockUnlessConditionSourceEffect; 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.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -50,15 +47,23 @@ import mage.game.permanent.Permanent; */ public class BlindSpotGiant extends CardImpl { + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control another Giant"); + + static { + filter.add(new SubtypePredicate(SubType.GIANT)); + filter.add(new AnotherPredicate()); + } + public BlindSpotGiant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.GIANT, SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(3); // Blind-Spot Giant can't attack or block unless you control another Giant. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlindSpotGiantEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new CantAttackBlockUnlessConditionSourceEffect(new PermanentsOnTheBattlefieldCondition(filter)))); } @@ -71,47 +76,3 @@ public class BlindSpotGiant extends CardImpl { return new BlindSpotGiant(this); } } - -class BlindSpotGiantEffect extends RestrictionEffect { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Giant"); - static { - filter.add(new SubtypePredicate(SubType.GIANT)); - filter.add(new AnotherPredicate()); - } - - public BlindSpotGiantEffect() { - super(Duration.WhileOnBattlefield); - staticText = "{this} can't attack or block unless you control another Giant"; - } - - public BlindSpotGiantEffect(final BlindSpotGiantEffect effect) { - super(effect); - } - - @Override - public BlindSpotGiantEffect copy() { - return new BlindSpotGiantEffect(this); - } - - @Override - public boolean canAttack(Game game) { - return false; - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (permanent.getId().equals(source.getSourceId())) { - if (game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) { - return false; - } - return true; - } // do not apply to other creatures. - return false; - } -} diff --git a/Mage.Sets/src/mage/cards/d/DireFleetPoisoner.java b/Mage.Sets/src/mage/cards/d/DireFleetPoisoner.java new file mode 100644 index 00000000000..bb266298596 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DireFleetPoisoner.java @@ -0,0 +1,95 @@ +/* + * 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.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class DireFleetPoisoner extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.PIRATE, "attacking Pirate"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new AttackingPredicate()); + } + + public DireFleetPoisoner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // When Dire Fleet Poisoner enters the battlefield, target attacking Pirate you control gets +1/+1 and gains deathtouch until end of turn. + Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); + effect.setText("target attacking Pirate you control gets +1/+1"); + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(effect); + effect = new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains deathtouch until end of turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public DireFleetPoisoner(final DireFleetPoisoner card) { + super(card); + } + + @Override + public DireFleetPoisoner copy() { + return new DireFleetPoisoner(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HadanasClimb.java b/Mage.Sets/src/mage/cards/h/HadanasClimb.java new file mode 100644 index 00000000000..2c7f819563e --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HadanasClimb.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.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.condition.common.TargetHasCounterCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.w.WingedTempleOfOrazca; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class HadanasClimb extends CardImpl { + + public HadanasClimb(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.transformable = true; + + this.secondSideCardClazz = WingedTempleOfOrazca.class; + + // At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. Then if that creature has three or more +1/+1 counters on it, transform Hadana's Climb. + this.addAbility(new TransformAbility()); + Ability ability = new BeginningOfCombatTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false); + ability.addEffect(new ConditionalOneShotEffect(new TransformSourceEffect(true), new TargetHasCounterCondition(CounterType.P1P1, 3, Integer.MAX_VALUE), + "Then if that creature has three or more +1/+1 counters on it, transform {this}")); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public HadanasClimb(final HadanasClimb card) { + super(card); + } + + @Override + public HadanasClimb copy() { + return new HadanasClimb(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java b/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java index 962a0346f51..c08e6dd3834 100644 --- a/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java +++ b/Mage.Sets/src/mage/cards/h/HazoretTheFervent.java @@ -32,23 +32,21 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.combat.CantAttackBlockUnlessConditionSourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.ComparisonType; import mage.constants.SubType; -import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -71,7 +69,9 @@ public class HazoretTheFervent extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Hazoret the Fervent can't attack or block unless you have one or fewer cards in hand. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HazoretTheFerventEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new CantAttackBlockUnlessConditionSourceEffect(new CardsInHandCondition(ComparisonType.FEWER_THAN, 2)) + .setText("{this} can't attack or block unless you have one or fewer cards in hand"))); // {2}{R}, Discard a card: Hazoret deals 2 damage to each opponent. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(2, TargetController.OPPONENT), new ManaCostsImpl("{2}{R}")); @@ -88,36 +88,3 @@ public class HazoretTheFervent extends CardImpl { return new HazoretTheFervent(this); } } - -class HazoretTheFerventEffect extends RestrictionEffect { - - public HazoretTheFerventEffect() { - super(Duration.WhileOnBattlefield); - staticText = "{this} can't attack or block unless you have one or fewer cards in hand"; - } - - public HazoretTheFerventEffect(final HazoretTheFerventEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - return permanent.getId().equals(source.getSourceId()) && controller.getHand().size() > 1; - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - - @Override - public boolean canAttack(Game game) { - return false; - } - - @Override - public HazoretTheFerventEffect copy() { - return new HazoretTheFerventEffect(this); - } -} diff --git a/Mage.Sets/src/mage/cards/w/WarsailMarauder.java b/Mage.Sets/src/mage/cards/w/WarkiteMarauder.java similarity index 61% rename from Mage.Sets/src/mage/cards/w/WarsailMarauder.java rename to Mage.Sets/src/mage/cards/w/WarkiteMarauder.java index 00121b2976b..927440b9fab 100644 --- a/Mage.Sets/src/mage/cards/w/WarsailMarauder.java +++ b/Mage.Sets/src/mage/cards/w/WarkiteMarauder.java @@ -39,14 +39,21 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; /** * * @author LevelX2 */ -public class WarsailMarauder extends CardImpl { +public class WarkiteMarauder extends CardImpl { - public WarsailMarauder(UUID ownerId, CardSetInfo setInfo) { + private final UUID originalId; + + public WarkiteMarauder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.HUMAN); @@ -57,20 +64,37 @@ public class WarsailMarauder extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Warsail Marauder attacks, target creature loses all abilities and has base power and toughness 0/1 until end of turn. + // Whenever Warkite Marauder attacks, target creature defending player controls loses all abilities and has base power and toughness 0/1 until end of turn. Ability ability = new AttacksTriggeredAbility(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn) - .setText("target creature loses all abilities"), false); + .setText("target creature defending player controls loses all abilities"), false); ability.addEffect(new SetPowerToughnessTargetEffect(0, 1, Duration.EndOfTurn) .setText("and has base power and toughness 0/1 until end of turn")); + ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); this.addAbility(ability); + this.originalId = ability.getOriginalId(); + } - public WarsailMarauder(final WarsailMarauder card) { + public WarkiteMarauder(final WarkiteMarauder card) { super(card); + this.originalId = card.originalId; } @Override - public WarsailMarauder copy() { - return new WarsailMarauder(this); + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(originalId)) { + ability.getTargets().clear(); + ability.addTarget(new TargetControlledCreaturePermanent()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls"); + UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId()); + filter.add(new ControllerIdPredicate(defenderId)); + TargetCreaturePermanent target = new TargetCreaturePermanent(0, 1, filter, false); + ability.addTarget(target); + } + } + + @Override + public WarkiteMarauder copy() { + return new WarkiteMarauder(this); } } diff --git a/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java b/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.java new file mode 100644 index 00000000000..1a3466b9b14 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WaywardSwordtooth.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.w; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.effects.common.combat.CantAttackBlockUnlessConditionSourceEffect; +import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect; +import mage.abilities.keyword.AscendAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class WaywardSwordtooth extends CardImpl { + + public WaywardSwordtooth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Ascend + this.addAbility(new AscendAbility()); + + // You may play an additional land on each of your turns. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new PlayAdditionalLandsControllerEffect(1, Duration.WhileOnBattlefield))); + + // Wayward Sawtooth can't attack or block unless you have the city's blessing. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockUnlessConditionSourceEffect(CitysBlessingCondition.instance))); + + } + + public WaywardSwordtooth(final WaywardSwordtooth card) { + super(card); + } + + @Override + public WaywardSwordtooth copy() { + return new WaywardSwordtooth(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java b/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java new file mode 100644 index 00000000000..f2f033f7384 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java @@ -0,0 +1,123 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class WingedTempleOfOrazca extends CardImpl { + + public WingedTempleOfOrazca(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + this.nightCard = true; + + // (Transforms from Hadana's Climb.) + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("(Transforms from Hadana's Climb.)")); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // {T}: Add one mana of any color to your mana pool. + this.addAbility(new AnyColorManaAbility()); + + // {1}{G}{U}, {T}: Target creature you control gains flying and gets +X/+X until end of turn, where X is its power. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WingedTempleOfOrazcaEffect(), new ManaCostsImpl<>("{1}{G}{U}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public WingedTempleOfOrazca(final WingedTempleOfOrazca card) { + super(card); + } + + @Override + public WingedTempleOfOrazca copy() { + return new WingedTempleOfOrazca(this); + } +} + +class WingedTempleOfOrazcaEffect extends OneShotEffect { + + public WingedTempleOfOrazcaEffect() { + super(Outcome.Benefit); + this.staticText = "it gains flying and gets +X/+X until end of turn, where X is its power"; + } + + public WingedTempleOfOrazcaEffect(final WingedTempleOfOrazcaEffect effect) { + super(effect); + } + + @Override + public WingedTempleOfOrazcaEffect copy() { + return new WingedTempleOfOrazcaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(targetPointer.getFirst(game, source)); + if (creature != null && creature.isCreature()) { + int pow = creature.getPower().getValue(); + ContinuousEffect effect = new BoostTargetEffect(pow, pow, Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(creature, game)); + game.addEffect(effect, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index ab0a07f84b0..05e94b7ba2d 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -65,6 +65,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.RARE, mage.cards.c.CinderBarrens.class)); cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); cards.add(new SetCardInfo("Dire Fleet Neckbreaker", 156, Rarity.UNCOMMON, mage.cards.d.DireFleetNeckbreaker.class)); + cards.add(new SetCardInfo("Dire Fleet Poisoner", 68, Rarity.RARE, mage.cards.d.DireFleetPoisoner.class)); cards.add(new SetCardInfo("Dusk Charger", 69, Rarity.COMMON, mage.cards.d.DuskCharger.class)); cards.add(new SetCardInfo("Dusk Legion Zealot", 70, Rarity.COMMON, mage.cards.d.DuskLegionZealot.class)); cards.add(new SetCardInfo("Elenda, the Dusk Rose", 157, Rarity.MYTHIC, mage.cards.e.ElendaTheDuskRose.class)); @@ -77,6 +78,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Forerunner of the Legion", 9, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheLegion.class)); cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); cards.add(new SetCardInfo("Glorious Destiny", 18, Rarity.RARE, mage.cards.g.GloriousDestiny.class)); + cards.add(new SetCardInfo("Hadana's Climb", 158, Rarity.RARE, mage.cards.h.HadanasClimb.class)); cards.add(new SetCardInfo("Jadelight Ranger", 136, Rarity.RARE, mage.cards.j.JadelightRanger.class)); cards.add(new SetCardInfo("Journey to Eternity", 160, Rarity.RARE, mage.cards.j.JourneyToEternity.class)); cards.add(new SetCardInfo("Jungle Creeper", 161, Rarity.UNCOMMON, mage.cards.j.JungleCreeper.class)); @@ -107,7 +109,9 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Vraska's Conquistador", 199, Rarity.UNCOMMON, mage.cards.v.VraskasConquistador.class)); cards.add(new SetCardInfo("Vraska's Scorn", 200, Rarity.RARE, mage.cards.v.VraskasScorn.class)); cards.add(new SetCardInfo("Vraska, Scheming Gorgon", 197, Rarity.MYTHIC, mage.cards.v.VraskaSchemingGorgon.class)); - cards.add(new SetCardInfo("Warsail Marauder", 60, Rarity.RARE, mage.cards.w.WarsailMarauder.class)); + cards.add(new SetCardInfo("Warkite Marauder", 60, Rarity.RARE, mage.cards.w.WarkiteMarauder.class)); + cards.add(new SetCardInfo("Wayward Swordtooth", 150, Rarity.RARE, mage.cards.w.WaywardSwordtooth.class)); + cards.add(new SetCardInfo("Winged Temple of Orazca", 158, Rarity.RARE, mage.cards.w.WingedTempleOfOrazca.class)); cards.add(new SetCardInfo("World Shaper", 151, Rarity.RARE, mage.cards.w.WorldShaper.class)); cards.add(new SetCardInfo("Zetalpa, Primal Dawn", 30, Rarity.RARE, mage.cards.z.ZetalpaPrimalDawn.class)); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/CitysBlessingCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CitysBlessingCondition.java index d8f333d9259..7507f11d315 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/CitysBlessingCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/CitysBlessingCondition.java @@ -47,6 +47,6 @@ public enum CitysBlessingCondition implements Condition { @Override public String toString() { - return "If you have the city's blessing"; + return "you have the city's blessing"; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java new file mode 100644 index 00000000000..6f9989e9b44 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.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.abilities.effects.common.combat; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.effects.RestrictionEffect; +import mage.constants.Duration; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class CantAttackBlockUnlessConditionSourceEffect extends RestrictionEffect { + + private Condition condition; + + public CantAttackBlockUnlessConditionSourceEffect(Condition condition) { + super(Duration.WhileOnBattlefield); + this.condition = condition; + staticText = "{this} can't attack or block unless " + condition.toString(); + } + + public CantAttackBlockUnlessConditionSourceEffect(final CantAttackBlockUnlessConditionSourceEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return permanent.getId().equals(source.getSourceId()) && condition.apply(game, source); + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public CantAttackBlockUnlessConditionSourceEffect copy() { + return new CantAttackBlockUnlessConditionSourceEffect(this); + } +}