From 8df88a165d41e237b9d014fed994ff53cf51db85 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:39:04 +0000 Subject: [PATCH 01/51] Implemented Cacophodon --- Mage.Sets/src/mage/cards/c/Cacophodon.java | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/Cacophodon.java diff --git a/Mage.Sets/src/mage/cards/c/Cacophodon.java b/Mage.Sets/src/mage/cards/c/Cacophodon.java new file mode 100644 index 0000000000..2eeaf6bc94 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Cacophodon.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPermanent; + +/** + * + * @author L_J + */ +public class Cacophodon extends CardImpl { + + public Cacophodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Enrage — Whenever Cacophodon is dealt damage, untap target permanent. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), false, true); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public Cacophodon(final Cacophodon card) { + super(card); + } + + @Override + public Cacophodon copy() { + return new Cacophodon(this); + } +} From 567ba78be2fc054afa86ac06b64c56a461a77432 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:39:43 +0000 Subject: [PATCH 02/51] Implemented Canal Monitor --- Mage.Sets/src/mage/cards/c/CanalMonitor.java | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CanalMonitor.java diff --git a/Mage.Sets/src/mage/cards/c/CanalMonitor.java b/Mage.Sets/src/mage/cards/c/CanalMonitor.java new file mode 100644 index 0000000000..996c747b11 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CanalMonitor.java @@ -0,0 +1,58 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class CanalMonitor extends CardImpl { + + public CanalMonitor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); + this.subtype.add(SubType.LIZARD); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + } + + public CanalMonitor(final CanalMonitor card) { + super(card); + } + + @Override + public CanalMonitor copy() { + return new CanalMonitor(this); + } +} From 4ae0a9c2a7763a82fe364b417791ed684b49ee7b Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:40:16 +0000 Subject: [PATCH 03/51] Implemented Everdawn Champion --- .../src/mage/cards/e/EverdawnChampion.java | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/EverdawnChampion.java diff --git a/Mage.Sets/src/mage/cards/e/EverdawnChampion.java b/Mage.Sets/src/mage/cards/e/EverdawnChampion.java new file mode 100644 index 0000000000..06beb79912 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EverdawnChampion.java @@ -0,0 +1,96 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +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.game.Game; +import mage.game.events.GameEvent; +/** + * + * @author L_J + */ +public class EverdawnChampion extends CardImpl { + + public EverdawnChampion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Prevent all combat damage that would be dealt to Everdawn Champion. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EverdawnChampionEffect())); + } + + public EverdawnChampion(final EverdawnChampion card) { + super(card); + } + + @Override + public EverdawnChampion copy() { + return new EverdawnChampion(this); + } +} + +class EverdawnChampionEffect extends PreventionEffectImpl { + + public EverdawnChampionEffect() { + super(Duration.WhileOnBattlefield, Integer.MAX_VALUE, true); + staticText = "Prevent all combat damage that would be dealt to {this}"; + } + + public EverdawnChampionEffect(final EverdawnChampionEffect effect) { + super(effect); + } + + @Override + public EverdawnChampionEffect copy() { + return new EverdawnChampionEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + if (event.getTargetId().equals(source.getSourceId())) { + return true; + } + } + return false; + } + +} From ab2a2d2567b09e3a420bd1f7e0ecbdb365393f3e Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:40:41 +0000 Subject: [PATCH 04/51] Implemented Exultant Skymarcher --- .../src/mage/cards/e/ExultantSkymarcher.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/ExultantSkymarcher.java diff --git a/Mage.Sets/src/mage/cards/e/ExultantSkymarcher.java b/Mage.Sets/src/mage/cards/e/ExultantSkymarcher.java new file mode 100644 index 0000000000..37776baa28 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ExultantSkymarcher.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class ExultantSkymarcher extends CardImpl { + + public ExultantSkymarcher (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public ExultantSkymarcher (final ExultantSkymarcher card) { + super(card); + } + + @Override + public ExultantSkymarcher copy() { + return new ExultantSkymarcher(this); + } + +} From 03d36dda38b70eaeee68acdc3430227353a1ebb7 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:41:10 +0000 Subject: [PATCH 05/51] Implemented Frilled Deathspitter --- .../src/mage/cards/f/FrilledDeathspitter.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java diff --git a/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java b/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java new file mode 100644 index 0000000000..3dde24eed3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author TheElk801 & L_J + */ +public class FrilledDeathspitter extends CardImpl { + + public FrilledDeathspitter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Enrage — Whenever Frilled Deathspitter is dealt damage, it deals 2 damage to target opponent. + Ability ability = new DealtDamageToSourceTriggeredAbility( + Zone.BATTLEFIELD, new DamageTargetEffect(2).setText("it deals 2 damage to target opponent"), false, true + ); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public FrilledDeathspitter(final FrilledDeathspitter card) { + super(card); + } + + @Override + public FrilledDeathspitter copy() { + return new FrilledDeathspitter(this); + } +} From 658ac1dad5cfe4f6b980750b048857a4e6d6eb4b Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:41:38 +0000 Subject: [PATCH 06/51] Implemented Giltgrove Stalker --- .../src/mage/cards/g/GiltgroveStalker.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GiltgroveStalker.java diff --git a/Mage.Sets/src/mage/cards/g/GiltgroveStalker.java b/Mage.Sets/src/mage/cards/g/GiltgroveStalker.java new file mode 100644 index 0000000000..578d9797c3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiltgroveStalker.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +/** + * + * @author L_J + */ +public class GiltgroveStalker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); + } + + public GiltgroveStalker(UUID ownerId, CardSetInfo setInfo) { + + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Giltgrove Stalker can't be blocked by creatures with power 2 or less. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public GiltgroveStalker(final GiltgroveStalker card) { + super(card); + } + + @Override + public GiltgroveStalker copy() { + return new GiltgroveStalker(this); + } +} From c5f66aaafb0f011c428f7152a013b43fff78e60c Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:42:04 +0000 Subject: [PATCH 07/51] Implemented Goblin Trailblazer --- .../src/mage/cards/g/GoblinTrailblazer.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GoblinTrailblazer.java diff --git a/Mage.Sets/src/mage/cards/g/GoblinTrailblazer.java b/Mage.Sets/src/mage/cards/g/GoblinTrailblazer.java new file mode 100644 index 0000000000..121cd83666 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinTrailblazer.java @@ -0,0 +1,63 @@ +/* + * 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.UUID; +import mage.MageInt; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class GoblinTrailblazer extends CardImpl { + + public GoblinTrailblazer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Menace + this.addAbility(new MenaceAbility()); + } + + public GoblinTrailblazer(final GoblinTrailblazer card) { + super(card); + } + + @Override + public GoblinTrailblazer copy() { + return new GoblinTrailblazer(this); + } +} From 82e82fa1a8582fbef60fd4496ed978084813d5c2 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:42:29 +0000 Subject: [PATCH 08/51] Implemented Hardy Veteran --- Mage.Sets/src/mage/cards/h/HardyVeteran.java | 71 ++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HardyVeteran.java diff --git a/Mage.Sets/src/mage/cards/h/HardyVeteran.java b/Mage.Sets/src/mage/cards/h/HardyVeteran.java new file mode 100644 index 0000000000..a4cd137705 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HardyVeteran.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author North & L_J + */ +public class HardyVeteran extends CardImpl { + + public HardyVeteran(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // As long as it’s your turn, Hardy Veteran gets +0/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(0, 2, Duration.WhileOnBattlefield), + MyTurnCondition.instance, + "As long as it’s your turn, {this} gets +0/+2"))); + } + + public HardyVeteran(final HardyVeteran card) { + super(card); + } + + @Override + public HardyVeteran copy() { + return new HardyVeteran(this); + } +} From 5228aab9ca21fc9f1c2f709901a73b99b59221da Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:42:55 +0000 Subject: [PATCH 09/51] Implemented Imperial Ceratops --- .../src/mage/cards/i/ImperialCeratops.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/ImperialCeratops.java diff --git a/Mage.Sets/src/mage/cards/i/ImperialCeratops.java b/Mage.Sets/src/mage/cards/i/ImperialCeratops.java new file mode 100644 index 0000000000..74cfe031e9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialCeratops.java @@ -0,0 +1,64 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author L_J + */ +public class ImperialCeratops extends CardImpl { + + public ImperialCeratops(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Enrage — Whenever Imperial Ceratops is dealt damage, you gain 2 life. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), false, true)); + } + + public ImperialCeratops(final ImperialCeratops card) { + super(card); + } + + @Override + public ImperialCeratops copy() { + return new ImperialCeratops(this); + } +} From 02bf60f1d783cfe0a48dfcbfe400712ff842b57b Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:43:22 +0000 Subject: [PATCH 10/51] Implemented Majestic Heliopterus --- .../src/mage/cards/m/MajesticHeliopterus.java | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MajesticHeliopterus.java diff --git a/Mage.Sets/src/mage/cards/m/MajesticHeliopterus.java b/Mage.Sets/src/mage/cards/m/MajesticHeliopterus.java new file mode 100644 index 0000000000..be37a60d1f --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MajesticHeliopterus.java @@ -0,0 +1,84 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author L_J + */ +public class MajesticHeliopterus extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target Dinosaur you control"); + static { + filter.add(new AnotherPredicate()); + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + public MajesticHeliopterus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Majestic Heliopterus attacks, another target Dinosaur you control gains flying until end of turn. + Effect effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn); + Ability ability = new AttacksTriggeredAbility(effect, false); + Target target = new TargetControlledCreaturePermanent(1, 1, filter, true); + ability.addTarget(target); + this.addAbility(ability); + } + + public MajesticHeliopterus(final MajesticHeliopterus card) { + super(card); + } + + @Override + public MajesticHeliopterus copy() { + return new MajesticHeliopterus(this); + } +} From 13acbef5cbc670987b20d4662330e58c8df49a7c Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:43:55 +0000 Subject: [PATCH 11/51] Implemented Martyr of Dusk --- Mage.Sets/src/mage/cards/m/MartyrOfDusk.java | 65 ++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MartyrOfDusk.java diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfDusk.java b/Mage.Sets/src/mage/cards/m/MartyrOfDusk.java new file mode 100644 index 0000000000..ae521ac496 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MartyrOfDusk.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.IxalanVampireToken; + +/** + * + * @author L_J + */ +public class MartyrOfDusk extends CardImpl { + + public MartyrOfDusk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Martyr of Dusk dies, create a 1/1 white Vampire creature token with lifelink. + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new IxalanVampireToken()))); + } + + public MartyrOfDusk(final MartyrOfDusk card) { + super(card); + } + + @Override + public MartyrOfDusk copy() { + return new MartyrOfDusk(this); + } +} From 9c20ae6a578dde6f5b58c9e879ed68f2b2311a89 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:44:22 +0000 Subject: [PATCH 12/51] Implemented Mastermind's Acquisition --- .../mage/cards/m/MastermindsAcquisition.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java diff --git a/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java b/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.java new file mode 100644 index 0000000000..a87eb4008e --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MastermindsAcquisition.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.m; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.WishEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author L_J + */ +public class MastermindsAcquisition extends CardImpl { + + public MastermindsAcquisition(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); + + // Choose one - + // Search your library for a card and put that card into your hand. Then shuffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary())); + + // Choose a card you own from outside the game and put it into your hand. + Mode mode = new Mode(); + mode.getEffects().add(new WishEffect(new FilterCard(), false)); + this.getSpellAbility().addMode(mode); + } + + public MastermindsAcquisition(final MastermindsAcquisition card) { + super(card); + } + + @Override + public MastermindsAcquisition copy() { + return new MastermindsAcquisition(this); + } +} From 5d6297c3941704e473d3da55bf7ad34c8f770521 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:44:56 +0000 Subject: [PATCH 13/51] Implemented Mist-Cloaked Herald --- .../src/mage/cards/m/MistCloakedHerald.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MistCloakedHerald.java diff --git a/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java b/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java new file mode 100644 index 0000000000..9e9c16d49a --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class MistCloakedHerald extends CardImpl { + + public MistCloakedHerald(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Mist-Cloaked Herald can’t be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + } + + public MistCloakedHerald(final MistCloakedHerald card) { + super(card); + } + + @Override + public MistCloakedHerald copy() { + return new MistCloakedHerald(this); + } +} From 4a0f6d1aa81c209b6e4eda404ac0afeab458975b Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:45:20 +0000 Subject: [PATCH 14/51] Implemented Moment of Craving --- .../src/mage/cards/m/MomentOfCraving.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MomentOfCraving.java diff --git a/Mage.Sets/src/mage/cards/m/MomentOfCraving.java b/Mage.Sets/src/mage/cards/m/MomentOfCraving.java new file mode 100644 index 0000000000..76024ae007 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MomentOfCraving.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class MomentOfCraving extends CardImpl { + + public MomentOfCraving(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); + + // Target creature gets -2/-2 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // You gain 2 life. + this.getSpellAbility().addEffect(new GainLifeEffect(2)); + } + + public MomentOfCraving(final MomentOfCraving card) { + super(card); + } + + @Override + public MomentOfCraving copy() { + return new MomentOfCraving(this); + } +} From cb1773f24f279e1bd0c9b36313b3ca593849b20b Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:45:46 +0000 Subject: [PATCH 15/51] Implemented Moment of Triumph --- .../src/mage/cards/m/MomentOfTriumph.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MomentOfTriumph.java diff --git a/Mage.Sets/src/mage/cards/m/MomentOfTriumph.java b/Mage.Sets/src/mage/cards/m/MomentOfTriumph.java new file mode 100644 index 0000000000..fb48519220 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MomentOfTriumph.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class MomentOfTriumph extends CardImpl { + + public MomentOfTriumph(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); + + // Target creature gets +2/+2 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // You gain 2 life. + this.getSpellAbility().addEffect(new GainLifeEffect(2)); + } + + public MomentOfTriumph(final MomentOfTriumph card) { + super(card); + } + + @Override + public MomentOfTriumph copy() { + return new MomentOfTriumph(this); + } +} From 8dcd37d76178105f5b59c82a06a1aa8b35569c11 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:46:17 +0000 Subject: [PATCH 16/51] Implemented Needletooth Raptor --- .../src/mage/cards/n/NeedletoothRaptor.java | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java diff --git a/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java b/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java new file mode 100644 index 0000000000..fb32ad333d --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.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.n; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class NeedletoothRaptor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public NeedletoothRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Enrage — Whenever Needletooth Raptor is dealt damage, it deals 5 damage to target creature an opponent controls. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5).setText("it deals 3 damage to target creature an opponent controls"), false, true); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public NeedletoothRaptor(final NeedletoothRaptor card) { + super(card); + } + + @Override + public NeedletoothRaptor copy() { + return new NeedletoothRaptor(this); + } +} From 9f0f7a1daed3524dcd9678d47a28a920801aefca Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:47:04 +0000 Subject: [PATCH 17/51] Needletooth Raptor text fix --- Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java b/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java index fb32ad333d..c45affc70b 100644 --- a/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java +++ b/Mage.Sets/src/mage/cards/n/NeedletoothRaptor.java @@ -61,7 +61,7 @@ public class NeedletoothRaptor extends CardImpl { this.toughness = new MageInt(2); // Enrage — Whenever Needletooth Raptor is dealt damage, it deals 5 damage to target creature an opponent controls. - Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5).setText("it deals 3 damage to target creature an opponent controls"), false, true); + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5).setText("it deals 5 damage to target creature an opponent controls"), false, true); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } From 1cd6c1711e0832e6eb29c704a9ca0494530dd1e3 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:47:47 +0000 Subject: [PATCH 18/51] Implemented Orazca Raptor --- Mage.Sets/src/mage/cards/o/OrazcaRaptor.java | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/o/OrazcaRaptor.java diff --git a/Mage.Sets/src/mage/cards/o/OrazcaRaptor.java b/Mage.Sets/src/mage/cards/o/OrazcaRaptor.java new file mode 100644 index 0000000000..7e85a6fcf7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OrazcaRaptor.java @@ -0,0 +1,58 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class OrazcaRaptor extends CardImpl { + + public OrazcaRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + } + + public OrazcaRaptor(final OrazcaRaptor card) { + super(card); + } + + @Override + public OrazcaRaptor copy() { + return new OrazcaRaptor(this); + } +} From c61dc16ff6849f6de10c3197d3ab64d8b3605a88 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:48:51 +0000 Subject: [PATCH 19/51] Implemented Raging Regisaur --- .../src/mage/cards/r/RagingRegisaur.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RagingRegisaur.java diff --git a/Mage.Sets/src/mage/cards/r/RagingRegisaur.java b/Mage.Sets/src/mage/cards/r/RagingRegisaur.java new file mode 100644 index 0000000000..551a9986e6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RagingRegisaur.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.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author L_J + */ +public class RagingRegisaur extends CardImpl { + + public RagingRegisaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Raging Regisaur attacks, it deals 1 damage to target creature or player. + Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1), false, "it deals 1 damage to target creature or player"); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public RagingRegisaur(final RagingRegisaur card) { + super(card); + } + + @Override + public RagingRegisaur copy() { + return new RagingRegisaur(this); + } +} From c8650e8af43389573b395b9f255bccddda9b0265 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:49:30 +0000 Subject: [PATCH 20/51] Implemented Ravenous Chupacabra --- .../src/mage/cards/r/RavenousChupacabra.java | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RavenousChupacabra.java diff --git a/Mage.Sets/src/mage/cards/r/RavenousChupacabra.java b/Mage.Sets/src/mage/cards/r/RavenousChupacabra.java new file mode 100644 index 0000000000..d268f9b665 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RavenousChupacabra.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.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class RavenousChupacabra extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public RavenousChupacabra(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); + this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Ravenous Chupacabra enters the battlefield, destroy target creature an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public RavenousChupacabra(final RavenousChupacabra card) { + super(card); + } + + @Override + public RavenousChupacabra copy() { + return new RavenousChupacabra(this); + } +} From 1d51c537c7cddfdc5511bed86f957fb354790e33 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:49:58 +0000 Subject: [PATCH 21/51] Implemented Reaver Ambush --- Mage.Sets/src/mage/cards/r/ReaverAmbush.java | 68 ++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/ReaverAmbush.java diff --git a/Mage.Sets/src/mage/cards/r/ReaverAmbush.java b/Mage.Sets/src/mage/cards/r/ReaverAmbush.java new file mode 100644 index 0000000000..be1174f07b --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReaverAmbush.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author L_J + */ +public class ReaverAmbush extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 4)); + } + + public ReaverAmbush(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}"); + + // Exile target creature with power 3 or less. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new ExileTargetEffect()); + } + + public ReaverAmbush(final ReaverAmbush card) { + super(card); + } + + @Override + public ReaverAmbush copy() { + return new ReaverAmbush(this); + } +} From 1cdb598944f1f868f06b5a7fd3e9181faae6ea30 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:50:40 +0000 Subject: [PATCH 22/51] Implemented Silverclad Ferocidons --- .../mage/cards/s/SilvercladFerocidons.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SilvercladFerocidons.java diff --git a/Mage.Sets/src/mage/cards/s/SilvercladFerocidons.java b/Mage.Sets/src/mage/cards/s/SilvercladFerocidons.java new file mode 100644 index 0000000000..3c6b545eaa --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SilvercladFerocidons.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.SacrificeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; + +/** + * + * @author L_J + */ +public class SilvercladFerocidons extends CardImpl { + + public SilvercladFerocidons(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(8); + this.toughness = new MageInt(5); + + // Enrage — Whenever Silverclad Ferocidon is dealt damage, each opponent sacrifices a permanent. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new SacrificeOpponentsEffect(new FilterPermanent()), false, true)); + } + + public SilvercladFerocidons(final SilvercladFerocidons card) { + super(card); + } + + @Override + public SilvercladFerocidons copy() { + return new SilvercladFerocidons(this); + } +} From a37b32b879352f336fc08f0e3d19a82c5ef26ed1 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:51:15 +0000 Subject: [PATCH 23/51] Implemented Sun Sentinel --- Mage.Sets/src/mage/cards/s/SunSentinel.java | 63 +++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SunSentinel.java diff --git a/Mage.Sets/src/mage/cards/s/SunSentinel.java b/Mage.Sets/src/mage/cards/s/SunSentinel.java new file mode 100644 index 0000000000..9f7bbc8e2f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunSentinel.java @@ -0,0 +1,63 @@ +/* + * 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.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class SunSentinel extends CardImpl { + + public SunSentinel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + } + + public SunSentinel(final SunSentinel card) { + super(card); + } + + @Override + public SunSentinel copy() { + return new SunSentinel(this); + } +} From 9a9a2dda727e46027b836ff5687ee9de64d817cc Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:51:53 +0000 Subject: [PATCH 24/51] Implemented Sworn Guardian --- Mage.Sets/src/mage/cards/s/SwornGuardian.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SwornGuardian.java diff --git a/Mage.Sets/src/mage/cards/s/SwornGuardian.java b/Mage.Sets/src/mage/cards/s/SwornGuardian.java new file mode 100644 index 0000000000..9ff3be0ed2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwornGuardian.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class SwornGuardian extends CardImpl { + + public SwornGuardian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + } + + public SwornGuardian(final SwornGuardian card) { + super(card); + } + + @Override + public SwornGuardian copy() { + return new SwornGuardian(this); + } +} From 722dee7b97c3b67233d0beb12fb26f71b3d4ac96 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:52:26 +0000 Subject: [PATCH 25/51] Implemented Vampire Revenant --- .../src/mage/cards/v/VampireRevenant.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VampireRevenant.java diff --git a/Mage.Sets/src/mage/cards/v/VampireRevenant.java b/Mage.Sets/src/mage/cards/v/VampireRevenant.java new file mode 100644 index 0000000000..72de130b76 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VampireRevenant.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author L_J + */ +public class VampireRevenant extends CardImpl { + + public VampireRevenant (UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + public VampireRevenant (final VampireRevenant card) { + super(card); + } + + @Override + public VampireRevenant copy() { + return new VampireRevenant(this); + } + +} From e4f798c8d0da70e28f375b453c642b655c4509a0 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 6 Jan 2018 10:53:20 +0000 Subject: [PATCH 26/51] [RIX] Added 24 cards --- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index b21463f31f..99f23a557e 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -67,6 +67,8 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Baffling End", 1, Rarity.UNCOMMON, mage.cards.b.BafflingEnd.class)); cards.add(new SetCardInfo("Bombard", 93, Rarity.COMMON, mage.cards.b.Bombard.class)); cards.add(new SetCardInfo("Brass's Bounty", 94, Rarity.RARE, mage.cards.b.BrasssBounty.class)); + cards.add(new SetCardInfo("Cacophodon", 123, Rarity.UNCOMMON, mage.cards.c.Cacophodon.class)); + cards.add(new SetCardInfo("Canal Monitor", 63, Rarity.COMMON, mage.cards.c.CanalMonitor.class)); cards.add(new SetCardInfo("Captain's Hook", 177, Rarity.RARE, mage.cards.c.CaptainsHook.class)); cards.add(new SetCardInfo("Champion of Dusk", 64, Rarity.RARE, mage.cards.c.ChampionOfDusk.class)); cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.COMMON, mage.cards.c.CinderBarrens.class)); @@ -80,7 +82,9 @@ public class RivalsOfIxalan extends ExpansionSet { 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("Etali, Primal Storm", 100, Rarity.RARE, mage.cards.e.EtaliPrimalStorm.class)); + cards.add(new SetCardInfo("Everdawn Champion", 6, Rarity.UNCOMMON, mage.cards.e.EverdawnChampion.class)); cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); + cards.add(new SetCardInfo("Exultant Skymarcher", 7, Rarity.COMMON, mage.cards.e.ExultantSkymarcher.class)); cards.add(new SetCardInfo("Famished Paladin", 8, Rarity.UNCOMMON, mage.cards.f.FamishedPaladin.class)); cards.add(new SetCardInfo("Fanatical Firebrand", 101, Rarity.COMMON, mage.cards.f.FanaticalFirebrand.class)); cards.add(new SetCardInfo("Flood of Recollection", 38, Rarity.UNCOMMON, mage.cards.f.FloodOfRecollection.class)); @@ -91,12 +95,17 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Forest", 196, Rarity.COMMON, mage.cards.basiclands.Forest.class)); cards.add(new SetCardInfo("Forsaken Sanctuary", 187, Rarity.UNCOMMON, mage.cards.f.ForsakenSanctuary.class)); cards.add(new SetCardInfo("Foul Orchard", 188, Rarity.UNCOMMON, mage.cards.f.FoulOrchard.class)); + cards.add(new SetCardInfo("Frilled Deathspitter", 104, Rarity.COMMON, mage.cards.f.FrilledDeathspitter.class)); cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); + cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); + cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); + cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Hadana's Climb", 158, Rarity.RARE, mage.cards.h.HadanasClimb.class)); cards.add(new SetCardInfo("Highland Lake", 189, Rarity.UNCOMMON, mage.cards.h.HighlandLake.class)); cards.add(new SetCardInfo("Hunt the Weak", 133, Rarity.COMMON, mage.cards.h.HuntTheWeak.class)); cards.add(new SetCardInfo("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.class)); + cards.add(new SetCardInfo("Imperial Ceratops", 10, Rarity.UNCOMMON, mage.cards.i.ImperialCeratops.class)); cards.add(new SetCardInfo("Island", 193, Rarity.COMMON, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Jade Bearer", 134, Rarity.COMMON, mage.cards.j.JadeBearer.class)); cards.add(new SetCardInfo("Jadecraft Artisan", 135, Rarity.COMMON, mage.cards.j.JadecraftArtisan.class)); @@ -111,12 +120,20 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Legion Conquistador", 11, Rarity.COMMON, mage.cards.l.LegionConquistador.class)); cards.add(new SetCardInfo("Legion Lieutenant", 163, Rarity.UNCOMMON, mage.cards.l.LegionLieutenant.class)); cards.add(new SetCardInfo("Luminous Bonds", 12, Rarity.COMMON, mage.cards.l.LuminousBonds.class)); + cards.add(new SetCardInfo("Majestic Heliopterus", 13, Rarity.UNCOMMON, mage.cards.m.MajesticHeliopterus.class)); + cards.add(new SetCardInfo("Martyr of Dusk", 14, Rarity.COMMON, mage.cards.m.MartyrOfDusk.class)); + cards.add(new SetCardInfo("Mastermind's Acquisition", 77, Rarity.RARE, mage.cards.m.MastermindsAcquisition.class)); cards.add(new SetCardInfo("Merfolk Mistbinder", 164, Rarity.UNCOMMON, mage.cards.m.MerfolkMistbinder.class)); + cards.add(new SetCardInfo("Mist-Cloaked Herald", 43, Rarity.COMMON, mage.cards.m.MistCloakedHerald.class)); + cards.add(new SetCardInfo("Moment of Craving", 79, Rarity.COMMON, mage.cards.m.MomentOfCraving.class)); + cards.add(new SetCardInfo("Moment of Triumph", 15, Rarity.COMMON, mage.cards.m.MomentOfTriumph.class)); cards.add(new SetCardInfo("Mountain", 195, Rarity.COMMON, mage.cards.basiclands.Mountain.class)); cards.add(new SetCardInfo("Naturalize", 139, Rarity.COMMON, mage.cards.n.Naturalize.class)); + cards.add(new SetCardInfo("Needletooth Raptor", 107, Rarity.UNCOMMON, mage.cards.n.NeedletoothRaptor.class)); cards.add(new SetCardInfo("Negate", 44, Rarity.COMMON, mage.cards.n.Negate.class)); cards.add(new SetCardInfo("Nezahal, Primal Tide", 45, Rarity.RARE, mage.cards.n.NezahalPrimalTide.class)); cards.add(new SetCardInfo("Orazca Frillback", 140, Rarity.COMMON, OrazcaFrillback.class)); + cards.add(new SetCardInfo("Orazca Raptor", 108, Rarity.COMMON, mage.cards.o.OrazcaRaptor.class)); cards.add(new SetCardInfo("Overgrown Armasaur", 141, Rarity.COMMON, mage.cards.o.OvergrownArmasaur.class)); cards.add(new SetCardInfo("Paladin of Atonement", 16, Rarity.RARE, mage.cards.p.PaladinOfAtonement.class)); cards.add(new SetCardInfo("Path of Discovery", 142, Rarity.RARE, mage.cards.p.PathOfDiscovery.class)); @@ -124,7 +141,10 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Plains", 192, Rarity.COMMON, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class)); cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); + cards.add(new SetCardInfo("Raging Regisaur", 168, Rarity.UNCOMMON, mage.cards.r.RagingRegisaur.class)); cards.add(new SetCardInfo("Raptor Companion", 19, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); + cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); + cards.add(new SetCardInfo("Reaver Ambush", 83, Rarity.UNCOMMON, mage.cards.r.ReaverAmbush.class)); cards.add(new SetCardInfo("Recover", 84, Rarity.COMMON, mage.cards.r.Recover.class)); cards.add(new SetCardInfo("Sailor of Means", 49, Rarity.COMMON, mage.cards.s.SailorOfMeans.class)); cards.add(new SetCardInfo("Seafloor Oracle", 51, Rarity.RARE, mage.cards.s.SeafloorOracle.class)); @@ -132,6 +152,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Shake the Foundations", 113, Rarity.UNCOMMON, mage.cards.s.ShakeTheFoundations.class)); cards.add(new SetCardInfo("Shatter", 114, Rarity.COMMON, mage.cards.s.Shatter.class)); cards.add(new SetCardInfo("Silent Gravestone", 182, Rarity.RARE, mage.cards.s.SilentGravestone.class)); + cards.add(new SetCardInfo("Silverclad Ferocidons", 115, Rarity.RARE, mage.cards.s.SilvercladFerocidons.class)); 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)); @@ -140,14 +161,17 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Storm the Vault", 173, Rarity.RARE, mage.cards.s.StormTheVault.class)); cards.add(new SetCardInfo("Strength of the Pack", 145, Rarity.UNCOMMON, mage.cards.s.StrengthOfThePack.class)); cards.add(new SetCardInfo("Strider Harness", 183, Rarity.COMMON, mage.cards.s.StriderHarness.class)); + cards.add(new SetCardInfo("Sun Sentinel", 26, Rarity.COMMON, mage.cards.s.SunSentinel.class)); cards.add(new SetCardInfo("Swab Goblin", 203, Rarity.COMMON, mage.cards.s.SwabGoblin.class)); cards.add(new SetCardInfo("Swamp", 194, Rarity.COMMON, mage.cards.basiclands.Swamp.class)); + cards.add(new SetCardInfo("Sworn Guardian", 58, Rarity.COMMON, mage.cards.s.SwornGuardian.class)); cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); cards.add(new SetCardInfo("The Immortal Sun", 180, Rarity.MYTHIC, mage.cards.t.TheImmortalSun.class)); cards.add(new SetCardInfo("Thrashing Brontodon", 148, Rarity.UNCOMMON, mage.cards.t.ThrashingBrontodon.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); cards.add(new SetCardInfo("Vampire Champion", 198, Rarity.COMMON, mage.cards.v.VampireChampion.class)); + cards.add(new SetCardInfo("Vampire Revenant", 89, Rarity.COMMON, mage.cards.v.VampireRevenant.class)); cards.add(new SetCardInfo("Vault of Catlacan", 173, Rarity.RARE, mage.cards.v.VaultOfCatlacan.class)); cards.add(new SetCardInfo("Vona's Hunger", 90, Rarity.RARE, mage.cards.v.VonasHunger.class)); cards.add(new SetCardInfo("Vraska's Conquistador", 199, Rarity.UNCOMMON, mage.cards.v.VraskasConquistador.class)); From 7189cb868f80a8d5d9ac0ec2d180186393605994 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 12:40:25 +0100 Subject: [PATCH 27/51] [RIX] Added 9 cards. --- .../src/mage/cards/{m => b}/BafflingEnd.java | 172 +++++------ Mage.Sets/src/mage/cards/c/Cacophodon.java | 69 +++++ .../src/mage/cards/c/CherishedHatchling.java | 176 +++++++++++ .../src/mage/cards/c/CrestedHerdcaller.java | 69 +++++ .../src/mage/cards/e/EnterTheUnknown.java | 66 +++++ Mage.Sets/src/mage/cards/e/Explore.java | 19 +- .../src/mage/cards/g/GiltgroveStalker.java | 75 +++++ Mage.Sets/src/mage/cards/h/HardyVeteran.java | 76 +++++ Mage.Sets/src/mage/cards/s/SwiftWarden.java | 86 ++++++ .../src/mage/cards/t/TendershootDryad.java | 96 ++++++ .../mage/cards/t/ThunderherdMigration.java | 78 +++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 275 +++++++++--------- ...ttackBlockUnlessConditionSourceEffect.java | 148 +++++----- .../PlayAdditionalLandsControllerEffect.java | 12 +- 14 files changed, 1109 insertions(+), 308 deletions(-) rename Mage.Sets/src/mage/cards/{m => b}/BafflingEnd.java (97%) create mode 100644 Mage.Sets/src/mage/cards/c/Cacophodon.java create mode 100644 Mage.Sets/src/mage/cards/c/CherishedHatchling.java create mode 100644 Mage.Sets/src/mage/cards/c/CrestedHerdcaller.java create mode 100644 Mage.Sets/src/mage/cards/e/EnterTheUnknown.java create mode 100644 Mage.Sets/src/mage/cards/g/GiltgroveStalker.java create mode 100644 Mage.Sets/src/mage/cards/h/HardyVeteran.java create mode 100644 Mage.Sets/src/mage/cards/s/SwiftWarden.java create mode 100644 Mage.Sets/src/mage/cards/t/TendershootDryad.java create mode 100644 Mage.Sets/src/mage/cards/t/ThunderherdMigration.java diff --git a/Mage.Sets/src/mage/cards/m/BafflingEnd.java b/Mage.Sets/src/mage/cards/b/BafflingEnd.java similarity index 97% rename from Mage.Sets/src/mage/cards/m/BafflingEnd.java rename to Mage.Sets/src/mage/cards/b/BafflingEnd.java index 2c43e9888a..58a2e499bf 100644 --- a/Mage.Sets/src/mage/cards/m/BafflingEnd.java +++ b/Mage.Sets/src/mage/cards/b/BafflingEnd.java @@ -1,86 +1,86 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.m; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.effects.common.CreateTokenTargetEffect; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.permanent.token.DinosaurToken; -import mage.target.Target; -import mage.target.TargetPermanent; -import mage.target.common.TargetOpponent; - -/** - * - * @author LevelX2 - */ -public class BafflingEnd extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less an opponent controls"); - - static { - filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4)); - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } - - public BafflingEnd(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - - // When Mysterious end enters the battlefield, exile target creature with converted mana cost 3 or less an opponent controls. - Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect()); - ability.addTarget(new TargetPermanent(filter)); - this.addAbility(ability); - - // When Mysterious end leaves the battlefield, target opponent create a 3/3 green Dinosaur creature token with trample. - ability = new LeavesBattlefieldTriggeredAbility(new CreateTokenTargetEffect(new DinosaurToken()), false); - Target target = new TargetOpponent(); - ability.addTarget(target); - this.addAbility(ability); - - } - - public BafflingEnd(final BafflingEnd card) { - super(card); - } - - @Override - public BafflingEnd copy() { - return new BafflingEnd(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.DinosaurToken; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class BafflingEnd extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less an opponent controls"); + + static { + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4)); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public BafflingEnd(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + // When Mysterious end enters the battlefield, exile target creature with converted mana cost 3 or less an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + + // When Mysterious end leaves the battlefield, target opponent create a 3/3 green Dinosaur creature token with trample. + ability = new LeavesBattlefieldTriggeredAbility(new CreateTokenTargetEffect(new DinosaurToken()), false); + Target target = new TargetOpponent(); + ability.addTarget(target); + this.addAbility(ability); + + } + + public BafflingEnd(final BafflingEnd card) { + super(card); + } + + @Override + public BafflingEnd copy() { + return new BafflingEnd(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/Cacophodon.java b/Mage.Sets/src/mage/cards/c/Cacophodon.java new file mode 100644 index 0000000000..02f7a69650 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Cacophodon.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class Cacophodon extends CardImpl { + + public Cacophodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Enrage — Whenever Cacophodon is dealt damage, untap target permanent. + Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), false, true); + ability.addTarget(new TargetPermanent()); + this.addAbility(ability); + } + + public Cacophodon(final Cacophodon card) { + super(card); + } + + @Override + public Cacophodon copy() { + return new Cacophodon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CherishedHatchling.java b/Mage.Sets/src/mage/cards/c/CherishedHatchling.java new file mode 100644 index 0000000000..a263a03edc --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CherishedHatchling.java @@ -0,0 +1,176 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.FightTargetSourceEffect; +import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class CherishedHatchling extends CardImpl { + + private static final FilterCard filterCard = new FilterCard("Dinosaur spells"); + + static { + filterCard.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public CherishedHatchling(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(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." + Ability ability = new DiesTriggeredAbility(new CastAsThoughItHadFlashAllEffect(Duration.EndOfTurn, filterCard, false)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new CherishedHatchlingTriggeredAbility())); + this.addAbility(ability); + } + + public CherishedHatchling(final CherishedHatchling card) { + super(card); + } + + @Override + public CherishedHatchling copy() { + return new CherishedHatchling(this); + } +} + +class CherishedHatchlingTriggeredAbility extends DelayedTriggeredAbility { + + public CherishedHatchlingTriggeredAbility() { + super(new CherishedHatchlingGainAbilityEffect(), Duration.EndOfTurn, true); + } + + private CherishedHatchlingTriggeredAbility(final CherishedHatchlingTriggeredAbility ability) { + super(ability); + } + + @Override + public CherishedHatchlingTriggeredAbility copy() { + return new CherishedHatchlingTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.SPELL_CAST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getPlayerId().equals(this.getControllerId())) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && spell.isCreature() && spell.hasSubtype(SubType.DINOSAUR, game)) { + getEffects().setTargetPointer(new FixedTarget(spell.getId())); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "and whenever you cast a Dinosaur spell this turn, " + super.getRule(); + } +} + +class CherishedHatchlingGainAbilityEffect extends ContinuousEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); + + static { + filter.add(new AnotherPredicate()); + } + private Ability abilityToAdd = null; + private Card relatedCard = null; + + public CherishedHatchlingGainAbilityEffect() { + super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); + staticText = "it gains \"When this creature enters the battlefield, you may have it fight another target creature.\""; + } + + public CherishedHatchlingGainAbilityEffect(final CherishedHatchlingGainAbilityEffect effect) { + super(effect); + this.abilityToAdd = effect.abilityToAdd; + this.relatedCard = effect.relatedCard; + } + + @Override + public CherishedHatchlingGainAbilityEffect copy() { + return new CherishedHatchlingGainAbilityEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (relatedCard == null) { + Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source)); + if (spell != null) { + relatedCard = game.getCard(spell.getSourceId()); + Effect effect = new FightTargetSourceEffect(); + effect.setText("you may have it fight another target creature"); + abilityToAdd = new EntersBattlefieldTriggeredAbility(effect, true); + abilityToAdd.addTarget(new TargetCreaturePermanent(filter)); + } + } + if (relatedCard != null) { + game.getState().addOtherAbility(relatedCard, abilityToAdd, false); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CrestedHerdcaller.java b/Mage.Sets/src/mage/cards/c/CrestedHerdcaller.java new file mode 100644 index 0000000000..a485e37390 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CrestedHerdcaller.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.DinosaurToken; + +/** + * + * @author LevelX2 + */ +public class CrestedHerdcaller extends CardImpl { + + public CrestedHerdcaller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Crested Herdcaller enters the battlefield, create a 3/3 green Dinosaur creature token with trample. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new DinosaurToken()))); + } + + public CrestedHerdcaller(final CrestedHerdcaller card) { + super(card); + } + + @Override + public CrestedHerdcaller copy() { + return new CrestedHerdcaller(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EnterTheUnknown.java b/Mage.Sets/src/mage/cards/e/EnterTheUnknown.java new file mode 100644 index 0000000000..bf3272ef7a --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EnterTheUnknown.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.e; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect; +import mage.abilities.effects.keyword.ExploreTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class EnterTheUnknown extends CardImpl { + + public EnterTheUnknown(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); + + // Target creature you control explores. + this.getSpellAbility().addEffect(new ExploreTargetEffect() + .setText("Target creature you control 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.)")); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + // You may play an additional land this turn. + this.getSpellAbility().addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn)); + + } + + public EnterTheUnknown(final EnterTheUnknown card) { + super(card); + } + + @Override + public EnterTheUnknown copy() { + return new EnterTheUnknown(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/Explore.java b/Mage.Sets/src/mage/cards/e/Explore.java index 355ff20690..1c4d2ebee0 100644 --- a/Mage.Sets/src/mage/cards/e/Explore.java +++ b/Mage.Sets/src/mage/cards/e/Explore.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,12 +20,11 @@ * 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; @@ -43,10 +42,12 @@ import mage.constants.Duration; public class Explore extends CardImpl { public Explore(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); + // You may play an additional land this turn. this.getSpellAbility().addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn)); + + // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } @@ -58,4 +59,4 @@ public class Explore extends CardImpl { public Explore copy() { return new Explore(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/g/GiltgroveStalker.java b/Mage.Sets/src/mage/cards/g/GiltgroveStalker.java new file mode 100644 index 0000000000..cd4ef215f4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiltgroveStalker.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +/** + * + * @author LevelX2 + */ +public class GiltgroveStalker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with power 2 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); + } + + public GiltgroveStalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Giltgrove Stalker can't be blocked by creatures with power 2 or less. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public GiltgroveStalker(final GiltgroveStalker card) { + super(card); + } + + @Override + public GiltgroveStalker copy() { + return new GiltgroveStalker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HardyVeteran.java b/Mage.Sets/src/mage/cards/h/HardyVeteran.java new file mode 100644 index 0000000000..88d23ce058 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HardyVeteran.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class HardyVeteran extends CardImpl { + + public HardyVeteran(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // As long as it's your turn, Hardy Veteran gets +0/+2. + Effect boostEffect = new ConditionalContinuousEffect( + new BoostSourceEffect(0, 2, Duration.WhileOnBattlefield), + MyTurnCondition.instance, + "As long as it's your turn, {this} gets +0/+2"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, boostEffect); + this.addAbility(ability); + } + + public HardyVeteran(final HardyVeteran card) { + super(card); + } + + @Override + public HardyVeteran copy() { + return new HardyVeteran(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SwiftWarden.java b/Mage.Sets/src/mage/cards/s/SwiftWarden.java new file mode 100644 index 0000000000..e5fd011d8b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwiftWarden.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.HexproofAbility; +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.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class SwiftWarden extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Merfolk you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new SubtypePredicate(SubType.MERFOLK)); + } + + public SwiftWarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // When Swift Warden enters the battlefield, target Merfolk you control gains hexproof until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn)); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public SwiftWarden(final SwiftWarden card) { + super(card); + } + + @Override + public SwiftWarden copy() { + return new SwiftWarden(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TendershootDryad.java b/Mage.Sets/src/mage/cards/t/TendershootDryad.java new file mode 100644 index 0000000000..854527451d --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TendershootDryad.java @@ -0,0 +1,96 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +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.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.SaprolingToken; + +/** + * + * @author LevelX2 + */ +public class TendershootDryad extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Saprolings you control"); + + static { + filter.add(new SubtypePredicate(SubType.SAPROLING)); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public TendershootDryad(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.DRYAD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Ascend + this.addAbility(new AscendAbility()); + + // At the beginning of each upkeep, create a 1/1 green Saproling creature token. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new SaprolingToken()), TargetController.ANY, false)); + + // Saprolings you control get +2/+2 as long as you have the city's blessing. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, filter), + CitysBlessingCondition.instance, + "Saprolings you control get +2/+2 as long as you have the city's blessing." + ) + )); + } + + public TendershootDryad(final TendershootDryad card) { + super(card); + } + + @Override + public TendershootDryad copy() { + return new TendershootDryad(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThunderherdMigration.java b/Mage.Sets/src/mage/cards/t/ThunderherdMigration.java new file mode 100644 index 0000000000..8ab1747664 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThunderherdMigration.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.t; + +import java.util.UUID; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class ThunderherdMigration extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Dinosaur card from your hand"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public ThunderherdMigration(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); + + // As an additional cost to cast Thunderherd Migration, reveal a Dinosaur card from your hand or pay {1}. + this.getSpellAbility().addCost(new OrCost( + new RevealTargetFromHandCost(new TargetCardInHand(filter)), + new GenericManaCost(1), + "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. + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true)); + } + + public ThunderherdMigration(final ThunderherdMigration card) { + super(card); + } + + @Override + public ThunderherdMigration copy() { + return new ThunderherdMigration(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index aa164b4564..35b50ad0a0 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -1,133 +1,142 @@ -/* -* 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.sets; - -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * - * @author fireshoes - */ -public class RivalsOfIxalan extends ExpansionSet { - - private static final RivalsOfIxalan instance = new RivalsOfIxalan(); - - public static RivalsOfIxalan getInstance() { - return instance; - } - - private RivalsOfIxalan() { - super("Rivals of Ixalan", "RIX", ExpansionSet.buildDate(2018, 1, 19), SetType.EXPANSION); - this.blockName = "Ixalan"; - this.parentSet = Ixalan.getInstance(); - this.hasBoosters = true; - this.hasBasicLands = false; - this.numBoosterLands = 1; - this.numBoosterCommon = 11; - this.numBoosterUncommon = 3; - this.numBoosterRare = 1; - this.ratioBoosterMythic = 8; - - cards.add(new SetCardInfo("Admiral's Order", 31, Rarity.RARE, mage.cards.a.AdmiralsOrder.class)); - cards.add(new SetCardInfo("Angrath, Minotaur Pirate", 201, Rarity.MYTHIC, mage.cards.a.AngrathMinotaurPirate.class)); - cards.add(new SetCardInfo("Angrath's Ambusher", 202, Rarity.UNCOMMON, mage.cards.a.AngrathsAmbusher.class)); - cards.add(new SetCardInfo("Angrath's Fury", 204, Rarity.RARE, mage.cards.a.AngrathsFury.class)); - cards.add(new SetCardInfo("Arterial Flow", 62, Rarity.UNCOMMON, mage.cards.a.ArterialFlow.class)); - cards.add(new SetCardInfo("Atzal, Cave of Eternity", 160, Rarity.RARE, mage.cards.a.AtzalCaveOfEternity.class)); - cards.add(new SetCardInfo("Aztocan Seer", 153, Rarity.UNCOMMON, mage.cards.a.AztocanSeer.class)); - cards.add(new SetCardInfo("Baffling End", 1, Rarity.UNCOMMON, mage.cards.b.BafflingEnd.class)); - cards.add(new SetCardInfo("Bombard", 93, Rarity.COMMON, mage.cards.b.Bombard.class)); - cards.add(new SetCardInfo("Brass's Bounty", 94, Rarity.RARE, mage.cards.b.BrasssBounty.class)); - cards.add(new SetCardInfo("Buffling End", 1, Rarity.UNCOMMON, mage.cards.m.BafflingEnd.class)); - cards.add(new SetCardInfo("Captain's Hook", 177, Rarity.RARE, mage.cards.c.CaptainsHook.class)); - cards.add(new SetCardInfo("Champion of Dusk", 64, Rarity.RARE, mage.cards.c.ChampionOfDusk.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 Daredevil", 99, Rarity.RARE, mage.cards.d.DireFleetDaredevil.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)); - 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("Famished Paladin", 8, Rarity.UNCOMMON, mage.cards.f.FamishedPaladin.class)); - cards.add(new SetCardInfo("Fanatical Firebrand", 101, Rarity.COMMON, mage.cards.f.FanaticalFirebrand.class)); - cards.add(new SetCardInfo("Flood of Recollection", 38, Rarity.UNCOMMON, mage.cards.f.FloodOfRecollection.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)); - 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("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.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)); - cards.add(new SetCardInfo("Knight of the Stampede", 138, Rarity.COMMON, mage.cards.k.KnightOfTheStampede.class)); - cards.add(new SetCardInfo("Kumena, Tyrant of Orazca", 162, Rarity.MYTHIC, mage.cards.k.KumenaTyrantOfOrazca.class)); - cards.add(new SetCardInfo("Kumena's Awakening", 42, Rarity.RARE, mage.cards.k.KumenasAwakening.class)); - cards.add(new SetCardInfo("Legion Lieutenant", 163, Rarity.UNCOMMON, mage.cards.l.LegionLieutenant.class)); - cards.add(new SetCardInfo("Luminous Bonds", 12, Rarity.COMMON, mage.cards.l.LuminousBonds.class)); - cards.add(new SetCardInfo("Merfolk Mistbinder", 164, Rarity.UNCOMMON, mage.cards.m.MerfolkMistbinder.class)); - cards.add(new SetCardInfo("Nezahal, Primal Tide", 45, Rarity.MYTHIC, mage.cards.n.NezahalPrimalTide.class)); - cards.add(new SetCardInfo("Paladin of Atonement", 16, Rarity.RARE, mage.cards.p.PaladinOfAtonement.class)); - cards.add(new SetCardInfo("Path to Discovery", 142, Rarity.RARE, mage.cards.p.PathToDiscovery.class)); - cards.add(new SetCardInfo("Pirate's Pillage", 109, Rarity.UNCOMMON, mage.cards.p.PiratesPillage.class)); - cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); - cards.add(new SetCardInfo("Seafloor Oracle", 51, Rarity.RARE, mage.cards.s.SeafloorOracle.class)); - cards.add(new SetCardInfo("Secrets of the Golden City", 52, Rarity.COMMON, mage.cards.s.SecretsOfTheGoldenCity.class)); - cards.add(new SetCardInfo("Shake the Foundations", 113, Rarity.UNCOMMON, mage.cards.s.ShakeTheFoundations.class)); - cards.add(new SetCardInfo("Silent Gravestone", 182, Rarity.RARE, mage.cards.s.SilentGravestone.class)); - 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)); - cards.add(new SetCardInfo("The Immortal Sun", 180, Rarity.MYTHIC, mage.cards.t.TheImmortalSun.class)); - cards.add(new SetCardInfo("Thrashing Brontodon", 148, Rarity.UNCOMMON, mage.cards.t.ThrashingBrontodon.class)); - cards.add(new SetCardInfo("Vampire Champion", 198, Rarity.COMMON, mage.cards.v.VampireChampion.class)); - cards.add(new SetCardInfo("Vault of Catlacan", 173, Rarity.RARE, mage.cards.v.VaultOfCatlacan.class)); - cards.add(new SetCardInfo("Vicious Cagemaw", 29, Rarity.MYTHIC, mage.cards.v.ViciousCagemaw.class)); - cards.add(new SetCardInfo("Vona's Hunger", 90, Rarity.RARE, mage.cards.v.VonasHunger.class)); - cards.add(new SetCardInfo("Vraska, Scheming Gorgon", 197, Rarity.MYTHIC, mage.cards.v.VraskaSchemingGorgon.class)); - 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("Warkite Marauder", 60, Rarity.RARE, mage.cards.w.WarkiteMarauder.class)); - cards.add(new SetCardInfo("Waterknot", 61, Rarity.COMMON, mage.cards.w.Waterknot.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)); - } -} +/* +* 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.sets; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ +public class RivalsOfIxalan extends ExpansionSet { + + private static final RivalsOfIxalan instance = new RivalsOfIxalan(); + + public static RivalsOfIxalan getInstance() { + return instance; + } + + private RivalsOfIxalan() { + super("Rivals of Ixalan", "RIX", ExpansionSet.buildDate(2018, 1, 19), SetType.EXPANSION); + this.blockName = "Ixalan"; + this.parentSet = Ixalan.getInstance(); + this.hasBoosters = true; + this.hasBasicLands = false; + this.numBoosterLands = 1; + this.numBoosterCommon = 11; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 8; + + cards.add(new SetCardInfo("Admiral's Order", 31, Rarity.RARE, mage.cards.a.AdmiralsOrder.class)); + cards.add(new SetCardInfo("Angrath, Minotaur Pirate", 201, Rarity.MYTHIC, mage.cards.a.AngrathMinotaurPirate.class)); + cards.add(new SetCardInfo("Angrath's Ambusher", 202, Rarity.UNCOMMON, mage.cards.a.AngrathsAmbusher.class)); + cards.add(new SetCardInfo("Angrath's Fury", 204, Rarity.RARE, mage.cards.a.AngrathsFury.class)); + cards.add(new SetCardInfo("Arterial Flow", 62, Rarity.UNCOMMON, mage.cards.a.ArterialFlow.class)); + cards.add(new SetCardInfo("Atzal, Cave of Eternity", 160, Rarity.RARE, mage.cards.a.AtzalCaveOfEternity.class)); + cards.add(new SetCardInfo("Aztocan Seer", 153, Rarity.UNCOMMON, mage.cards.a.AztocanSeer.class)); + cards.add(new SetCardInfo("Baffling End", 1, Rarity.UNCOMMON, mage.cards.b.BafflingEnd.class)); + cards.add(new SetCardInfo("Bombard", 93, Rarity.COMMON, mage.cards.b.Bombard.class)); + cards.add(new SetCardInfo("Brass's Bounty", 94, Rarity.RARE, mage.cards.b.BrasssBounty.class)); + cards.add(new SetCardInfo("Buffling End", 1, Rarity.UNCOMMON, mage.cards.b.BafflingEnd.class)); + cards.add(new SetCardInfo("Cacophodon", 123, Rarity.UNCOMMON, mage.cards.c.Cacophodon.class)); + cards.add(new SetCardInfo("Captain's Hook", 177, Rarity.RARE, mage.cards.c.CaptainsHook.class)); + cards.add(new SetCardInfo("Champion of Dusk", 64, Rarity.RARE, mage.cards.c.ChampionOfDusk.class)); + cards.add(new SetCardInfo("Cherished Hatchling", 124, Rarity.UNCOMMON, mage.cards.c.CherishedHatchling.class)); + cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.RARE, mage.cards.c.CinderBarrens.class)); + cards.add(new SetCardInfo("Crested Herdcaller", 126, Rarity.UNCOMMON, mage.cards.c.CrestedHerdcaller.class)); + cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); + cards.add(new SetCardInfo("Dire Fleet Daredevil", 99, Rarity.RARE, mage.cards.d.DireFleetDaredevil.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)); + cards.add(new SetCardInfo("Enter the Unknown", 128, Rarity.UNCOMMON, mage.cards.e.EnterTheUnknown.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("Famished Paladin", 8, Rarity.UNCOMMON, mage.cards.f.FamishedPaladin.class)); + cards.add(new SetCardInfo("Fanatical Firebrand", 101, Rarity.COMMON, mage.cards.f.FanaticalFirebrand.class)); + cards.add(new SetCardInfo("Flood of Recollection", 38, Rarity.UNCOMMON, mage.cards.f.FloodOfRecollection.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)); + 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("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.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("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); + cards.add(new SetCardInfo("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.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)); + cards.add(new SetCardInfo("Knight of the Stampede", 138, Rarity.COMMON, mage.cards.k.KnightOfTheStampede.class)); + cards.add(new SetCardInfo("Kumena, Tyrant of Orazca", 162, Rarity.MYTHIC, mage.cards.k.KumenaTyrantOfOrazca.class)); + cards.add(new SetCardInfo("Kumena's Awakening", 42, Rarity.RARE, mage.cards.k.KumenasAwakening.class)); + cards.add(new SetCardInfo("Legion Lieutenant", 163, Rarity.UNCOMMON, mage.cards.l.LegionLieutenant.class)); + cards.add(new SetCardInfo("Luminous Bonds", 12, Rarity.COMMON, mage.cards.l.LuminousBonds.class)); + cards.add(new SetCardInfo("Merfolk Mistbinder", 164, Rarity.UNCOMMON, mage.cards.m.MerfolkMistbinder.class)); + cards.add(new SetCardInfo("Nezahal, Primal Tide", 45, Rarity.MYTHIC, mage.cards.n.NezahalPrimalTide.class)); + cards.add(new SetCardInfo("Paladin of Atonement", 16, Rarity.RARE, mage.cards.p.PaladinOfAtonement.class)); + cards.add(new SetCardInfo("Path to Discovery", 142, Rarity.RARE, mage.cards.p.PathToDiscovery.class)); + cards.add(new SetCardInfo("Pirate's Pillage", 109, Rarity.UNCOMMON, mage.cards.p.PiratesPillage.class)); + cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); + cards.add(new SetCardInfo("Seafloor Oracle", 51, Rarity.RARE, mage.cards.s.SeafloorOracle.class)); + cards.add(new SetCardInfo("Secrets of the Golden City", 52, Rarity.COMMON, mage.cards.s.SecretsOfTheGoldenCity.class)); + cards.add(new SetCardInfo("Shake the Foundations", 113, Rarity.UNCOMMON, mage.cards.s.ShakeTheFoundations.class)); + cards.add(new SetCardInfo("Silent Gravestone", 182, Rarity.RARE, mage.cards.s.SilentGravestone.class)); + 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("Swift Warden", 146, Rarity.UNCOMMON, mage.cards.s.SwiftWarden.class)); + cards.add(new SetCardInfo("Tendershoot Dryad", 147, Rarity.RARE, mage.cards.t.TendershootDryad.class)); + cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); + cards.add(new SetCardInfo("The Immortal Sun", 180, Rarity.MYTHIC, mage.cards.t.TheImmortalSun.class)); + cards.add(new SetCardInfo("Thrashing Brontodon", 148, Rarity.UNCOMMON, mage.cards.t.ThrashingBrontodon.class)); + cards.add(new SetCardInfo("Thunderherd Migration", 149, Rarity.UNCOMMON, mage.cards.t.ThunderherdMigration.class)); + cards.add(new SetCardInfo("Vampire Champion", 198, Rarity.COMMON, mage.cards.v.VampireChampion.class)); + cards.add(new SetCardInfo("Vault of Catlacan", 173, Rarity.RARE, mage.cards.v.VaultOfCatlacan.class)); + cards.add(new SetCardInfo("Vicious Cagemaw", 29, Rarity.MYTHIC, mage.cards.v.ViciousCagemaw.class)); + cards.add(new SetCardInfo("Vona's Hunger", 90, Rarity.RARE, mage.cards.v.VonasHunger.class)); + cards.add(new SetCardInfo("Vraska, Scheming Gorgon", 197, Rarity.MYTHIC, mage.cards.v.VraskaSchemingGorgon.class)); + 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("Warkite Marauder", 60, Rarity.RARE, mage.cards.w.WarkiteMarauder.class)); + cards.add(new SetCardInfo("Waterknot", 61, Rarity.COMMON, mage.cards.w.Waterknot.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/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java index 6f9989e9b4..d96365b26e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java @@ -1,74 +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); - } -} +/* + * 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); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java index c7395e98b9..5a8dde49ba 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/PlayAdditionalLandsControllerEffect.java @@ -24,18 +24,18 @@ * 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.continuous; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; -import mage.abilities.Ability; -import mage.abilities.effects.ContinuousEffectImpl; import mage.game.Game; import mage.players.Player; +import mage.util.CardUtil; /** * @author Viserion @@ -80,11 +80,11 @@ public class PlayAdditionalLandsControllerEffect extends ContinuousEffectImpl { if (additionalCards == Integer.MAX_VALUE) { sb.append("any number of"); } else { - sb.append(Integer.toString(additionalCards)); + sb.append(CardUtil.numberToText(additionalCards, "an")); } sb.append(" additional land").append((additionalCards == 1 ? "" : "s")) .append(duration == Duration.EndOfTurn ? " this turn" : " on each of your turns"); staticText = sb.toString(); } -} \ No newline at end of file +} From d0fd325bfa935e1bb29fe3c80c9db84fbaba1df5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 12:48:46 +0100 Subject: [PATCH 28/51] Merge origin/master Conflicts: Mage.Sets/src/mage/cards/c/Cacophodon.java Mage.Sets/src/mage/cards/g/GiltgroveStalker.java Mage.Sets/src/mage/cards/h/HardyVeteran.java Mage.Sets/src/mage/sets/RivalsOfIxalan.java --- Mage.Sets/src/mage/cards/c/Cacophodon.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/c/Cacophodon.java b/Mage.Sets/src/mage/cards/c/Cacophodon.java index 687c4933d6..02f7a69650 100644 --- a/Mage.Sets/src/mage/cards/c/Cacophodon.java +++ b/Mage.Sets/src/mage/cards/c/Cacophodon.java @@ -40,7 +40,6 @@ import mage.constants.Zone; import mage.target.TargetPermanent; /** - * * * @author LevelX2 */ From 509648448ee4a14d91e5f5a7650b0a04079014e4 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 13:31:50 +0100 Subject: [PATCH 29/51] [RIX] Added 2 cards. --- Mage.Sets/src/mage/cards/a/Abolish.java | 2 +- .../src/mage/cards/a/ActOfAuthority.java | 4 +- Mage.Sets/src/mage/cards/a/AltarsLight.java | 2 +- .../mage/cards/a/AppetiteForTheUnnatural.java | 2 +- .../src/mage/cards/a/ArtisansSorrow.java | 2 +- Mage.Sets/src/mage/cards/a/AuraOfSilence.java | 2 +- Mage.Sets/src/mage/cards/a/AuraShards.java | 2 +- Mage.Sets/src/mage/cards/b/BreakAsunder.java | 2 +- .../src/mage/cards/c/CapashenUnicorn.java | 2 +- .../src/mage/cards/c/CausticCaterpillar.java | 2 +- .../src/mage/cards/c/ConclaveNaturalists.java | 2 +- Mage.Sets/src/mage/cards/d/Decommission.java | 2 +- Mage.Sets/src/mage/cards/d/Deglamer.java | 2 +- .../src/mage/cards/d/DestructiveRevelry.java | 2 +- .../src/mage/cards/d/DevoutChaplain.java | 2 +- Mage.Sets/src/mage/cards/d/DevoutWitness.java | 2 +- Mage.Sets/src/mage/cards/d/Disempower.java | 2 +- Mage.Sets/src/mage/cards/d/Disenchant.java | 2 +- .../src/mage/cards/d/DismantlingBlow.java | 2 +- .../src/mage/cards/d/DispellersCapsule.java | 2 +- .../src/mage/cards/f/FadeIntoAntiquity.java | 2 +- Mage.Sets/src/mage/cards/f/FateForgotten.java | 2 +- .../src/mage/cards/f/FiligreeFracture.java | 2 +- .../src/mage/cards/f/ForsakeTheWorldly.java | 2 +- .../mage/cards/f/FreyaliseLlanowarsFury.java | 2 +- .../src/mage/cards/g/GleefulSabotage.java | 2 +- .../src/mage/cards/h/HarmonicSliver.java | 2 +- Mage.Sets/src/mage/cards/h/HideSeek.java | 2 +- .../src/mage/cards/i/IndrikStomphowler.java | 2 +- .../mage/cards/i/IronwrightsCleansing.java | 2 +- .../src/mage/cards/k/KorSanctifiers.java | 2 +- Mage.Sets/src/mage/cards/k/KrosanGrip.java | 2 +- .../src/mage/cards/l/LeoninRelicWarder.java | 2 +- .../src/mage/cards/m/MockeryOfNature.java | 2 +- Mage.Sets/src/mage/cards/m/MysticMelting.java | 2 +- .../src/mage/cards/n/NantukoVigilante.java | 2 +- Mage.Sets/src/mage/cards/n/NaturalEnd.java | 2 +- Mage.Sets/src/mage/cards/n/Naturalize.java | 2 +- Mage.Sets/src/mage/cards/n/NaturesClaim.java | 2 +- .../src/mage/cards/n/NullmageAdvocate.java | 2 +- .../src/mage/cards/n/NullmageShepherd.java | 2 +- Mage.Sets/src/mage/cards/o/OrimsThunder.java | 2 +- .../src/mage/cards/q/QasaliPridemage.java | 2 +- .../src/mage/cards/q/QasaliSlingers.java | 2 +- .../src/mage/cards/q/QuietDisrepair.java | 2 +- .../src/mage/cards/r/RayOfDistortion.java | 2 +- .../src/mage/cards/r/ReclamationSage.java | 2 +- .../src/mage/cards/r/ReduceToDreams.java | 2 +- Mage.Sets/src/mage/cards/r/RelicCrush.java | 4 +- Mage.Sets/src/mage/cards/r/ReliquaryMonk.java | 2 +- Mage.Sets/src/mage/cards/r/RendingVines.java | 2 +- Mage.Sets/src/mage/cards/r/ReturnToDust.java | 4 +- .../src/mage/cards/r/RevokeExistence.java | 2 +- Mage.Sets/src/mage/cards/r/RootOut.java | 2 +- Mage.Sets/src/mage/cards/s/Scrapheap.java | 2 +- .../src/mage/cards/s/SealOfCleansing.java | 2 +- .../src/mage/cards/s/SealOfPrimordium.java | 2 +- Mage.Sets/src/mage/cards/s/SeedSpark.java | 2 +- Mage.Sets/src/mage/cards/s/SliceInTwain.java | 2 +- .../src/mage/cards/s/SolemnOffering.java | 2 +- .../src/mage/cards/s/SpringsageRitual.java | 2 +- Mage.Sets/src/mage/cards/s/SternProctor.java | 2 +- Mage.Sets/src/mage/cards/s/SultaiCharm.java | 2 +- .../src/mage/cards/s/SunderingGrowth.java | 2 +- .../src/mage/cards/s/SunderingVitae.java | 2 +- Mage.Sets/src/mage/cards/s/SylvokReplica.java | 2 +- Mage.Sets/src/mage/cards/t/TerashisGrasp.java | 2 +- .../src/mage/cards/t/ThrashingBrontodon.java | 2 +- .../src/mage/cards/u/UnravelTheAether.java | 2 +- .../src/mage/cards/v/ViridianZealot.java | 2 +- .../src/mage/cards/v/VoraciousVampire.java | 80 +++++++++++++ Mage.Sets/src/mage/cards/w/WearAway.java | 2 +- .../src/mage/cards/w/WickerboughElder.java | 2 +- .../mage/cards/z/ZacamaPrimalCalamity.java | 107 ++++++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 2 + .../CastFromEverywhereSourceCondition.java | 49 ++++++++ .../main/java/mage/filter/StaticFilters.java | 3 +- 77 files changed, 315 insertions(+), 76 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/v/VoraciousVampire.java create mode 100644 Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java create mode 100644 Mage/src/main/java/mage/abilities/condition/common/CastFromEverywhereSourceCondition.java diff --git a/Mage.Sets/src/mage/cards/a/Abolish.java b/Mage.Sets/src/mage/cards/a/Abolish.java index 90a814ecab..acf18f8fda 100644 --- a/Mage.Sets/src/mage/cards/a/Abolish.java +++ b/Mage.Sets/src/mage/cards/a/Abolish.java @@ -63,7 +63,7 @@ public class Abolish extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public Abolish(final Abolish card) { diff --git a/Mage.Sets/src/mage/cards/a/ActOfAuthority.java b/Mage.Sets/src/mage/cards/a/ActOfAuthority.java index b950c130f7..3a0f108245 100644 --- a/Mage.Sets/src/mage/cards/a/ActOfAuthority.java +++ b/Mage.Sets/src/mage/cards/a/ActOfAuthority.java @@ -58,11 +58,11 @@ public class ActOfAuthority extends CardImpl { // When Act of Authority enters the battlefield, you may exile target artifact or enchantment. Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); // At the beginning of your upkeep, you may exile target artifact or enchantment. If you do, its controller gains control of Act of Authority. ability = new BeginningOfUpkeepTriggeredAbility(new ActOfAuthorityEffect(), TargetController.YOU, true); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AltarsLight.java b/Mage.Sets/src/mage/cards/a/AltarsLight.java index 1720890bfa..524b8b3be4 100644 --- a/Mage.Sets/src/mage/cards/a/AltarsLight.java +++ b/Mage.Sets/src/mage/cards/a/AltarsLight.java @@ -47,7 +47,7 @@ public class AltarsLight extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public AltarsLight(final AltarsLight card) { diff --git a/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java b/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java index 6f723aa96c..356706dc5d 100644 --- a/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java +++ b/Mage.Sets/src/mage/cards/a/AppetiteForTheUnnatural.java @@ -48,7 +48,7 @@ public class AppetiteForTheUnnatural extends CardImpl { // Destroy target artifact or enchantment. You gain 2 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(2)); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public AppetiteForTheUnnatural(final AppetiteForTheUnnatural card) { diff --git a/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java b/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java index 8e5a778172..239951ab05 100644 --- a/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java +++ b/Mage.Sets/src/mage/cards/a/ArtisansSorrow.java @@ -47,7 +47,7 @@ public class ArtisansSorrow extends CardImpl { // Destroy target artifact or enchantment. Scry 2. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new ScryEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java index 4fe523c1e2..3e260aa687 100644 --- a/Mage.Sets/src/mage/cards/a/AuraOfSilence.java +++ b/Mage.Sets/src/mage/cards/a/AuraOfSilence.java @@ -58,7 +58,7 @@ public class AuraOfSilence extends CardImpl { // Sacrifice Aura of Silence: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AuraShards.java b/Mage.Sets/src/mage/cards/a/AuraShards.java index ab6f562f02..71b4dc2619 100644 --- a/Mage.Sets/src/mage/cards/a/AuraShards.java +++ b/Mage.Sets/src/mage/cards/a/AuraShards.java @@ -50,7 +50,7 @@ public class AuraShards extends CardImpl { // Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, true, "Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment"); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BreakAsunder.java b/Mage.Sets/src/mage/cards/b/BreakAsunder.java index 08be9b9290..43ce195fbf 100644 --- a/Mage.Sets/src/mage/cards/b/BreakAsunder.java +++ b/Mage.Sets/src/mage/cards/b/BreakAsunder.java @@ -49,7 +49,7 @@ public class BreakAsunder extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java index 09a36f7d36..c76e8d881b 100644 --- a/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java +++ b/Mage.Sets/src/mage/cards/c/CapashenUnicorn.java @@ -60,7 +60,7 @@ public class CapashenUnicorn extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java index 9f2a223973..123b684093 100644 --- a/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java +++ b/Mage.Sets/src/mage/cards/c/CausticCaterpillar.java @@ -58,7 +58,7 @@ public class CausticCaterpillar extends CardImpl { // {1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java index 73c925df3c..d6af13cbe6 100644 --- a/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java +++ b/Mage.Sets/src/mage/cards/c/ConclaveNaturalists.java @@ -54,7 +54,7 @@ public class ConclaveNaturalists extends CardImpl { // When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Decommission.java b/Mage.Sets/src/mage/cards/d/Decommission.java index 8f0d2a60cf..c07fbd404d 100644 --- a/Mage.Sets/src/mage/cards/d/Decommission.java +++ b/Mage.Sets/src/mage/cards/d/Decommission.java @@ -51,7 +51,7 @@ public class Decommission extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Revolt — If a permanent you controlled left the battlefield this turn, you gain 3 life. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(3), RevoltCondition.instance, "
Revolt — If a permanent you controlled left the battlefield this turn, you gain 3 life.")); diff --git a/Mage.Sets/src/mage/cards/d/Deglamer.java b/Mage.Sets/src/mage/cards/d/Deglamer.java index 1cf77a6f05..975a37a8ed 100644 --- a/Mage.Sets/src/mage/cards/d/Deglamer.java +++ b/Mage.Sets/src/mage/cards/d/Deglamer.java @@ -47,7 +47,7 @@ public class Deglamer extends CardImpl { // Choose target artifact or enchantment. Its owner shuffles it into his or her library. this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public Deglamer(final Deglamer card) { diff --git a/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java b/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java index 67b69f3529..356c3b5c2a 100644 --- a/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java +++ b/Mage.Sets/src/mage/cards/d/DestructiveRevelry.java @@ -53,7 +53,7 @@ public class DestructiveRevelry extends CardImpl { // Destroy target artifact or enchantment. Destructive Revelry deals 2 damage to that permanent's controller. this.getSpellAbility().addEffect(new DestructiveRevelryEffect()); - Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); + Target target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT); this.getSpellAbility().addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java index ba4fe4531f..ea9e0578e9 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutChaplain.java +++ b/Mage.Sets/src/mage/cards/d/DevoutChaplain.java @@ -72,7 +72,7 @@ public class DevoutChaplain extends CardImpl { // {T}, Tap two untapped Humans you control: Exile target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost()); ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false))); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DevoutWitness.java b/Mage.Sets/src/mage/cards/d/DevoutWitness.java index 9705ee9383..51ff0abadc 100644 --- a/Mage.Sets/src/mage/cards/d/DevoutWitness.java +++ b/Mage.Sets/src/mage/cards/d/DevoutWitness.java @@ -62,7 +62,7 @@ public class DevoutWitness extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Disempower.java b/Mage.Sets/src/mage/cards/d/Disempower.java index 96c32a46df..cae808826a 100644 --- a/Mage.Sets/src/mage/cards/d/Disempower.java +++ b/Mage.Sets/src/mage/cards/d/Disempower.java @@ -46,7 +46,7 @@ public class Disempower extends CardImpl { // Put target artifact or enchantment on top of its owner's library. this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public Disempower(final Disempower card) { diff --git a/Mage.Sets/src/mage/cards/d/Disenchant.java b/Mage.Sets/src/mage/cards/d/Disenchant.java index de0bae89d1..4cf61887db 100644 --- a/Mage.Sets/src/mage/cards/d/Disenchant.java +++ b/Mage.Sets/src/mage/cards/d/Disenchant.java @@ -47,7 +47,7 @@ public class Disenchant extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public Disenchant(final Disenchant card) { diff --git a/Mage.Sets/src/mage/cards/d/DismantlingBlow.java b/Mage.Sets/src/mage/cards/d/DismantlingBlow.java index 8ffc9aced3..6d50e6279d 100644 --- a/Mage.Sets/src/mage/cards/d/DismantlingBlow.java +++ b/Mage.Sets/src/mage/cards/d/DismantlingBlow.java @@ -53,7 +53,7 @@ public class DismantlingBlow extends CardImpl { this.addAbility(new KickerAbility("{2}{U}")); // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // If Dismantling Blow was kicked, draw two cards. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DrawCardSourceControllerEffect(2), diff --git a/Mage.Sets/src/mage/cards/d/DispellersCapsule.java b/Mage.Sets/src/mage/cards/d/DispellersCapsule.java index 3ccf3a72cb..14c76a507f 100644 --- a/Mage.Sets/src/mage/cards/d/DispellersCapsule.java +++ b/Mage.Sets/src/mage/cards/d/DispellersCapsule.java @@ -52,7 +52,7 @@ public class DispellersCapsule extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{2}{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java b/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java index 75128d052c..02888abb14 100644 --- a/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java +++ b/Mage.Sets/src/mage/cards/f/FadeIntoAntiquity.java @@ -48,7 +48,7 @@ public class FadeIntoAntiquity extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public FadeIntoAntiquity(final FadeIntoAntiquity card) { diff --git a/Mage.Sets/src/mage/cards/f/FateForgotten.java b/Mage.Sets/src/mage/cards/f/FateForgotten.java index 3bf8ebc94c..71f07a5f0e 100644 --- a/Mage.Sets/src/mage/cards/f/FateForgotten.java +++ b/Mage.Sets/src/mage/cards/f/FateForgotten.java @@ -47,7 +47,7 @@ public class FateForgotten extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public FateForgotten(final FateForgotten card) { diff --git a/Mage.Sets/src/mage/cards/f/FiligreeFracture.java b/Mage.Sets/src/mage/cards/f/FiligreeFracture.java index 9506339dae..9a2f41774f 100644 --- a/Mage.Sets/src/mage/cards/f/FiligreeFracture.java +++ b/Mage.Sets/src/mage/cards/f/FiligreeFracture.java @@ -51,7 +51,7 @@ public class FiligreeFracture extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); // Destroy target artifact or enchantment. If that permanent was blue or black, draw a card. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new FiligreeFractureEffect()); } diff --git a/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java b/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java index 580572e466..d644801fcb 100644 --- a/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java +++ b/Mage.Sets/src/mage/cards/f/ForsakeTheWorldly.java @@ -49,7 +49,7 @@ public class ForsakeTheWorldly extends CardImpl { // Exile target artifact or enchantment. getSpellAbility().addEffect(new ExileTargetEffect()); - getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java index d602acecb6..9e92fad408 100644 --- a/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java +++ b/Mage.Sets/src/mage/cards/f/FreyaliseLlanowarsFury.java @@ -71,7 +71,7 @@ public class FreyaliseLlanowarsFury extends CardImpl { this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FreyaliseLlanowarsFuryToken()), 2)); // -2: Destroy target artifact or enchantment. LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DestroyTargetEffect(), -2); - loyaltyAbility.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + loyaltyAbility.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(loyaltyAbility); // -6: Draw a card for each green creature you control. this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterGreen)), -6)); diff --git a/Mage.Sets/src/mage/cards/g/GleefulSabotage.java b/Mage.Sets/src/mage/cards/g/GleefulSabotage.java index 176d08a772..f0b1995e2b 100644 --- a/Mage.Sets/src/mage/cards/g/GleefulSabotage.java +++ b/Mage.Sets/src/mage/cards/g/GleefulSabotage.java @@ -48,7 +48,7 @@ public class GleefulSabotage extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Conspire this.addAbility(new ConspireAbility(getId(), ConspireAbility.ConspireTargets.ONE)); diff --git a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java index fa650b2983..d25c8581df 100644 --- a/Mage.Sets/src/mage/cards/h/HarmonicSliver.java +++ b/Mage.Sets/src/mage/cards/h/HarmonicSliver.java @@ -66,7 +66,7 @@ public class HarmonicSliver extends CardImpl { // All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment." TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); - TargetPermanent target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); + TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT); ability.addTarget(target); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( ability, Duration.WhileOnBattlefield, diff --git a/Mage.Sets/src/mage/cards/h/HideSeek.java b/Mage.Sets/src/mage/cards/h/HideSeek.java index 6e7f88e0b2..70791d160e 100644 --- a/Mage.Sets/src/mage/cards/h/HideSeek.java +++ b/Mage.Sets/src/mage/cards/h/HideSeek.java @@ -58,7 +58,7 @@ public class HideSeek extends SplitCard { // Hide // Put target artifact or enchantment on the bottom of its owner's library. getLeftHalfCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false)); - getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Seek // Search target opponent's library for a card and exile it. You gain life equal to its converted mana cost. Then that player shuffles his or her library.. diff --git a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java index ca867e6a46..03fd8af681 100644 --- a/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java +++ b/Mage.Sets/src/mage/cards/i/IndrikStomphowler.java @@ -52,7 +52,7 @@ public class IndrikStomphowler extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java b/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java index 20a597b9f6..ab5a73a857 100644 --- a/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java +++ b/Mage.Sets/src/mage/cards/i/IronwrightsCleansing.java @@ -47,7 +47,7 @@ public class IronwrightsCleansing extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } diff --git a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java index 449aa0cd44..db9ebb9980 100644 --- a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java +++ b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java @@ -61,7 +61,7 @@ public class KorSanctifiers extends CardImpl { // When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment.")); } diff --git a/Mage.Sets/src/mage/cards/k/KrosanGrip.java b/Mage.Sets/src/mage/cards/k/KrosanGrip.java index 9d5c27f353..075117af38 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanGrip.java +++ b/Mage.Sets/src/mage/cards/k/KrosanGrip.java @@ -49,7 +49,7 @@ public class KrosanGrip extends CardImpl { // Split second this.addAbility(new SplitSecondAbility()); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java index 7e970e1dd6..66f2021f38 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java +++ b/Mage.Sets/src/mage/cards/l/LeoninRelicWarder.java @@ -59,7 +59,7 @@ public class LeoninRelicWarder extends CardImpl { this.toughness = new MageInt(2); Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); diff --git a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java index a640044616..8abaa2b4ed 100644 --- a/Mage.Sets/src/mage/cards/m/MockeryOfNature.java +++ b/Mage.Sets/src/mage/cards/m/MockeryOfNature.java @@ -60,7 +60,7 @@ public class MockeryOfNature extends CardImpl { // When you cast Mockery of Nature, you may destroy target artifact or enchantment. Ability ability = new CastSourceTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MysticMelting.java b/Mage.Sets/src/mage/cards/m/MysticMelting.java index 3c4690c0cd..06f2d597a5 100644 --- a/Mage.Sets/src/mage/cards/m/MysticMelting.java +++ b/Mage.Sets/src/mage/cards/m/MysticMelting.java @@ -50,7 +50,7 @@ public class MysticMelting extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( diff --git a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java index 48fcc414f5..73b5e6d01e 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoVigilante.java +++ b/Mage.Sets/src/mage/cards/n/NantukoVigilante.java @@ -61,7 +61,7 @@ public class NantukoVigilante extends CardImpl { this.addAbility(new MorphAbility(this,new ManaCostsImpl("{1}{G}"))); // When Nantuko Vigilante is turned face up, destroy target artifact or enchantment. Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DestroyTargetEffect()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NaturalEnd.java b/Mage.Sets/src/mage/cards/n/NaturalEnd.java index b243906ef7..dcac13e867 100644 --- a/Mage.Sets/src/mage/cards/n/NaturalEnd.java +++ b/Mage.Sets/src/mage/cards/n/NaturalEnd.java @@ -49,7 +49,7 @@ public class NaturalEnd extends CardImpl { // Destroy target artifact or enchantment. You gain 3 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(3)); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public NaturalEnd(final NaturalEnd card) { diff --git a/Mage.Sets/src/mage/cards/n/Naturalize.java b/Mage.Sets/src/mage/cards/n/Naturalize.java index 680a33ad02..3d92f3ef64 100644 --- a/Mage.Sets/src/mage/cards/n/Naturalize.java +++ b/Mage.Sets/src/mage/cards/n/Naturalize.java @@ -46,7 +46,7 @@ public class Naturalize extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/n/NaturesClaim.java b/Mage.Sets/src/mage/cards/n/NaturesClaim.java index 4e93552176..e729309bc0 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesClaim.java +++ b/Mage.Sets/src/mage/cards/n/NaturesClaim.java @@ -54,7 +54,7 @@ public class NaturesClaim extends CardImpl { // Destroy target artifact or enchantment. Its controller gains 4 life. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new NaturesClaimEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public NaturesClaim(final NaturesClaim card) { diff --git a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java index 951a8c5ad0..a7a1162694 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java @@ -69,7 +69,7 @@ public class NullmageAdvocate extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); ability.addTarget(new TargetCardInOpponentsGraveyard(2, 2, new FilterCard("cards from an opponent's graveyard"), true)); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java index 7dce7ed92f..c356a16532 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageShepherd.java +++ b/Mage.Sets/src/mage/cards/n/NullmageShepherd.java @@ -67,7 +67,7 @@ public class NullmageShepherd extends CardImpl { // Tap four untapped creatures you control: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(4, 4, filterCost, true))); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrimsThunder.java b/Mage.Sets/src/mage/cards/o/OrimsThunder.java index fce6af284b..bc4ac2f117 100644 --- a/Mage.Sets/src/mage/cards/o/OrimsThunder.java +++ b/Mage.Sets/src/mage/cards/o/OrimsThunder.java @@ -61,7 +61,7 @@ public class OrimsThunder extends CardImpl { // Destroy target artifact or enchantment. If Orim's Thunder was kicked, it deals damage equal to that permanent's converted mana cost to target creature. this.getSpellAbility().addEffect(new OrimsThunderEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new OrimsThunderEffect2(), KickedCondition.instance, diff --git a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java index 10b478140d..7083ef710f 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliPridemage.java +++ b/Mage.Sets/src/mage/cards/q/QasaliPridemage.java @@ -64,7 +64,7 @@ public class QasaliPridemage extends CardImpl { // {1}, Sacrifice Qasali Pridemage: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}")); ability.addCost(new SacrificeSourceCost()); - Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); + Target target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/q/QasaliSlingers.java b/Mage.Sets/src/mage/cards/q/QasaliSlingers.java index b3598497e5..7bcf73ebd0 100644 --- a/Mage.Sets/src/mage/cards/q/QasaliSlingers.java +++ b/Mage.Sets/src/mage/cards/q/QasaliSlingers.java @@ -78,7 +78,7 @@ class QasaliSlingersTriggeredAbility extends TriggeredAbilityImpl { public QasaliSlingersTriggeredAbility() { super(Zone.BATTLEFIELD, new DestroyTargetEffect(), true); - this.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public QasaliSlingersTriggeredAbility(final QasaliSlingersTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java index 069df0742d..68a14d05e0 100644 --- a/Mage.Sets/src/mage/cards/q/QuietDisrepair.java +++ b/Mage.Sets/src/mage/cards/q/QuietDisrepair.java @@ -57,7 +57,7 @@ public class QuietDisrepair extends CardImpl { // Enchant artifact or enchantment - TargetPermanent auraTarget = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); diff --git a/Mage.Sets/src/mage/cards/r/RayOfDistortion.java b/Mage.Sets/src/mage/cards/r/RayOfDistortion.java index f673841dd3..e03e8cd9b6 100644 --- a/Mage.Sets/src/mage/cards/r/RayOfDistortion.java +++ b/Mage.Sets/src/mage/cards/r/RayOfDistortion.java @@ -50,7 +50,7 @@ public class RayOfDistortion extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Flashback {4}{W}{W} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{W}{W}"), TimingRule.INSTANT)); } diff --git a/Mage.Sets/src/mage/cards/r/ReclamationSage.java b/Mage.Sets/src/mage/cards/r/ReclamationSage.java index 6191f76d16..b84139455b 100644 --- a/Mage.Sets/src/mage/cards/r/ReclamationSage.java +++ b/Mage.Sets/src/mage/cards/r/ReclamationSage.java @@ -56,7 +56,7 @@ public class ReclamationSage extends CardImpl { // When Reclamation Sage enters the battlefield, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/ReduceToDreams.java b/Mage.Sets/src/mage/cards/r/ReduceToDreams.java index 8fb1942318..077e042ccb 100644 --- a/Mage.Sets/src/mage/cards/r/ReduceToDreams.java +++ b/Mage.Sets/src/mage/cards/r/ReduceToDreams.java @@ -45,7 +45,7 @@ public class ReduceToDreams extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}"); // Return all artifacts and enchantments to their owners' hands. - this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public ReduceToDreams(final ReduceToDreams card) { diff --git a/Mage.Sets/src/mage/cards/r/RelicCrush.java b/Mage.Sets/src/mage/cards/r/RelicCrush.java index 305c8e8b68..d6a3158276 100644 --- a/Mage.Sets/src/mage/cards/r/RelicCrush.java +++ b/Mage.Sets/src/mage/cards/r/RelicCrush.java @@ -50,8 +50,8 @@ public class RelicCrush extends CardImpl { Effect effect = new DestroyTargetEffect(false, true); effect.setText("Destroy target artifact or enchantment and up to one other target artifact or enchantment"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); - this.getSpellAbility().addTarget(new TargetPermanent(0, 1, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); + this.getSpellAbility().addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT, false)); } public RelicCrush(final RelicCrush card) { diff --git a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java index 53d830298c..a0dfb7192b 100644 --- a/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java +++ b/Mage.Sets/src/mage/cards/r/ReliquaryMonk.java @@ -56,7 +56,7 @@ public class ReliquaryMonk extends CardImpl { // When Reliquary Monk dies, destroy target artifact or enchantment. Ability ability = new DiesTriggeredAbility(new DestroyTargetEffect(), false); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RendingVines.java b/Mage.Sets/src/mage/cards/r/RendingVines.java index 3132e4d210..b96ec8dc93 100644 --- a/Mage.Sets/src/mage/cards/r/RendingVines.java +++ b/Mage.Sets/src/mage/cards/r/RendingVines.java @@ -55,7 +55,7 @@ public class RendingVines extends CardImpl { // Destroy target artifact or enchantment if its converted mana cost is less than or equal to the number of cards in your hand. this.getSpellAbility().addEffect(new RendingVinesEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/r/ReturnToDust.java b/Mage.Sets/src/mage/cards/r/ReturnToDust.java index eb3fca9b21..a4d3eff67c 100644 --- a/Mage.Sets/src/mage/cards/r/ReturnToDust.java +++ b/Mage.Sets/src/mage/cards/r/ReturnToDust.java @@ -64,10 +64,10 @@ public class ReturnToDust extends CardImpl { public void adjustTargets(Ability ability, Game game) { if (ability instanceof SpellAbility) { if (game.getActivePlayerId().equals(ability.getControllerId()) && game.isMainPhase()) { - ability.addTarget(new TargetPermanent(1, 2, StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT, false)); + ability.addTarget(new TargetPermanent(1, 2, StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT, false)); } else { - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } } } diff --git a/Mage.Sets/src/mage/cards/r/RevokeExistence.java b/Mage.Sets/src/mage/cards/r/RevokeExistence.java index 19f167e71d..7d90b7e383 100644 --- a/Mage.Sets/src/mage/cards/r/RevokeExistence.java +++ b/Mage.Sets/src/mage/cards/r/RevokeExistence.java @@ -47,7 +47,7 @@ public class RevokeExistence extends CardImpl { // Exile target artifact or enchantment. this.getSpellAbility().addEffect(new ExileTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public RevokeExistence(final RevokeExistence card) { diff --git a/Mage.Sets/src/mage/cards/r/RootOut.java b/Mage.Sets/src/mage/cards/r/RootOut.java index 28603d1203..97a6a8219b 100644 --- a/Mage.Sets/src/mage/cards/r/RootOut.java +++ b/Mage.Sets/src/mage/cards/r/RootOut.java @@ -49,7 +49,7 @@ public class RootOut extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); // Investigate. Effect effect = new InvestigateEffect(); effect.setText("
Investigate. (Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")"); diff --git a/Mage.Sets/src/mage/cards/s/Scrapheap.java b/Mage.Sets/src/mage/cards/s/Scrapheap.java index d92e8d8738..50813b139f 100644 --- a/Mage.Sets/src/mage/cards/s/Scrapheap.java +++ b/Mage.Sets/src/mage/cards/s/Scrapheap.java @@ -91,7 +91,7 @@ class ScrapheapTriggeredAbility extends TriggeredAbilityImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (permanent != null && permanent.getOwnerId().equals(this.getControllerId())) { - if (StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT.match(permanent, sourceId, controllerId, game)) { + if (StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT.match(permanent, sourceId, controllerId, game)) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SealOfCleansing.java b/Mage.Sets/src/mage/cards/s/SealOfCleansing.java index 0ede3eeb00..aee36b3f99 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfCleansing.java +++ b/Mage.Sets/src/mage/cards/s/SealOfCleansing.java @@ -51,7 +51,7 @@ public class SealOfCleansing extends CardImpl { // Sacrifice Seal of Cleansing: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java b/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java index de8062390d..caed2b307c 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java +++ b/Mage.Sets/src/mage/cards/s/SealOfPrimordium.java @@ -51,7 +51,7 @@ public class SealOfPrimordium extends CardImpl { // Sacrifice Seal of Primordium: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SeedSpark.java b/Mage.Sets/src/mage/cards/s/SeedSpark.java index a42b3b4a34..ca5feb0038 100644 --- a/Mage.Sets/src/mage/cards/s/SeedSpark.java +++ b/Mage.Sets/src/mage/cards/s/SeedSpark.java @@ -51,7 +51,7 @@ public class SeedSpark extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); //If {G} was spent to cast Seed Spark, create two 1/1 green Saproling creature tokens. diff --git a/Mage.Sets/src/mage/cards/s/SliceInTwain.java b/Mage.Sets/src/mage/cards/s/SliceInTwain.java index 1c01b61ab2..5f487a7385 100644 --- a/Mage.Sets/src/mage/cards/s/SliceInTwain.java +++ b/Mage.Sets/src/mage/cards/s/SliceInTwain.java @@ -47,7 +47,7 @@ public class SliceInTwain extends CardImpl { this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public SliceInTwain(final SliceInTwain card) { diff --git a/Mage.Sets/src/mage/cards/s/SolemnOffering.java b/Mage.Sets/src/mage/cards/s/SolemnOffering.java index e936622b66..7c82e4ceb9 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnOffering.java +++ b/Mage.Sets/src/mage/cards/s/SolemnOffering.java @@ -47,7 +47,7 @@ public class SolemnOffering extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}"); // Destroy target artifact or enchantment. You gain 4 life. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/SpringsageRitual.java b/Mage.Sets/src/mage/cards/s/SpringsageRitual.java index 8968858461..a32b24b889 100644 --- a/Mage.Sets/src/mage/cards/s/SpringsageRitual.java +++ b/Mage.Sets/src/mage/cards/s/SpringsageRitual.java @@ -47,7 +47,7 @@ public class SpringsageRitual extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}"); // Destroy target artifact or enchantment. You gain 4 life. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/SternProctor.java b/Mage.Sets/src/mage/cards/s/SternProctor.java index 203ccc3d04..8f886f44f8 100644 --- a/Mage.Sets/src/mage/cards/s/SternProctor.java +++ b/Mage.Sets/src/mage/cards/s/SternProctor.java @@ -56,7 +56,7 @@ public class SternProctor extends CardImpl { // When Stern Proctor enters the battlefield, return target artifact or enchantment to its owner's hand. Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); - TargetPermanent target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); + TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SultaiCharm.java b/Mage.Sets/src/mage/cards/s/SultaiCharm.java index a7a09b0b61..ba6b992aa3 100644 --- a/Mage.Sets/src/mage/cards/s/SultaiCharm.java +++ b/Mage.Sets/src/mage/cards/s/SultaiCharm.java @@ -65,7 +65,7 @@ public class SultaiCharm extends CardImpl { // * Destroy target artifact or enchantment. Mode mode = new Mode(); mode.getEffects().add(new DestroyTargetEffect()); - mode.getTargets().add(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + mode.getTargets().add(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addMode(mode); // * Draw two cards, then discard a card. diff --git a/Mage.Sets/src/mage/cards/s/SunderingGrowth.java b/Mage.Sets/src/mage/cards/s/SunderingGrowth.java index acbf893398..1eb7506b1e 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingGrowth.java +++ b/Mage.Sets/src/mage/cards/s/SunderingGrowth.java @@ -49,7 +49,7 @@ public class SunderingGrowth extends CardImpl { // Destroy target artifact or enchantment, then populate. // (Create a token that's a copy of a creature token you control.) - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addEffect(new PopulateEffect("then")); } diff --git a/Mage.Sets/src/mage/cards/s/SunderingVitae.java b/Mage.Sets/src/mage/cards/s/SunderingVitae.java index 42d29173b0..33b894267b 100644 --- a/Mage.Sets/src/mage/cards/s/SunderingVitae.java +++ b/Mage.Sets/src/mage/cards/s/SunderingVitae.java @@ -49,7 +49,7 @@ public class SunderingVitae extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/s/SylvokReplica.java b/Mage.Sets/src/mage/cards/s/SylvokReplica.java index 545355c42a..52b0661e1d 100644 --- a/Mage.Sets/src/mage/cards/s/SylvokReplica.java +++ b/Mage.Sets/src/mage/cards/s/SylvokReplica.java @@ -58,7 +58,7 @@ public class SylvokReplica extends CardImpl { // {G}, Sacrifice Sylvok Replica: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TerashisGrasp.java b/Mage.Sets/src/mage/cards/t/TerashisGrasp.java index 86684e5e56..1e81f3eea9 100644 --- a/Mage.Sets/src/mage/cards/t/TerashisGrasp.java +++ b/Mage.Sets/src/mage/cards/t/TerashisGrasp.java @@ -54,7 +54,7 @@ public class TerashisGrasp extends CardImpl { this.subtype.add(SubType.ARCANE); // Destroy target artifact or enchantment. - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); // You gain life equal to its converted mana cost. this.getSpellAbility().addEffect(new TerashisGraspEffect()); diff --git a/Mage.Sets/src/mage/cards/t/ThrashingBrontodon.java b/Mage.Sets/src/mage/cards/t/ThrashingBrontodon.java index d57021ab85..f8f27a0bf8 100644 --- a/Mage.Sets/src/mage/cards/t/ThrashingBrontodon.java +++ b/Mage.Sets/src/mage/cards/t/ThrashingBrontodon.java @@ -57,7 +57,7 @@ public class ThrashingBrontodon extends CardImpl { // {1}, Sacrifice Thrashing Brontodon: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UnravelTheAether.java b/Mage.Sets/src/mage/cards/u/UnravelTheAether.java index 8780b61626..a033b50098 100644 --- a/Mage.Sets/src/mage/cards/u/UnravelTheAether.java +++ b/Mage.Sets/src/mage/cards/u/UnravelTheAether.java @@ -47,7 +47,7 @@ public class UnravelTheAether extends CardImpl { // Choose target artifact or enchantment. Its owner shuffles it into his or her library. this.getSpellAbility().addEffect(new ShuffleIntoLibraryTargetEffect()); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); } public UnravelTheAether(final UnravelTheAether card) { diff --git a/Mage.Sets/src/mage/cards/v/ViridianZealot.java b/Mage.Sets/src/mage/cards/v/ViridianZealot.java index 258d71d71f..05802d4762 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianZealot.java +++ b/Mage.Sets/src/mage/cards/v/ViridianZealot.java @@ -59,7 +59,7 @@ public class ViridianZealot extends CardImpl { // {1}{G}, Sacrifice Viridian Zealot: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VoraciousVampire.java b/Mage.Sets/src/mage/cards/v/VoraciousVampire.java new file mode 100644 index 0000000000..c45827d23c --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VoraciousVampire.java @@ -0,0 +1,80 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +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.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class VoraciousVampire extends CardImpl { + + public VoraciousVampire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Menace + this.addAbility(new MenaceAbility()); + + // When Voracious Vampire enters the battlefield, target Vampire you control gets +1/+1 and gains menace until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(1, 1, Duration.EndOfTurn), false); + Effect effect = new GainAbilityTargetEffect(new MenaceAbility(), Duration.EndOfTurn); + effect.setText("and gains menace"); + ability.addEffect(effect); + ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent(SubType.VAMPIRE, "Vampire you control"))); + this.addAbility(ability); + } + + public VoraciousVampire(final VoraciousVampire card) { + super(card); + } + + @Override + public VoraciousVampire copy() { + return new VoraciousVampire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WearAway.java b/Mage.Sets/src/mage/cards/w/WearAway.java index 98580f7cde..9358aa6392 100644 --- a/Mage.Sets/src/mage/cards/w/WearAway.java +++ b/Mage.Sets/src/mage/cards/w/WearAway.java @@ -51,7 +51,7 @@ public class WearAway extends CardImpl { // Destroy target artifact or enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - Target target = new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT); + Target target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT); this.getSpellAbility().addTarget(target); // Splice onto Arcane {3}{G} this.addAbility(new SpliceOntoArcaneAbility("{3}{G}")); diff --git a/Mage.Sets/src/mage/cards/w/WickerboughElder.java b/Mage.Sets/src/mage/cards/w/WickerboughElder.java index 842b8e7774..78fc4537ae 100644 --- a/Mage.Sets/src/mage/cards/w/WickerboughElder.java +++ b/Mage.Sets/src/mage/cards/w/WickerboughElder.java @@ -65,7 +65,7 @@ public class WickerboughElder extends CardImpl { // {G}, Remove a -1/-1 counter from Wickerbough Elder: Destroy target artifact or enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ColoredManaCost(ColoredManaSymbol.G)); ability.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(1))); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java b/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java new file mode 100644 index 0000000000..be6bccf875 --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java @@ -0,0 +1,107 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.z; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.CastFromEverywhereSourceCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.UntapAllLandsControllerEffect; +import mage.abilities.keyword.ReachAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ZacamaPrimalCalamity extends CardImpl { + + public ZacamaPrimalCalamity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{G}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // When Zacama, Primal Calamity enters the battlefield, if you cast it, untap all lands you control. + this.addAbility(new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new UntapAllLandsControllerEffect(), false), + CastFromEverywhereSourceCondition.instance, + "When {this} enters the battlefield, if you cast it, untap all lands you control.")); + + // {2}{R}: Zacama deals 3 damage to target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl<>("{2}{R}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {2}{G}: Destroy target artifact or enchantment. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{2}{G}")); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); + this.addAbility(ability); + + // {2}{W}: You gain 3 life. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new ManaCostsImpl<>("{2}{W}"))); + } + + public ZacamaPrimalCalamity(final ZacamaPrimalCalamity card) { + super(card); + } + + @Override + public ZacamaPrimalCalamity copy() { + return new ZacamaPrimalCalamity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 9845b6e991..dcb40eecd9 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -180,6 +180,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Vampire Revenant", 89, Rarity.COMMON, mage.cards.v.VampireRevenant.class)); cards.add(new SetCardInfo("Vault of Catlacan", 173, Rarity.RARE, mage.cards.v.VaultOfCatlacan.class)); cards.add(new SetCardInfo("Vona's Hunger", 90, Rarity.RARE, mage.cards.v.VonasHunger.class)); + cards.add(new SetCardInfo("Voracious Vampire", 91, Rarity.COMMON, mage.cards.v.VoraciousVampire.class)); 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)); @@ -189,6 +190,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Winged Temple of Orazca", 158, Rarity.RARE, mage.cards.w.WingedTempleOfOrazca.class)); cards.add(new SetCardInfo("Woodland Stream", 191, Rarity.UNCOMMON, mage.cards.w.WoodlandStream.class)); cards.add(new SetCardInfo("World Shaper", 151, Rarity.RARE, mage.cards.w.WorldShaper.class)); + cards.add(new SetCardInfo("Zacama, Primal Calamity", 174, Rarity.MYTHIC, mage.cards.z.ZacamaPrimalCalamity.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/CastFromEverywhereSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CastFromEverywhereSourceCondition.java new file mode 100644 index 0000000000..1f6882a8b5 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/CastFromEverywhereSourceCondition.java @@ -0,0 +1,49 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; + +/** + * + * @author LevelX2 + */ +public enum CastFromEverywhereSourceCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentEntering(source.getSourceId()); + int zccDiff = 0; + if (permanent == null) { + permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); // can be alredy again removed from battlefield so also check LKI + zccDiff = -1; + } + if (permanent != null) { + // check that the spell is still in the LKI + Spell spell = game.getStack().getSpell(source.getSourceId()); + if (spell == null || spell.getZoneChangeCounter(game) != permanent.getZoneChangeCounter(game) + zccDiff) { + if (game.getLastKnownInformation(source.getSourceId(), Zone.STACK, permanent.getZoneChangeCounter(game) + zccDiff) == null) { + return false; + } + } + return true; + } + return false; + } + + @Override + public String toString() { + return "you cast it"; + } + +} diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 9f443504d7..bd11aa94fe 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -26,7 +26,7 @@ import mage.filter.predicate.permanent.TokenPredicate; public final class StaticFilters { public static final FilterSpiritOrArcaneCard SPIRIT_OR_ARCANE_CARD = new FilterSpiritOrArcaneCard(); - public static final FilterArtifactOrEnchantmentPermanent ARTIFACT_OR_ENCHANTMENT_PERMANENT = new FilterArtifactOrEnchantmentPermanent(); + public static final FilterEnchantmentPermanent FILTER_ENCHANTMENT_PERMANENT = new FilterEnchantmentPermanent(); public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard(); @@ -37,6 +37,7 @@ public final class StaticFilters { public static final FilterNonlandCard FILTER_CARD_A_NON_LAND = new FilterNonlandCard("a nonland card"); public static final FilterPermanent FILTER_PERMANENT = new FilterPermanent(); + public static final FilterArtifactOrEnchantmentPermanent FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT = new FilterArtifactOrEnchantmentPermanent(); public static final FilterCreaturePermanent FILTER_ARTIFACT_CREATURE_PERMANENT = new FilterArtifactCreaturePermanent(); public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature"); public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_CREATURE_OR_ENCHANTMENT = new FilterPermanent("artifact, creature, or enchantment"); From 488622662ad10d62420578b04834e4f005f6d714 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 17:24:00 +0100 Subject: [PATCH 30/51] [RIX] Added Profane Procession, Tomb of the Dusk Rose, Twilight Prophet. --- .../src/mage/cards/p/ProfaneProcession.java | 115 ++++++++++++++++ .../src/mage/cards/t/TombOfTheDuskRose.java | 125 +++++++++++++++++ .../src/mage/cards/t/TwilightProphet.java | 129 ++++++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 4 + .../main/java/mage/filter/StaticFilters.java | 1 + 5 files changed, 374 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/ProfaneProcession.java create mode 100644 Mage.Sets/src/mage/cards/t/TombOfTheDuskRose.java create mode 100644 Mage.Sets/src/mage/cards/t/TwilightProphet.java diff --git a/Mage.Sets/src/mage/cards/p/ProfaneProcession.java b/Mage.Sets/src/mage/cards/p/ProfaneProcession.java new file mode 100644 index 0000000000..be2b250fcf --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/ProfaneProcession.java @@ -0,0 +1,115 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.p; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.t.TombOfTheDuskRose; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class ProfaneProcession extends CardImpl { + + public ProfaneProcession(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + + this.transformable = true; + this.secondSideCardClazz = TombOfTheDuskRose.class; + + // {3}{W}{B}: Exile target creature. Then if there are three or more cards exiled with Profane Procession, transform it. + this.addAbility(new TransformAbility()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ProfaneProcessionEffect(), new ManaCostsImpl<>("{3}{W}{B}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ProfaneProcession(final ProfaneProcession card) { + super(card); + } + + @Override + public ProfaneProcession copy() { + return new ProfaneProcession(this); + } +} + +class ProfaneProcessionEffect extends OneShotEffect { + + public ProfaneProcessionEffect() { + super(Outcome.Exile); + this.staticText = "Exile target creature. Then if there are three or more cards exiled with {this}, transform it."; + } + + public ProfaneProcessionEffect(final ProfaneProcessionEffect effect) { + super(effect); + } + + @Override + public ProfaneProcessionEffect copy() { + return new ProfaneProcessionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + UUID exileId = CardUtil.getCardExileZoneId(game, source); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && exileId != null && sourceObject != null) { + new ExileTargetEffect(exileId, sourceObject.getIdName()).setTargetPointer(targetPointer).apply(game, source); + game.applyEffects(); + ExileZone exileZone = game.getExile().getExileZone(exileId); + if (exileZone.size() > 2) { + new TransformSourceEffect(true).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TombOfTheDuskRose.java b/Mage.Sets/src/mage/cards/t/TombOfTheDuskRose.java new file mode 100644 index 0000000000..ea4ca583c8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TombOfTheDuskRose.java @@ -0,0 +1,125 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageObject; +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.OneShotEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class TombOfTheDuskRose extends CardImpl { + + public TombOfTheDuskRose(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + this.nightCard = true; + + // (Transforms from Profane Procession.) + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new InfoEffect("(Transforms from Profane Procession.)")).setRuleAtTheTop(true)); + + // {T}: Add one mana of any color to your mana pool. + this.addAbility(new AnyColorManaAbility()); + + // {2}{W}{B},{T} : Put a creature card exiled with this permanent onto the battlefield under your control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TombOfTheDuskRoseEffect(), new ManaCostsImpl<>("{2}{W}{B}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public TombOfTheDuskRose(final TombOfTheDuskRose card) { + super(card); + } + + @Override + public TombOfTheDuskRose copy() { + return new TombOfTheDuskRose(this); + } +} + +class TombOfTheDuskRoseEffect extends OneShotEffect { + + public TombOfTheDuskRoseEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "Put a creature card exiled with this permanent onto the battlefield under your control"; + } + + public TombOfTheDuskRoseEffect(final TombOfTheDuskRoseEffect effect) { + super(effect); + } + + @Override + public TombOfTheDuskRoseEffect copy() { + return new TombOfTheDuskRoseEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + UUID exileId = CardUtil.getCardExileZoneId(game, source); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && exileId != null && sourceObject != null) { + ExileZone exileZone = game.getExile().getExileZone(exileId); + if (exileZone != null) { + TargetCard targetCard = new TargetCard(Zone.EXILED, StaticFilters.FILTER_CARD_CREATURE); + controller.chooseTarget(outcome, exileZone, targetCard, source, game); + Card card = game.getCard(targetCard.getFirstTarget()); + if (card != null) { + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TwilightProphet.java b/Mage.Sets/src/mage/cards/t/TwilightProphet.java new file mode 100644 index 0000000000..18096b66ed --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TwilightProphet.java @@ -0,0 +1,129 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class TwilightProphet extends CardImpl { + + public TwilightProphet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Ascend + this.addAbility(new AscendAbility()); + + // 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. + this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility( + new TwilightProphetEffect(), TargetController.YOU, false), CitysBlessingCondition.instance, + "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.")); + + } + + public TwilightProphet(final TwilightProphet card) { + super(card); + } + + @Override + public TwilightProphet copy() { + return new TwilightProphet(this); + } +} + +class TwilightProphetEffect extends OneShotEffect { + + public TwilightProphetEffect() { + super(Outcome.Benefit); + this.staticText = "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."; + } + + public TwilightProphetEffect(final TwilightProphetEffect effect) { + super(effect); + } + + @Override + public TwilightProphetEffect copy() { + return new TwilightProphetEffect(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) { + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game); + controller.moveCards(card, Zone.HAND, source, game); + game.applyEffects(); + int amount = card.getConvertedManaCost(); + if (amount > 0) { + new LoseLifeOpponentsEffect(amount).apply(game, source); + controller.gainLife(amount, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index dcb40eecd9..708323a5fd 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -102,6 +102,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); + cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Hadana's Climb", 158, Rarity.RARE, mage.cards.h.HadanasClimb.class)); @@ -144,6 +145,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Plains", 192, Rarity.COMMON, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class)); cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); + cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); cards.add(new SetCardInfo("Raging Regisaur", 168, Rarity.UNCOMMON, mage.cards.r.RagingRegisaur.class)); cards.add(new SetCardInfo("Raptor Companion", 19, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); @@ -174,8 +176,10 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("The Immortal Sun", 180, Rarity.MYTHIC, mage.cards.t.TheImmortalSun.class)); cards.add(new SetCardInfo("Thrashing Brontodon", 148, Rarity.UNCOMMON, mage.cards.t.ThrashingBrontodon.class)); cards.add(new SetCardInfo("Thunderherd Migration", 149, Rarity.UNCOMMON, mage.cards.t.ThunderherdMigration.class)); + cards.add(new SetCardInfo("Tomb of the Dusk Rose", 166, Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); + cards.add(new SetCardInfo("Twilight Prophet", 88, Rarity.MYTHIC, mage.cards.t.TwilightProphet.class)); cards.add(new SetCardInfo("Vampire Champion", 198, Rarity.COMMON, mage.cards.v.VampireChampion.class)); cards.add(new SetCardInfo("Vampire Revenant", 89, Rarity.COMMON, mage.cards.v.VampireRevenant.class)); cards.add(new SetCardInfo("Vault of Catlacan", 173, Rarity.RARE, mage.cards.v.VaultOfCatlacan.class)); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index bd11aa94fe..6b6823ce81 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -31,6 +31,7 @@ public final class StaticFilters { public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard(); public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card"); + public static final FilterCreatureCard FILTER_CARD_CREATURE = new FilterCreatureCard(); public static final FilterCreatureCard FILTER_CARD_CREATURE_YOUR_GRAVEYARD = new FilterCreatureCard("creature card from your graveyard"); public static final FilterCard FILTER_CARD_LAND = new FilterLandCard(); public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard(); From 803df371f901e9da5479998e9a91a5e4d4973340 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 18:42:03 +0100 Subject: [PATCH 31/51] [RIX] Added 4 cards. --- .../src/mage/cards/a/AncientHellkite.java | 13 +- .../src/mage/cards/a/ArmageddonClock.java | 12 +- Mage.Sets/src/mage/cards/a/AshenGhoul.java | 4 +- .../src/mage/cards/t/TempleAltisaur.java | 116 ++++++++++++++++ .../src/mage/cards/t/TilonalisCrown.java | 89 ++++++++++++ .../src/mage/cards/t/TilonallisSummoner.java | 129 ++++++++++++++++++ .../src/mage/cards/t/TimestreamNavigator.java | 83 +++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 4 + .../PutSourceOnBottomOwnerLibraryCost.java | 77 +++++++++++ .../ConditionalActivatedAbility.java | 7 +- .../TilonallisSummonerElementalToken.java | 49 +++++++ 11 files changed, 569 insertions(+), 14 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/t/TempleAltisaur.java create mode 100644 Mage.Sets/src/mage/cards/t/TilonalisCrown.java create mode 100644 Mage.Sets/src/mage/cards/t/TilonallisSummoner.java create mode 100644 Mage.Sets/src/mage/cards/t/TimestreamNavigator.java create mode 100644 Mage/src/main/java/mage/abilities/costs/common/PutSourceOnBottomOwnerLibraryCost.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/TilonallisSummonerElementalToken.java diff --git a/Mage.Sets/src/mage/cards/a/AncientHellkite.java b/Mage.Sets/src/mage/cards/a/AncientHellkite.java index ce4ccc612f..cee3025526 100644 --- a/Mage.Sets/src/mage/cards/a/AncientHellkite.java +++ b/Mage.Sets/src/mage/cards/a/AncientHellkite.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -65,7 +65,10 @@ public class AncientHellkite extends CardImpl { this.power = new MageInt(6); this.toughness = new MageInt(6); + // Flying this.addAbility(FlyingAbility.getInstance()); + + // {R}: Ancient Hellkite deals 1 damage to target creature defending player controls. Activate this ability only if Ancient Hellkite is attacking. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}"), SourceAttackingCondition.instance); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/ArmageddonClock.java b/Mage.Sets/src/mage/cards/a/ArmageddonClock.java index 0f7548acca..11787c54d2 100644 --- a/Mage.Sets/src/mage/cards/a/ArmageddonClock.java +++ b/Mage.Sets/src/mage/cards/a/ArmageddonClock.java @@ -44,7 +44,6 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; - /** * * @author MarcoMarin @@ -52,19 +51,20 @@ import mage.counters.CounterType; public class ArmageddonClock extends CardImpl { public ArmageddonClock(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // At the beginning of your upkeep, put a doom counter on Armageddon Clock. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(), new StaticValue(1), true, true), TargetController.YOU, false)); // At the beginning of your draw step, Armageddon Clock deals damage equal to the number of doom counters on it to each player. this.addAbility(new BeginningOfDrawTriggeredAbility(new DamagePlayersEffect(Outcome.Damage, new CountersSourceCount(CounterType.DOOM)), TargetController.YOU, false)); // {4}: Remove a doom counter from Armageddon Clock. Any player may activate this ability but only during any upkeep step. - ActivatedAbilityImpl ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, - new RemoveCounterSourceEffect(CounterType.DOOM.createInstance()), new ManaCostsImpl("{4}"), new IsStepCondition(PhaseStep.UPKEEP, false), null); - + ActivatedAbilityImpl ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new RemoveCounterSourceEffect(CounterType.DOOM.createInstance()), new ManaCostsImpl("{4}"), new IsStepCondition(PhaseStep.UPKEEP, false), + "Remove a doom counter from {this}. Any player may activate this ability but only during any upkeep step"); + ability.setMayActivate(TargetController.ANY); this.addAbility(ability); - + } public ArmageddonClock(final ArmageddonClock card) { diff --git a/Mage.Sets/src/mage/cards/a/AshenGhoul.java b/Mage.Sets/src/mage/cards/a/AshenGhoul.java index 243529325d..4f9dfaa36d 100644 --- a/Mage.Sets/src/mage/cards/a/AshenGhoul.java +++ b/Mage.Sets/src/mage/cards/a/AshenGhoul.java @@ -34,13 +34,13 @@ import mage.abilities.condition.Condition; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.constants.SubType; import mage.abilities.keyword.HasteAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -111,6 +111,6 @@ enum AshenGhoulCondition implements Condition { @Override public String toString() { - return "three or more creature cards are above {this}"; + return "only during your upkeep and only if three or more creature cards are above {this}"; } } diff --git a/Mage.Sets/src/mage/cards/t/TempleAltisaur.java b/Mage.Sets/src/mage/cards/t/TempleAltisaur.java new file mode 100644 index 0000000000..0a73840ec8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TempleAltisaur.java @@ -0,0 +1,116 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +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.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class TempleAltisaur extends CardImpl { + + public TempleAltisaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // If a source would deal damage to another Dinosaur you control, prevent all but 1 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TempleAltisaurPreventEffect())); + } + + public TempleAltisaur(final TempleAltisaur card) { + super(card); + } + + @Override + public TempleAltisaur copy() { + return new TempleAltisaur(this); + } +} + +class TempleAltisaurPreventEffect extends PreventionEffectImpl { + + public TempleAltisaurPreventEffect() { + super(Duration.WhileOnBattlefield); + this.staticText = "If a source would deal damage to another Dinosaur you control, prevent all but 1 of that damage"; + consumable = false; + } + + public TempleAltisaurPreventEffect(TempleAltisaurPreventEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + int damage = event.getAmount(); + if (damage > 1) { + amountToPrevent = damage - 1; + preventDamageAction(event, source, game); + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGE_CREATURE) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null + && !permanent.getId().equals(source.getSourceId()) + && permanent.getControllerId().equals(source.getControllerId())) { + return super.applies(event, source, game); + } + } + return false; + } + + @Override + public TempleAltisaurPreventEffect copy() { + return new TempleAltisaurPreventEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TilonalisCrown.java b/Mage.Sets/src/mage/cards/t/TilonalisCrown.java new file mode 100644 index 0000000000..5ee365c949 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TilonalisCrown.java @@ -0,0 +1,89 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageAttachedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class TilonalisCrown extends CardImpl { + + public TilonalisCrown(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Tilonali's Crown enters the battlefield, it deals 1 damage to enchanted creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DamageAttachedEffect(1, "it") + .setText("it deals 1 damage to enchanted creature"))); + + // Enchanted creature gets +3/+0 and has trample. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 0)); + Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has trample"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public TilonalisCrown(final TilonalisCrown card) { + super(card); + } + + @Override + public TilonalisCrown copy() { + return new TilonalisCrown(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java b/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java new file mode 100644 index 0000000000..0dde60e82e --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TilonallisSummoner.java @@ -0,0 +1,129 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.AscendAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.TilonallisSummonerElementalToken; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class TilonallisSummoner extends CardImpl { + + public TilonallisSummoner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Ascend + this.addAbility(new AscendAbility()); + + // Whenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 red 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. + this.addAbility(new AttacksTriggeredAbility(new TilonallisSummonerEffect(), false)); + } + + public TilonallisSummoner(final TilonallisSummoner card) { + super(card); + } + + @Override + public TilonallisSummoner copy() { + return new TilonallisSummoner(this); + } +} + +class TilonallisSummonerEffect extends OneShotEffect { + + public TilonallisSummonerEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "you may pay {X}{R}. If you do, create X 1/1 red 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"; + } + + public TilonallisSummonerEffect(final TilonallisSummonerEffect effect) { + super(effect); + } + + @Override + public TilonallisSummonerEffect copy() { + return new TilonallisSummonerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + ManaCosts cost = new ManaCostsImpl("{X}{R}"); + if (controller.chooseUse(outcome, "Pay " + cost.getText() + "? If you do, you create X 1/1 red Elemental creature tokens that are tapped and attacking.", source, game)) { + int costX = controller.announceXMana(0, Integer.MAX_VALUE, "Announce the value for {X}", game, source); + cost.add(new GenericManaCost(costX)); + if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { + CreateTokenEffect effect = new CreateTokenEffect(new TilonallisSummonerElementalToken(), costX, true, true); + effect.apply(game, source); + if (!CitysBlessingCondition.instance.apply(game, source)) { + for (UUID tokenId : effect.getLastAddedTokenIds()) { + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(null, "", Zone.BATTLEFIELD); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect), source); + } + } + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java b/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java new file mode 100644 index 0000000000..4f29b09ada --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TimestreamNavigator.java @@ -0,0 +1,83 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.costs.common.PutSourceOnBottomOwnerLibraryCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.abilities.keyword.AscendAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class TimestreamNavigator extends CardImpl { + + public TimestreamNavigator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Ascend + this.addAbility(new AscendAbility()); + + // {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. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new AddExtraTurnControllerEffect(), + new ManaCostsImpl("{2}{U}{U}"), + CitysBlessingCondition.instance); + ability.addCost(new TapSourceCost()); + ability.addCost(new PutSourceOnBottomOwnerLibraryCost()); + this.addAbility(ability); + + } + + public TimestreamNavigator(final TimestreamNavigator card) { + super(card); + } + + @Override + public TimestreamNavigator copy() { + return new TimestreamNavigator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 708323a5fd..7ddb2215d0 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -171,11 +171,15 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 194, Rarity.COMMON, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Swift Warden", 146, Rarity.UNCOMMON, mage.cards.s.SwiftWarden.class)); cards.add(new SetCardInfo("Sworn Guardian", 58, Rarity.COMMON, mage.cards.s.SwornGuardian.class)); + cards.add(new SetCardInfo("Temple Altisaur", 28, Rarity.RARE, mage.cards.t.TempleAltisaur.class)); cards.add(new SetCardInfo("Tendershoot Dryad", 147, Rarity.RARE, mage.cards.t.TendershootDryad.class)); cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); cards.add(new SetCardInfo("The Immortal Sun", 180, Rarity.MYTHIC, mage.cards.t.TheImmortalSun.class)); cards.add(new SetCardInfo("Thrashing Brontodon", 148, Rarity.UNCOMMON, mage.cards.t.ThrashingBrontodon.class)); cards.add(new SetCardInfo("Thunderherd Migration", 149, Rarity.UNCOMMON, mage.cards.t.ThunderherdMigration.class)); + cards.add(new SetCardInfo("Tilonali's Crown", 120, Rarity.COMMON, mage.cards.t.TilonalisCrown.class)); + cards.add(new SetCardInfo("Tilonalli's Summoner", 121, Rarity.RARE, mage.cards.t.TilonallisSummoner.class)); + cards.add(new SetCardInfo("Timestream Navigator", 59, Rarity.MYTHIC, mage.cards.t.TimestreamNavigator.class)); cards.add(new SetCardInfo("Tomb of the Dusk Rose", 166, Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); diff --git a/Mage/src/main/java/mage/abilities/costs/common/PutSourceOnBottomOwnerLibraryCost.java b/Mage/src/main/java/mage/abilities/costs/common/PutSourceOnBottomOwnerLibraryCost.java new file mode 100644 index 0000000000..67bfe7f3bd --- /dev/null +++ b/Mage/src/main/java/mage/abilities/costs/common/PutSourceOnBottomOwnerLibraryCost.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.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.CostImpl; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class PutSourceOnBottomOwnerLibraryCost extends CostImpl { + + public PutSourceOnBottomOwnerLibraryCost() { + this.text = setText(); + } + + public PutSourceOnBottomOwnerLibraryCost(PutSourceOnBottomOwnerLibraryCost cost) { + super(cost); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { + Player player = game.getPlayer(controllerId); + Permanent sourcePermanent = game.getPermanent(sourceId); + if (player != null && sourcePermanent != null) { + paid = true; + player.putCardsOnBottomOfLibrary(new CardsImpl(sourcePermanent), game, ability, false); + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + return game.getPermanent(sourceId) != null; + } + + @Override + public PutSourceOnBottomOwnerLibraryCost copy() { + return new PutSourceOnBottomOwnerLibraryCost(this); + } + + private String setText() { + return "Put {this} on the bottom of its owner's library"; + } +} diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java index 5f6cc15444..b753280538 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java @@ -71,6 +71,11 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { if (ruleText != null && !ruleText.isEmpty()) { return ruleText; } - return super.getRule() + " Activate this ability only " + condition.toString() + "."; + String conditionText = condition.toString(); + String additionalText = "if "; + if (conditionText.startsWith("during")) { + additionalText = ""; + } + return super.getRule() + " Activate this ability only " + additionalText + condition.toString() + "."; } } diff --git a/Mage/src/main/java/mage/game/permanent/token/TilonallisSummonerElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/TilonallisSummonerElementalToken.java new file mode 100644 index 0000000000..bc1320f5e0 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TilonallisSummonerElementalToken.java @@ -0,0 +1,49 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com AS IS AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. + */ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class TilonallisSummonerElementalToken extends Token { + + public TilonallisSummonerElementalToken() { + super("Elemental", "1/1 red Elemental creature tokens"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ELEMENTAL); + + color.setRed(true); + power = new MageInt(1); + toughness = new MageInt(1); + } +} From 80c0107434e240a4c30fc5c72927df058896545e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 18:55:44 +0100 Subject: [PATCH 32/51] [RIX] Added 5 cards. --- .../src/mage/cards/s/SoulOfTheRapids.java | 68 ++++++++++++++ Mage.Sets/src/mage/cards/s/SpireWinder.java | 82 +++++++++++++++++ .../src/mage/cards/s/SquiresDevotion.java | 90 +++++++++++++++++++ .../src/mage/cards/s/StampedingHorncrest.java | 81 +++++++++++++++++ .../mage/cards/s/StormFleetSwashbuckler.java | 69 ++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 5 ++ 6 files changed, 395 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SoulOfTheRapids.java create mode 100644 Mage.Sets/src/mage/cards/s/SpireWinder.java create mode 100644 Mage.Sets/src/mage/cards/s/SquiresDevotion.java create mode 100644 Mage.Sets/src/mage/cards/s/StampedingHorncrest.java create mode 100644 Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java diff --git a/Mage.Sets/src/mage/cards/s/SoulOfTheRapids.java b/Mage.Sets/src/mage/cards/s/SoulOfTheRapids.java new file mode 100644 index 0000000000..9f10f1663f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SoulOfTheRapids.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author LevelX2 + */ +public class SoulOfTheRapids extends CardImpl { + + public SoulOfTheRapids(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Hexproof + this.addAbility(HexproofAbility.getInstance()); + + } + + public SoulOfTheRapids(final SoulOfTheRapids card) { + super(card); + } + + @Override + public SoulOfTheRapids copy() { + return new SoulOfTheRapids(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpireWinder.java b/Mage.Sets/src/mage/cards/s/SpireWinder.java new file mode 100644 index 0000000000..16b50978bd --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpireWinder.java @@ -0,0 +1,82 @@ +/* + * 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.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.FlyingAbility; +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 SpireWinder extends CardImpl { + + public SpireWinder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.SNAKE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Ascend + this.addAbility(new AscendAbility()); + + // Spire Winder gets +1/+1 as long as you have the city's blessing. + ContinuousEffect boostSource = new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "{this} gets +1/+1 as long as you have the city's blessing"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + this.addAbility(ability); + } + + public SpireWinder(final SpireWinder card) { + super(card); + } + + @Override + public SpireWinder copy() { + return new SpireWinder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SquiresDevotion.java b/Mage.Sets/src/mage/cards/s/SquiresDevotion.java new file mode 100644 index 0000000000..f974dd5f2b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SquiresDevotion.java @@ -0,0 +1,90 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.permanent.token.IxalanVampireToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SquiresDevotion extends CardImpl { + + public SquiresDevotion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1 and has lifelink. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has lifelink"); + ability.addEffect(effect); + this.addAbility(ability); + + // When Squire's Devotion enters the battlefield, create a 1/1 white Vampire creature token with lifelink. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new IxalanVampireToken()))); + } + + public SquiresDevotion(final SquiresDevotion card) { + super(card); + } + + @Override + public SquiresDevotion copy() { + return new SquiresDevotion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StampedingHorncrest.java b/Mage.Sets/src/mage/cards/s/StampedingHorncrest.java new file mode 100644 index 0000000000..f4e8d48c6d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StampedingHorncrest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +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.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LevelX2 + */ +public class StampedingHorncrest extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another Dinosaur"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public StampedingHorncrest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Stampeding Horncrest has haste as long as you control another Dinosaur. + Effect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(HasteAbility.getInstance()), new PermanentsOnTheBattlefieldCondition(filter), + "{this} has haste as long as you control another dinosaur"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public StampedingHorncrest(final StampedingHorncrest card) { + super(card); + } + + @Override + public StampedingHorncrest copy() { + return new StampedingHorncrest(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java new file mode 100644 index 0000000000..0ca973b15c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.StormAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author LevelX2 + */ +public class StormFleetSwashbuckler extends CardImpl { + + public StormFleetSwashbuckler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Ascend + this.addAbility(new AscendAbility()); + + // Storm Fleet Swashbuckler has double strike as long as you have the city's blessing. + this.addAbility(new StormAbility()); + + } + + public StormFleetSwashbuckler(final StormFleetSwashbuckler card) { + super(card); + } + + @Override + public StormFleetSwashbuckler copy() { + return new StormFleetSwashbuckler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 7ddb2215d0..373d55c26b 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -160,9 +160,14 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Silverclad Ferocidons", 115, Rarity.RARE, mage.cards.s.SilvercladFerocidons.class)); 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("Soul of the Rapids", 56, Rarity.COMMON, mage.cards.s.SoulOfTheRapids.class)); cards.add(new SetCardInfo("Sphinx's Decree", 24, Rarity.RARE, mage.cards.s.SphinxsDecree.class)); + cards.add(new SetCardInfo("Spire Winder", 57, Rarity.COMMON, mage.cards.s.SpireWinder.class)); + cards.add(new SetCardInfo("Squire's Devotion", 25, Rarity.COMMON, mage.cards.s.SquiresDevotion.class)); + cards.add(new SetCardInfo("Stampeding Horncrest", 116, Rarity.COMMON, mage.cards.s.StampedingHorncrest.class)); cards.add(new SetCardInfo("Stone Quarry", 190, Rarity.UNCOMMON, mage.cards.s.StoneQuarry.class)); cards.add(new SetCardInfo("Storm Fleet Sprinter", 172, Rarity.UNCOMMON, mage.cards.s.StormFleetSprinter.class)); + cards.add(new SetCardInfo("Storm Fleet Swashbuckler", 117, Rarity.UNCOMMON, mage.cards.s.StormFleetSwashbuckler.class)); cards.add(new SetCardInfo("Storm the Vault", 173, Rarity.RARE, mage.cards.s.StormTheVault.class)); cards.add(new SetCardInfo("Strength of the Pack", 145, Rarity.UNCOMMON, mage.cards.s.StrengthOfThePack.class)); cards.add(new SetCardInfo("Strider Harness", 183, Rarity.COMMON, mage.cards.s.StriderHarness.class)); From 4571ab8dce06a22f90d051e28b63795db7ce7a0c Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 21:34:15 +0100 Subject: [PATCH 33/51] [RIX] Added 5 cards. --- .../src/mage/cards/s/SiegehornCeratops.java | 68 ++++++++ Mage.Sets/src/mage/cards/s/SirenReaver.java | 77 +++++++++ .../src/mage/cards/s/SlaughterTheStrong.java | 158 ++++++++++++++++++ .../src/mage/cards/s/SlipperyScoundrel.java | 88 ++++++++++ .../src/mage/cards/s/SnubhornSentry.java | 78 +++++++++ .../mage/cards/s/StormFleetSwashbuckler.java | 20 ++- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 5 + .../cost/SpellCostReductionSourceEffect.java | 5 +- 8 files changed, 494 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/SiegehornCeratops.java create mode 100644 Mage.Sets/src/mage/cards/s/SirenReaver.java create mode 100644 Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java create mode 100644 Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java create mode 100644 Mage.Sets/src/mage/cards/s/SnubhornSentry.java diff --git a/Mage.Sets/src/mage/cards/s/SiegehornCeratops.java b/Mage.Sets/src/mage/cards/s/SiegehornCeratops.java new file mode 100644 index 0000000000..ce24a13631 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SiegehornCeratops.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class SiegehornCeratops extends CardImpl { + + public SiegehornCeratops(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Enrage — Whenever Siegehorn Ceratops is dealt damage, put two +1/+1 counters on it. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)) + .setText("put two +1/+1 counter on it"), false, true)); + } + + public SiegehornCeratops(final SiegehornCeratops card) { + super(card); + } + + @Override + public SiegehornCeratops copy() { + return new SiegehornCeratops(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SirenReaver.java b/Mage.Sets/src/mage/cards/s/SirenReaver.java new file mode 100644 index 0000000000..f8df0f59e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SirenReaver.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.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SirenReaver extends CardImpl { + + public SirenReaver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.SIREN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Raid — Siren Reaver costs {1} less to cast if you attacked with a creature this turn. + Ability ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(1, RaidCondition.instance)); + ability.setAbilityWord(AbilityWord.RAID); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + } + + public SirenReaver(final SirenReaver card) { + super(card); + } + + @Override + public SirenReaver copy() { + return new SirenReaver(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java b/Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java new file mode 100644 index 0000000000..98bde8bf21 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlaughterTheStrong.java @@ -0,0 +1,158 @@ +/* + * 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.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class SlaughterTheStrong extends CardImpl { + + public SlaughterTheStrong(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}{W}"); + + // 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. + this.getSpellAbility().addEffect(new SlaughterTheStrongEffect()); + } + + public SlaughterTheStrong(final SlaughterTheStrong card) { + super(card); + } + + @Override + public SlaughterTheStrong copy() { + return new SlaughterTheStrong(this); + } +} + +class SlaughterTheStrongEffect extends OneShotEffect { + + public SlaughterTheStrongEffect() { + super(Outcome.Benefit); + this.staticText = "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"; + } + + public SlaughterTheStrongEffect(final SlaughterTheStrongEffect effect) { + super(effect); + } + + @Override + public SlaughterTheStrongEffect copy() { + return new SlaughterTheStrongEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + boolean selectionDone = false; + Set selectedCreatures = new HashSet<>(); + while (selectionDone == false && player.isInGame()) { + int powerSum = 0; + for (UUID creatureId : selectedCreatures) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + powerSum += creature.getPower().getValue(); + } + } + FilterControlledCreaturePermanent currentFilter + = new FilterControlledCreaturePermanent("any number of creatures you control with total power 4 or less (already selected total power " + powerSum + ")"); + Set alreadySelectedCreatures = new HashSet<>(); + if (!selectedCreatures.isEmpty()) { + for (UUID creatureId : selectedCreatures) { + alreadySelectedCreatures.add(new PermanentIdPredicate(creatureId)); + } + currentFilter.add(Predicates.or(new PowerPredicate(ComparisonType.FEWER_THAN, 5 - powerSum), + Predicates.or(alreadySelectedCreatures))); + } else { + currentFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 5 - powerSum)); + } + Target target = new TargetPermanent(0, 1, currentFilter, true); + controller.chooseTarget(Outcome.BoostCreature, target, source, game); + if (target.getFirstTarget() != null) { + if (selectedCreatures.contains(target.getFirstTarget())) { + selectedCreatures.remove(target.getFirstTarget()); + } else { + selectedCreatures.add(target.getFirstTarget()); + } + } else { + if (player.isHuman()) { + String selected = "Selected: "; + for (UUID creatureId : selectedCreatures) { + Permanent creature = game.getPermanent(creatureId); + if (creature != null) { + selected += creature.getLogName() + " "; + } + } + selectionDone = player.chooseUse(Outcome.Detriment, + "Creature selection", + selected, + "End the selection", + "Continue the selection", source, game); + } else { + selectionDone = true; + } + } + } + for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game)) { + if (!selectedCreatures.contains(creature.getId())) { + creature.sacrifice(source.getSourceId(), game); + } + } + } + } + return true; + } + + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java b/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java new file mode 100644 index 0000000000..1497c45a7b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlipperyScoundrel.java @@ -0,0 +1,88 @@ +/* + * 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.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalRestrictionEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.HexproofAbility; +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 SlipperyScoundrel extends CardImpl { + + public SlipperyScoundrel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Ascend + this.addAbility(new AscendAbility()); + + // As long as you have the city's blessing Slippery Scoundrel has Hexproof and can't be blocked. + ContinuousEffect boostSource = new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "As long as you have the city's blessing {this} has Hexproof"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + RestrictionEffect restrictionEffect = new CantBeBlockedSourceEffect(Duration.WhileOnBattlefield); + Effect effect2 = new ConditionalRestrictionEffect(restrictionEffect, CitysBlessingCondition.instance) + .setText("and can't be blocked"); + ability.addEffect(effect2); + this.addAbility(ability); + } + + public SlipperyScoundrel(final SlipperyScoundrel card) { + super(card); + } + + @Override + public SlipperyScoundrel copy() { + return new SlipperyScoundrel(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SnubhornSentry.java b/Mage.Sets/src/mage/cards/s/SnubhornSentry.java new file mode 100644 index 0000000000..e1ba014e8b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SnubhornSentry.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.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +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 SnubhornSentry extends CardImpl { + + public SnubhornSentry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) + this.addAbility(new AscendAbility()); + + // Snubhorn Sentry gets +3/+0 as long as you have the city's blessing. + ContinuousEffect boostSource = new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "{this} gets +3/+0 as long as you have the city's blessing"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + this.addAbility(ability); + } + + public SnubhornSentry(final SnubhornSentry card) { + super(card); + } + + @Override + public SnubhornSentry copy() { + return new SnubhornSentry(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java index 0ca973b15c..e3772f0616 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetSwashbuckler.java @@ -29,12 +29,20 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.constants.SubType; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.AscendAbility; -import mage.abilities.keyword.StormAbility; +import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; /** * @@ -44,7 +52,7 @@ public class StormFleetSwashbuckler extends CardImpl { public StormFleetSwashbuckler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - + this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.PIRATE); this.power = new MageInt(2); @@ -54,7 +62,11 @@ public class StormFleetSwashbuckler extends CardImpl { this.addAbility(new AscendAbility()); // Storm Fleet Swashbuckler has double strike as long as you have the city's blessing. - this.addAbility(new StormAbility()); + ContinuousEffect boostSource = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield); + ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, CitysBlessingCondition.instance, + "{this} has double strike as long as you have the city's blessing"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 373d55c26b..11c1e127f0 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -156,10 +156,15 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Secrets of the Golden City", 52, Rarity.COMMON, mage.cards.s.SecretsOfTheGoldenCity.class)); cards.add(new SetCardInfo("Shake the Foundations", 113, Rarity.UNCOMMON, mage.cards.s.ShakeTheFoundations.class)); cards.add(new SetCardInfo("Shatter", 114, Rarity.COMMON, mage.cards.s.Shatter.class)); + cards.add(new SetCardInfo("Siegehorn Ceratops", 171, Rarity.RARE, mage.cards.s.SiegehornCeratops.class)); cards.add(new SetCardInfo("Silent Gravestone", 182, Rarity.RARE, mage.cards.s.SilentGravestone.class)); cards.add(new SetCardInfo("Silverclad Ferocidons", 115, Rarity.RARE, mage.cards.s.SilvercladFerocidons.class)); cards.add(new SetCardInfo("Silvergill Adept", 53, Rarity.UNCOMMON, mage.cards.s.SilvergillAdept.class)); + cards.add(new SetCardInfo("Siren Reaver", 54, Rarity.UNCOMMON, mage.cards.s.SirenReaver.class)); cards.add(new SetCardInfo("Skymarcher Aspirant", 21, Rarity.UNCOMMON, mage.cards.s.SkymarcherAspirant.class)); + cards.add(new SetCardInfo("Slaughter the Strong", 22, Rarity.RARE, mage.cards.s.SlaughterTheStrong.class)); + cards.add(new SetCardInfo("Slippery Scoundrel", 55, Rarity.UNCOMMON, mage.cards.s.SlipperyScoundrel.class)); + cards.add(new SetCardInfo("Snubhorn Sentry", 23, Rarity.COMMON, mage.cards.s.SnubhornSentry.class)); cards.add(new SetCardInfo("Soul of the Rapids", 56, Rarity.COMMON, mage.cards.s.SoulOfTheRapids.class)); cards.add(new SetCardInfo("Sphinx's Decree", 24, Rarity.RARE, mage.cards.s.SphinxsDecree.class)); cards.add(new SetCardInfo("Spire Winder", 57, Rarity.COMMON, mage.cards.s.SpireWinder.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java index 194475bacb..8ad8c34717 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellCostReductionSourceEffect.java @@ -68,7 +68,10 @@ public class SpellCostReductionSourceEffect extends CostModificationEffectImpl { this.amount = amount; this.condition = condition; StringBuilder sb = new StringBuilder(); - sb.append("{this} costs {").append(amount).append("} less to cast if ").append(this.condition.toString()); + sb.append("{this} costs {") + .append(amount).append("} less to cast ") + .append((this.condition.toString().startsWith("if ") ? "" : "if ")) + .append(this.condition.toString()); this.staticText = sb.toString(); } From b4f9cbd15cee846e9b4557ff4a92c63fa6e8704f Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 22:35:39 +0100 Subject: [PATCH 34/51] [RIX] Added 5 cards. --- Mage.Sets/src/mage/cards/a/AzorsGateway.java | 131 ++++++++++++++++++ .../src/mage/cards/s/SadisticSkymarcher.java | 86 ++++++++++++ .../src/mage/cards/s/SanctumOfTheSun.java | 74 ++++++++++ .../src/mage/cards/s/SanguineGlorifier.java | 80 +++++++++++ Mage.Sets/src/mage/cards/s/SeaLegs.java | 88 ++++++++++++ Mage.Sets/src/mage/cards/s/SeeRed.java | 96 +++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 6 + .../ControllerAttackedThisTurnCondition.java | 47 +++++++ 8 files changed, 608 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AzorsGateway.java create mode 100644 Mage.Sets/src/mage/cards/s/SadisticSkymarcher.java create mode 100644 Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java create mode 100644 Mage.Sets/src/mage/cards/s/SanguineGlorifier.java create mode 100644 Mage.Sets/src/mage/cards/s/SeaLegs.java create mode 100644 Mage.Sets/src/mage/cards/s/SeeRed.java create mode 100644 Mage/src/main/java/mage/abilities/condition/common/ControllerAttackedThisTurnCondition.java diff --git a/Mage.Sets/src/mage/cards/a/AzorsGateway.java b/Mage.Sets/src/mage/cards/a/AzorsGateway.java new file mode 100644 index 0000000000..06c77b6095 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AzorsGateway.java @@ -0,0 +1,131 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.a; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.s.SanctumOfTheSun; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class AzorsGateway extends CardImpl { + + public AzorsGateway(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.addSuperType(SuperType.LEGENDARY); + this.transformable = true; + this.secondSideCardClazz = SanctumOfTheSun.class; + + // {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. + this.addAbility(new TransformAbility()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AzorsGatewayEffect(), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public AzorsGateway(final AzorsGateway card) { + super(card); + } + + @Override + public AzorsGateway copy() { + return new AzorsGateway(this); + } +} + +class AzorsGatewayEffect extends OneShotEffect { + + public AzorsGatewayEffect() { + super(Outcome.Benefit); + this.staticText = "Draw a card, then exile a card from your hand. If cards with five or more different converted mana costs are exiled with {this}, you gain 5 life, untap Azor's Gateway, and transform it"; + } + + public AzorsGatewayEffect(final AzorsGatewayEffect effect) { + super(effect); + } + + @Override + public AzorsGatewayEffect copy() { + return new AzorsGatewayEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + UUID exileId = CardUtil.getCardExileZoneId(game, source); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && exileId != null && sourceObject != null) { + controller.drawCards(1, game); + TargetCardInHand target = new TargetCardInHand(); + controller.choose(outcome, target, source.getSourceId(), game); + Card cardToExile = game.getCard(target.getFirstTarget()); + if (cardToExile != null) { + controller.moveCardsToExile(cardToExile, source, game, true, exileId, sourceObject.getIdName()); + } + Set usedCMC = new HashSet<>(); + ExileZone exileZone = game.getExile().getExileZone(exileId); + if (exileZone != null) { + for (Card card : exileZone.getCards(game)) { + usedCMC.add(card.getConvertedManaCost()); + } + if (usedCMC.size() > 4) { + controller.gainLife(4, game); + new UntapSourceEffect().apply(game, source); + new TransformSourceEffect(true).apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SadisticSkymarcher.java b/Mage.Sets/src/mage/cards/s/SadisticSkymarcher.java new file mode 100644 index 0000000000..db3061dac9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SadisticSkymarcher.java @@ -0,0 +1,86 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInHand; + +/** + * + * @author LevelX2 + */ +public class SadisticSkymarcher extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Vampire card from your hand"); + + static { + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + } + + public SadisticSkymarcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // As an additional cost to cast Sadistic Skymarcher, reveal a Vampire card from your hand or pay {1}. + this.getSpellAbility().addCost(new OrCost( + new RevealTargetFromHandCost(new TargetCardInHand(filter)), + new GenericManaCost(1), + "reveal a Vampire card from your hand or pay {1}")); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + } + + public SadisticSkymarcher(final SadisticSkymarcher card) { + super(card); + } + + @Override + public SadisticSkymarcher copy() { + return new SadisticSkymarcher(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java b/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java new file mode 100644 index 0000000000..847d1fc0f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SanctumOfTheSun.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.ControllerLifeCount; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.mana.DynamicManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class SanctumOfTheSun extends CardImpl { + + public SanctumOfTheSun(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + + this.nightCard = true; + + // (Transforms from Azor's Gateway.) + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new InfoEffect("(Transforms from Azor's Gateway.)")).setRuleAtTheTop(true)); + + // {T}: Add X mana of any one color to your mana pool, where X is your life total. + this.addAbility(new DynamicManaAbility(new Mana(0, 0, 0, 0, 0, 0, 1, 0), new ControllerLifeCount(), new TapSourceCost(), + "Add X mana of any one color to your mana pool, where X is is your life total", true)); + + } + + public SanctumOfTheSun(final SanctumOfTheSun card) { + super(card); + } + + @Override + public SanctumOfTheSun copy() { + return new SanctumOfTheSun(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SanguineGlorifier.java b/Mage.Sets/src/mage/cards/s/SanguineGlorifier.java new file mode 100644 index 0000000000..4f3297b807 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SanguineGlorifier.java @@ -0,0 +1,80 @@ +/* + * 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.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class SanguineGlorifier extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another target Vampire you control"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + } + + public SanguineGlorifier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Sanguine Glorifier enters the battlefield, put a +1/+1 counter on another target Vampire you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false); + ability.addTarget(new TargetControlledPermanent(filter)); + this.addAbility(ability); + } + + public SanguineGlorifier(final SanguineGlorifier card) { + super(card); + } + + @Override + public SanguineGlorifier copy() { + return new SanguineGlorifier(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeaLegs.java b/Mage.Sets/src/mage/cards/s/SeaLegs.java new file mode 100644 index 0000000000..c825ebe4d9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeaLegs.java @@ -0,0 +1,88 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EnchantedCreatureSubtypeCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SeaLegs extends CardImpl { + + public SeaLegs(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + this.subtype.add(SubType.AURA); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +0/+2 as long as it's a Pirate. Otherwise, it gets -2/-0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostEnchantedEffect(0, 2), + new BoostEnchantedEffect(-2, -0), + new EnchantedCreatureSubtypeCondition(SubType.PIRATE), + "Enchanted creature gets +0/+2 as long as it's a Pirate. Otherwise, it gets -2/-0.") + ) + ); + } + + public SeaLegs(final SeaLegs card) { + super(card); + } + + @Override + public SeaLegs copy() { + return new SeaLegs(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeeRed.java b/Mage.Sets/src/mage/cards/s/SeeRed.java new file mode 100644 index 0000000000..8c827575e1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeeRed.java @@ -0,0 +1,96 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.ControllerAttackedThisTurnCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SeeRed extends CardImpl { + + public SeeRed(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +2/+1 and has first strike. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has first strike"); + ability.addEffect(effect); + this.addAbility(ability); + + // At the beginning of your end step, if you didn't attack with a creature this turn, sacrifice See Red. + this.addAbility(new ConditionalTriggeredAbility( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU), + new InvertCondition(ControllerAttackedThisTurnCondition.instance), + "At the beginning of your end step, if you didn't attack with a creature this turn, sacrifice {this}.")); + } + + public SeeRed(final SeeRed card) { + super(card); + } + + @Override + public SeeRed copy() { + return new SeeRed(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 11c1e127f0..aa95a263ee 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -64,6 +64,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Arterial Flow", 62, Rarity.UNCOMMON, mage.cards.a.ArterialFlow.class)); cards.add(new SetCardInfo("Atzal, Cave of Eternity", 160, Rarity.RARE, mage.cards.a.AtzalCaveOfEternity.class)); cards.add(new SetCardInfo("Atzocan Seer", 153, Rarity.UNCOMMON, mage.cards.a.AtzocanSeer.class)); + cards.add(new SetCardInfo("Azor's Gateway", 176, Rarity.MYTHIC, mage.cards.a.AzorsGateway.class)); cards.add(new SetCardInfo("Baffling End", 1, Rarity.UNCOMMON, mage.cards.b.BafflingEnd.class)); cards.add(new SetCardInfo("Bombard", 93, Rarity.COMMON, mage.cards.b.Bombard.class)); cards.add(new SetCardInfo("Brass's Bounty", 94, Rarity.RARE, mage.cards.b.BrasssBounty.class)); @@ -151,9 +152,14 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); cards.add(new SetCardInfo("Reaver Ambush", 83, Rarity.UNCOMMON, mage.cards.r.ReaverAmbush.class)); cards.add(new SetCardInfo("Recover", 84, Rarity.COMMON, mage.cards.r.Recover.class)); + cards.add(new SetCardInfo("Sadistic Skymarcher", 85, Rarity.UNCOMMON, mage.cards.s.SadisticSkymarcher.class)); cards.add(new SetCardInfo("Sailor of Means", 49, Rarity.COMMON, mage.cards.s.SailorOfMeans.class)); + cards.add(new SetCardInfo("Sanctum of the Sun", 176, Rarity.MYTHIC, mage.cards.s.SanctumOfTheSun.class)); + cards.add(new SetCardInfo("Sanguine Glorifier", 20, Rarity.COMMON, mage.cards.s.SanguineGlorifier.class)); + cards.add(new SetCardInfo("Sea Legs", 50, Rarity.COMMON, mage.cards.s.SeaLegs.class)); cards.add(new SetCardInfo("Seafloor Oracle", 51, Rarity.RARE, mage.cards.s.SeafloorOracle.class)); cards.add(new SetCardInfo("Secrets of the Golden City", 52, Rarity.COMMON, mage.cards.s.SecretsOfTheGoldenCity.class)); + cards.add(new SetCardInfo("See Red", 112, Rarity.UNCOMMON, mage.cards.s.SeeRed.class)); cards.add(new SetCardInfo("Shake the Foundations", 113, Rarity.UNCOMMON, mage.cards.s.ShakeTheFoundations.class)); cards.add(new SetCardInfo("Shatter", 114, Rarity.COMMON, mage.cards.s.Shatter.class)); cards.add(new SetCardInfo("Siegehorn Ceratops", 171, Rarity.RARE, mage.cards.s.SiegehornCeratops.class)); diff --git a/Mage/src/main/java/mage/abilities/condition/common/ControllerAttackedThisTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/ControllerAttackedThisTurnCondition.java new file mode 100644 index 0000000000..7cdae69c7a --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/ControllerAttackedThisTurnCondition.java @@ -0,0 +1,47 @@ +/* + * 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.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.watchers.common.AttackedThisTurnWatcher; + +/** + * + * @author LevelX2 + */ +public enum ControllerAttackedThisTurnCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName()); + return source.getControllerId().equals(game.getActivePlayerId()) && watcher != null && !watcher.getAttackedThisTurnCreatures().isEmpty(); + } +} From 5437c0ef2aee41ce013bd8706ad148f384805221 Mon Sep 17 00:00:00 2001 From: Will Hall Date: Sat, 6 Jan 2018 13:53:21 -0800 Subject: [PATCH 35/51] Implemented Daring Buccaneer. --- .../src/mage/cards/d/DaringBuccaneer.java | 77 +++++++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 1 + 2 files changed, 78 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DaringBuccaneer.java diff --git a/Mage.Sets/src/mage/cards/d/DaringBuccaneer.java b/Mage.Sets/src/mage/cards/d/DaringBuccaneer.java new file mode 100644 index 0000000000..5c3bdfd3bc --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DaringBuccaneer.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.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInHand; + +/** + * + * @author Will + */ +public class DaringBuccaneer extends CardImpl { + + private static final FilterCard filter = new FilterCard("a Pirate card from your hand"); + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + } + + public DaringBuccaneer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + this.subtype.add(SubType.PIRATE); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // As an additional cost to cast Daring Buccaneer, reveal a Pirate card from your hand or pay {2}. + this.getSpellAbility().addCost(new OrCost( + new RevealTargetFromHandCost(new TargetCardInHand(filter)), + new GenericManaCost(2), + "reveal a Pirate card from your hand or pay {2}")); + + } + + public DaringBuccaneer(final DaringBuccaneer card) { + super(card); + } + + @Override + public DaringBuccaneer copy() { + return new DaringBuccaneer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index aa95a263ee..265ba1b491 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -76,6 +76,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.COMMON, mage.cards.c.CinderBarrens.class)); cards.add(new SetCardInfo("Colossal Dreadmaw", 125, Rarity.COMMON, mage.cards.c.ColossalDreadmaw.class)); cards.add(new SetCardInfo("Crested Herdcaller", 126, Rarity.UNCOMMON, mage.cards.c.CrestedHerdcaller.class)); + cards.add(new SetCardInfo("Daring Buccaneer", 98, Rarity.UNCOMMON, mage.cards.d.DaringBuccaneer.class)); cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); cards.add(new SetCardInfo("Dire Fleet Daredevil", 99, Rarity.RARE, mage.cards.d.DireFleetDaredevil.class)); cards.add(new SetCardInfo("Dire Fleet Neckbreaker", 156, Rarity.UNCOMMON, mage.cards.d.DireFleetNeckbreaker.class)); From 59352218781d8118a05c77ffb4eb08ae16c178e9 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 6 Jan 2018 23:47:54 +0100 Subject: [PATCH 36/51] [RIX] Added 6 cards. --- Mage.Sets/src/mage/cards/b/Brainstorm.java | 3 +- .../src/mage/cards/r/RekindlingPhoenix.java | 69 ++++++++ .../src/mage/cards/r/RelentlessRaptor.java | 74 +++++++++ .../src/mage/cards/r/ResplendentGriffin.java | 77 +++++++++ .../src/mage/cards/r/ReturnToTheWind.java | 152 ++++++++++++++++++ Mage.Sets/src/mage/cards/r/RiverDarter.java | 68 ++++++++ .../src/mage/cards/r/RiverwiseAugur.java | 65 ++++++++ .../src/mage/cards/s/StromkirkNoble.java | 14 +- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 6 + .../effects/common/BrainstormEffect.java | 2 +- .../combat/BlocksIfAbleSourceEffect.java | 18 +-- .../token/RekindlingPhoenixToken.java | 68 ++++++++ 12 files changed, 591 insertions(+), 25 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/r/RekindlingPhoenix.java create mode 100644 Mage.Sets/src/mage/cards/r/RelentlessRaptor.java create mode 100644 Mage.Sets/src/mage/cards/r/ResplendentGriffin.java create mode 100644 Mage.Sets/src/mage/cards/r/ReturnToTheWind.java create mode 100644 Mage.Sets/src/mage/cards/r/RiverDarter.java create mode 100644 Mage.Sets/src/mage/cards/r/RiverwiseAugur.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/RekindlingPhoenixToken.java diff --git a/Mage.Sets/src/mage/cards/b/Brainstorm.java b/Mage.Sets/src/mage/cards/b/Brainstorm.java index e1cab189cf..4123643475 100644 --- a/Mage.Sets/src/mage/cards/b/Brainstorm.java +++ b/Mage.Sets/src/mage/cards/b/Brainstorm.java @@ -40,8 +40,7 @@ import mage.constants.CardType; public class Brainstorm extends CardImpl { public Brainstorm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); // Draw three cards, then put two cards from your hand on top of your library in any order. this.getSpellAbility().addEffect(new BrainstormEffect()); diff --git a/Mage.Sets/src/mage/cards/r/RekindlingPhoenix.java b/Mage.Sets/src/mage/cards/r/RekindlingPhoenix.java new file mode 100644 index 0000000000..0f837bc839 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RekindlingPhoenix.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.RekindlingPhoenixToken; + +/** + * + * @author LevelX2 + */ +public class RekindlingPhoenix extends CardImpl { + + public RekindlingPhoenix(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.PHOENIX); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // 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." + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new RekindlingPhoenixToken()), false)); + } + + public RekindlingPhoenix(final RekindlingPhoenix card) { + super(card); + } + + @Override + public RekindlingPhoenix copy() { + return new RekindlingPhoenix(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RelentlessRaptor.java b/Mage.Sets/src/mage/cards/r/RelentlessRaptor.java new file mode 100644 index 0000000000..8ee5d927db --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RelentlessRaptor.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; +import mage.abilities.effects.common.combat.BlocksIfAbleSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +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 RelentlessRaptor extends CardImpl { + + public RelentlessRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Relentless Raptor attacks or blocks each combat if able. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true).setText("{this} attacks")); + ability.addEffect(new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield).setText("or blocks each combat if able")); + this.addAbility(ability); + } + + public RelentlessRaptor(final RelentlessRaptor card) { + super(card); + } + + @Override + public RelentlessRaptor copy() { + return new RelentlessRaptor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java b/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java new file mode 100644 index 0000000000..10b3ddf5a4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ResplendentGriffin.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.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class ResplendentGriffin extends CardImpl { + + public ResplendentGriffin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}"); + + this.subtype.add(SubType.GRIFFIN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Ascend + this.addAbility(new AscendAbility()); + + // Whenever Resplendent Griffin attacks, if you have the city's blessing, put a +1/+1 counter on it. + this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), CitysBlessingCondition.instance, + "Whenever {this} attacks, if you have the city's blessing, put a +1/+1 counter on it.")); + } + + public ResplendentGriffin(final ResplendentGriffin card) { + super(card); + } + + @Override + public ResplendentGriffin copy() { + return new ResplendentGriffin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/ReturnToTheWind.java b/Mage.Sets/src/mage/cards/r/ReturnToTheWind.java new file mode 100644 index 0000000000..e17f2e5a8d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReturnToTheWind.java @@ -0,0 +1,152 @@ +/* + * 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.r; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetNonlandPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class ReturnToTheWind extends CardImpl { + + public ReturnToTheWind(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost. + getSpellAbility().addEffect(new ReturnToTheWindEffect()); + getSpellAbility().addTarget(new TargetNonlandPermanent()); + + } + + public ReturnToTheWind(final ReturnToTheWind card) { + super(card); + } + + @Override + public ReturnToTheWind copy() { + return new ReturnToTheWind(this); + } +} + +class ReturnToTheWindEffect extends OneShotEffect { + + public ReturnToTheWindEffect() { + super(Outcome.Benefit); + this.staticText = "Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost"; + } + + public ReturnToTheWindEffect(final ReturnToTheWindEffect effect) { + super(effect); + } + + @Override + public ReturnToTheWindEffect copy() { + return new ReturnToTheWindEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (targetPermanent != null) { + if (controller.moveCards(targetPermanent, Zone.EXILED, source, game)) { + Card card = game.getCard(targetPermanent.getId()); + if (card != null) { + ContinuousEffect effect = new ReturnToTheWindEffectCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + game.addEffect(effect, source); + } + } + } + return true; + } + return false; + } +} + +class ReturnToTheWindEffectCastFromExileEffect extends AsThoughEffectImpl { + + public ReturnToTheWindEffectCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); + staticText = "For as long as that card remains exiled, its owner may cast it without paying its mana cost"; + } + + public ReturnToTheWindEffectCastFromExileEffect(final ReturnToTheWindEffectCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ReturnToTheWindEffectCastFromExileEffect copy() { + return new ReturnToTheWindEffectCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + UUID ownerId = game.getOwnerId(objectId); + if (objectId.equals(getTargetPointer().getFirst(game, source))) { + if (affectedControllerId.equals(ownerId)) { + Card card = game.getCard(objectId); + Player player = game.getPlayer(ownerId); + if (player != null && card != null) { + player.setCastSourceIdWithAlternateMana(objectId, null, card.getSpellAbility().getCosts()); + return true; + } + } + } else { + if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) { + // object has moved zone so effect can be discarted + this.discard(); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiverDarter.java b/Mage.Sets/src/mage/cards/r/RiverDarter.java new file mode 100644 index 0000000000..5f629a98ee --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiverDarter.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class RiverDarter extends CardImpl { + + public RiverDarter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // River Darter can't be blocked by Dinosaurs. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect( + new FilterCreaturePermanent(SubType.DINOSAUR, "Dinosaurs"), Duration.WhileOnBattlefield))); + } + + public RiverDarter(final RiverDarter card) { + super(card); + } + + @Override + public RiverDarter copy() { + return new RiverDarter(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RiverwiseAugur.java b/Mage.Sets/src/mage/cards/r/RiverwiseAugur.java new file mode 100644 index 0000000000..4c8167efdc --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiverwiseAugur.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.BrainstormEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class RiverwiseAugur extends CardImpl { + + public RiverwiseAugur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Riverwise Augur enters the battlefield, draw three cards, then put two cards from your hand on top of your library in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new BrainstormEffect())); + } + + public RiverwiseAugur(final RiverwiseAugur card) { + super(card); + } + + @Override + public RiverwiseAugur copy() { + return new RiverwiseAugur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/StromkirkNoble.java b/Mage.Sets/src/mage/cards/s/StromkirkNoble.java index 9eabb04d78..7200968559 100644 --- a/Mage.Sets/src/mage/cards/s/StromkirkNoble.java +++ b/Mage.Sets/src/mage/cards/s/StromkirkNoble.java @@ -40,7 +40,6 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; /** * @@ -49,22 +48,17 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class StromkirkNoble extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Humans"); - - static { - filter.add(new SubtypePredicate(SubType.HUMAN)); - } - public StromkirkNoble(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(1); this.toughness = new MageInt(1); // Stromkirk Noble can't be blocked by Humans. - this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); - // Whenever Stromkirk Noble deals combat damage to a player, put a +1/+1 counter on it. + this.addAbility(new SimpleEvasionAbility( + new CantBeBlockedByCreaturesSourceEffect(new FilterCreaturePermanent(SubType.HUMAN, "Humans"), Duration.WhileOnBattlefield))); + // Whenever Stromkirk Noble deals combat damage to a player, put a +1/+1 counter on it. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); } diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index aa95a263ee..0749c57315 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -152,6 +152,12 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); cards.add(new SetCardInfo("Reaver Ambush", 83, Rarity.UNCOMMON, mage.cards.r.ReaverAmbush.class)); cards.add(new SetCardInfo("Recover", 84, Rarity.COMMON, mage.cards.r.Recover.class)); + cards.add(new SetCardInfo("Rekindling Phoenix", 111, Rarity.MYTHIC, mage.cards.r.RekindlingPhoenix.class)); + cards.add(new SetCardInfo("Relentless Raptor", 169, Rarity.UNCOMMON, mage.cards.r.RelentlessRaptor.class)); + cards.add(new SetCardInfo("Resplendent Griffin", 170, Rarity.UNCOMMON, mage.cards.r.ResplendentGriffin.class)); + cards.add(new SetCardInfo("Return to the Wind", 46, Rarity.RARE, mage.cards.r.ReturnToTheWind.class)); + cards.add(new SetCardInfo("River Darter", 47, Rarity.COMMON, mage.cards.r.RiverDarter.class)); + cards.add(new SetCardInfo("Riverwise Augur", 48, Rarity.UNCOMMON, mage.cards.r.RiverwiseAugur.class)); cards.add(new SetCardInfo("Sadistic Skymarcher", 85, Rarity.UNCOMMON, mage.cards.s.SadisticSkymarcher.class)); cards.add(new SetCardInfo("Sailor of Means", 49, Rarity.COMMON, mage.cards.s.SailorOfMeans.class)); cards.add(new SetCardInfo("Sanctum of the Sun", 176, Rarity.MYTHIC, mage.cards.s.SanctumOfTheSun.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/BrainstormEffect.java b/Mage/src/main/java/mage/abilities/effects/common/BrainstormEffect.java index ec2ee43f8e..cf8e4b6558 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/BrainstormEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/BrainstormEffect.java @@ -13,7 +13,7 @@ public class BrainstormEffect extends OneShotEffect { public BrainstormEffect() { super(Outcome.DrawCard); - staticText = "Draw three cards, then put two cards from your hand on top of your library in any order"; + staticText = "draw three cards, then put two cards from your hand on top of your library in any order"; } public BrainstormEffect(final BrainstormEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java index 1fda34c497..5c741d6c42 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -28,7 +28,6 @@ package mage.abilities.effects.common.combat; import mage.abilities.Ability; -import mage.abilities.Mode; import mage.abilities.effects.RequirementEffect; import mage.constants.Duration; import mage.game.Game; @@ -42,6 +41,7 @@ public class BlocksIfAbleSourceEffect extends RequirementEffect { public BlocksIfAbleSourceEffect(Duration duration) { super(duration); + staticText = "{this} blocks each combat if able."; } public BlocksIfAbleSourceEffect(final BlocksIfAbleSourceEffect effect) { @@ -73,10 +73,4 @@ public class BlocksIfAbleSourceEffect extends RequirementEffect { public boolean mustBlockAny(Game game) { return true; } - - @Override - public String getText(Mode mode) { - return "{this} blocks each combat if able."; - } - } diff --git a/Mage/src/main/java/mage/game/permanent/token/RekindlingPhoenixToken.java b/Mage/src/main/java/mage/game/permanent/token/RekindlingPhoenixToken.java new file mode 100644 index 0000000000..ccfcdd2e37 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/RekindlingPhoenixToken.java @@ -0,0 +1,68 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. + */ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class RekindlingPhoenixToken extends Token { + + public RekindlingPhoenixToken() { + super("Elemental", "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.\""); + cardType.add(CardType.CREATURE); + subtype.add(SubType.THRULL); + color.setRed(true); + power = new MageInt(0); + toughness = new MageInt(1); + + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false); + ability.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setText("and return target card named Rekindling Phoenix from your graveyard to the battlefield")); + ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn")); + FilterCard filter = new FilterCard("card named Rekindling Phoenix from your graveyard"); + filter.add(new NamePredicate("Rekindling Phoenix")); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } +} From 0fe8e28e5c8dc5b908441ea9a1f6745044cb018f Mon Sep 17 00:00:00 2001 From: Will Hall Date: Sat, 6 Jan 2018 15:20:37 -0800 Subject: [PATCH 37/51] Implemented Grasping Scoundrel. --- .../src/mage/cards/g/GraspingScoundrel.java | 74 +++++++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 1 + 2 files changed, 75 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GraspingScoundrel.java diff --git a/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java b/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java new file mode 100644 index 0000000000..92e534e61d --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceAttackingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; +import mage.constants.Zone; + +/** + * + * @author Will + */ +public class GraspingScoundrel extends CardImpl{ + public GraspingScoundrel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + this.subtype.add(SubType.PIRATE); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Grasping Scoundrel gets +1/+0 as long as it's attacking. + this.addAbility( + new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), + SourceAttackingCondition.instance, + "{this} gets +1/+0 as long as it's attacking" + ))); + } + + public GraspingScoundrel(final GraspingScoundrel card) { + super(card); + } + + @Override + public GraspingScoundrel copy() { + return new GraspingScoundrel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 5095cc80e5..37ad4624e0 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -104,6 +104,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); + cards.add(new SetCardInfo("Grasping Scoundrel", 74, Rarity.COMMON, mage.cards.g.GraspingScoundrel.class)); cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); From 70e99e185b85015074343787444208eee8ad61a2 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 03:46:07 +0400 Subject: [PATCH 38/51] Updated menace and explore abilities to show or hide description --- .../effects/keyword/ExploreSourceEffect.java | 46 +++++++++++++++++-- .../effects/keyword/ExploreTargetEffect.java | 6 ++- .../mage/abilities/keyword/MenaceAbility.java | 14 +++++- 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java index 06030eb1a1..e8cc65a629 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreSourceEffect.java @@ -43,19 +43,59 @@ import mage.players.Player; /** * - * @author TheElk801 + * @author TheElk801, JayDi85 */ public class ExploreSourceEffect extends OneShotEffect { - public static final String RULE_TEXT = "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 this creature, then put the card back or put it into your graveyard.)"; + // "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 this creature, then put the card back or put it into your graveyard.)"; + private static final String RULE_TEXT_START = "explores."; + private static final String RULE_TEXT_HINT = "(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.)"; + + public static String getRuleText(boolean showAbilityHint) { + return getRuleText(showAbilityHint, null); + } + public static String getRuleText(boolean showAbilityHint, String whosExplores) { + + String res = whosExplores; + if(res == null){ res = "it"; } + + res += " " + RULE_TEXT_START; + + if (showAbilityHint) { + res += " " + RULE_TEXT_HINT; + } + return res; + } + + private String sourceName = "it"; + private boolean showAbilityHint = true; public ExploreSourceEffect() { + this(true); + } + + public ExploreSourceEffect(boolean showAbilityHint) { + this(showAbilityHint, null); + } + + public ExploreSourceEffect(boolean showAbilityHint, String whosExplores) { super(Outcome.Benefit); - this.staticText = RULE_TEXT; + + if(whosExplores != null) { + this.sourceName = whosExplores; + } + setText(); } public ExploreSourceEffect(final ExploreSourceEffect effect) { super(effect); + this.showAbilityHint = effect.showAbilityHint; + this.sourceName = effect.sourceName; + setText(); + } + + private void setText(){ + this.staticText = getRuleText(this.showAbilityHint, this.sourceName); } @Override diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreTargetEffect.java index 8c204656f9..160c78ec05 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/ExploreTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/ExploreTargetEffect.java @@ -39,8 +39,12 @@ import mage.game.Game; public class ExploreTargetEffect extends OneShotEffect { public ExploreTargetEffect() { + this(true); + } + + public ExploreTargetEffect(boolean showAbilityHint) { super(Outcome.Benefit); - this.staticText = ExploreSourceEffect.RULE_TEXT; + this.staticText = ExploreSourceEffect.getRuleText(showAbilityHint); } public ExploreTargetEffect(final ExploreTargetEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java index 22654b647b..4359a51a2a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MenaceAbility.java @@ -16,12 +16,20 @@ import mage.constants.Zone; */ public class MenaceAbility extends StaticAbility { // Menace may not be a Singleton because the source ability is needed in the continuous effect + private boolean showAbilityHint = true; + public MenaceAbility() { + this(true); + } + + public MenaceAbility(boolean showAbilityHint) { super(Zone.BATTLEFIELD, new CantBeBlockedByOneEffect(2)); + this.showAbilityHint = showAbilityHint; } public MenaceAbility(final MenaceAbility ability) { super(ability); + this.showAbilityHint = ability.showAbilityHint; } @Override @@ -31,7 +39,11 @@ public class MenaceAbility extends StaticAbility { // Menace may not be a Single @Override public String getRule() { - return "Menace (This creature can't be blocked except by two or more creatures.)"; + String res = "Menace"; + if (this.showAbilityHint) { + res += " (This creature can't be blocked except by two or more creatures.)"; + } + return res; } } From 7df0d81ea104736df96392ea6c2df0b1f04b0537 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 03:46:28 +0400 Subject: [PATCH 39/51] [RIX] Added 6 cards --- .../src/mage/cards/d/DinosaurHunter.java | 122 ++++++++++++++++ Mage.Sets/src/mage/cards/p/ProteanRaider.java | 91 ++++++++++++ Mage.Sets/src/mage/cards/r/RecklessRage.java | 135 ++++++++++++++++++ .../src/mage/cards/s/SunCollaredRaptor.java | 96 +++++++++++++ .../src/mage/cards/s/SunCrestedPterodon.java | 119 +++++++++++++++ Mage.Sets/src/mage/cards/t/TombRobber.java | 109 ++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 6 + 7 files changed, 678 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DinosaurHunter.java create mode 100644 Mage.Sets/src/mage/cards/p/ProteanRaider.java create mode 100644 Mage.Sets/src/mage/cards/r/RecklessRage.java create mode 100644 Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java create mode 100644 Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java create mode 100644 Mage.Sets/src/mage/cards/t/TombRobber.java diff --git a/Mage.Sets/src/mage/cards/d/DinosaurHunter.java b/Mage.Sets/src/mage/cards/d/DinosaurHunter.java new file mode 100644 index 0000000000..872d60b050 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DinosaurHunter.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.d; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.*; +import mage.abilities.effects.common.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.*; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.events.DamagedCreatureEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; + +/** + * @author JayDi85 + */ +public class DinosaurHunter extends CardImpl { + + private static final FilterControlledCreaturePermanent filterAnotherDino = new FilterControlledCreaturePermanent(); + static { + filterAnotherDino.add(new AnotherPredicate()); + filterAnotherDino.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public DinosaurHunter(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); + + // Whenever Dinosaur Hunter deals combat damage to a Dinosaur, destroy that creature. + this.addAbility(new DinosaurHunterAbility()); + } + + public DinosaurHunter(final DinosaurHunter card) { + super(card); + } + + @Override + public DinosaurHunter copy() { + return new DinosaurHunter(this); + } +} + +class DinosaurHunterAbility extends TriggeredAbilityImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + DinosaurHunterAbility() { + super(Zone.BATTLEFIELD, new DestroyTargetEffect()); + } + + DinosaurHunterAbility(final DinosaurHunterAbility ability) { + super(ability); + } + + @Override + public DinosaurHunterAbility copy() { + return new DinosaurHunterAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_CREATURE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent sourcePermanet = game.getPermanent(event.getSourceId()); + Permanent targetPermanet = game.getPermanent(event.getTargetId()); + if (sourcePermanet != null && targetPermanet != null && event.getSourceId().equals(sourceId) && filter.match(targetPermanet, game)) { + getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId())); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} deals combat damage to a Dinosaur, destroy that creature."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/ProteanRaider.java b/Mage.Sets/src/mage/cards/p/ProteanRaider.java new file mode 100644 index 0000000000..da936f4350 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/ProteanRaider.java @@ -0,0 +1,91 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.p; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.WingmateRocToken; +import mage.target.TargetPermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * @author JayDi85 + */ +public class ProteanRaider extends CardImpl { + + public ProteanRaider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + + this.subtype.add(SubType.SHAPESHIFTER); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(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. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new CopyPermanentEffect(), true), + RaidCondition.instance, + "Raid — If you attacked with a creature this turn, you may have {this} enter the battlefield as a copy of any creature on the battlefield."); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public ProteanRaider(final ProteanRaider card) { + super(card); + } + + @Override + public ProteanRaider copy() { + return new ProteanRaider(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/r/RecklessRage.java b/Mage.Sets/src/mage/cards/r/RecklessRage.java new file mode 100644 index 0000000000..9e7313ea46 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RecklessRage.java @@ -0,0 +1,135 @@ +/* + * 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.r; + +import java.io.ObjectStreamException; +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.*; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.WingmateRocToken; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * @author JayDi85 + */ +public class RecklessRage extends CardImpl { + + public RecklessRage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); + + // Reckless Rage deals 4 damage to target creature you don’t control and 2 damage to target creature you control. + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addEffect(RecklessRageEffect.getInstance()); + } + + public RecklessRage(final RecklessRage card) { + super(card); + } + + @Override + public RecklessRage copy() { + return new RecklessRage(this); + } +} + +class RecklessRageEffect extends OneShotEffect { + + private static final RecklessRageEffect instance = new RecklessRageEffect(); + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static RecklessRageEffect getInstance() { + return instance; + } + + private RecklessRageEffect ( ) { + super(Outcome.Damage); + staticText = "{source} deals 4 damage to target creature you don’t control and 2 damage to target creature you control."; + } + + @Override + public boolean apply(Game game, Ability source) { + + boolean completed = false; + int stepNumber = 1; + + for ( Target target : source.getTargets() ) { + if (stepNumber > 2) { + System.out.println("ERROR: " + RecklessRage.class.toString() + " got too many targets (need 2, got " + source.getTargets().size() + ")"); + break; + } + + Permanent permanent = game.getPermanent(target.getFirstTarget()); + + if(permanent != null){ + completed |= (permanent.damage( (stepNumber == 1) ? 2 : 4, source.getSourceId(), game, false, true ) > 0); + } + + stepNumber = stepNumber + 1; + } + return completed; + } + + @Override + public Effect copy() { + return instance; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java b/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java new file mode 100644 index 0000000000..488fed2317 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java @@ -0,0 +1,96 @@ +/* + * 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.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +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.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.WingmateRocToken; +import mage.target.TargetPermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * @author JayDi85 + */ +public class SunCollaredRaptor extends CardImpl { + + public SunCollaredRaptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // {2}{R}: Sun-Collared Raptor gets +3/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new BoostSourceEffect(3, 0, Duration.EndOfTurn), + new ManaCostsImpl("{2}{R}")) + ); + } + + public SunCollaredRaptor(final SunCollaredRaptor card) { + super(card); + } + + @Override + public SunCollaredRaptor copy() { + return new SunCollaredRaptor(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java b/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java new file mode 100644 index 0000000000..852ff1f436 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java @@ -0,0 +1,119 @@ +/* + * 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.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.keyword.WitherAbility; +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.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.permanent.token.WingmateRocToken; +import mage.target.TargetPermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * @author JayDi85 + */ +public class SunCrestedPterodon extends CardImpl { + + private static final FilterControlledCreaturePermanent filterAnotherDino = new FilterControlledCreaturePermanent(); + static { + filterAnotherDino.add(new AnotherPredicate()); + filterAnotherDino.add(new SubtypePredicate(SubType.DINOSAUR)); + } + + public SunCrestedPterodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Sun-Crested Pterodon has vigilance as long as you control another Dinosaur. + ContinuousEffect effect = new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield); + Condition condition = new PermanentsOnTheBattlefieldCondition(filterAnotherDino); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect(effect, condition, + "{this} has vigilance as long as you control another Dinosaur.") + )); + } + + public SunCrestedPterodon(final SunCrestedPterodon card) { + super(card); + } + + @Override + public SunCrestedPterodon copy() { + return new SunCrestedPterodon(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/TombRobber.java b/Mage.Sets/src/mage/cards/t/TombRobber.java new file mode 100644 index 0000000000..259206e5f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TombRobber.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.t; + +import java.util.UUID; + +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.*; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.keyword.ExploreSourceEffect; +import mage.abilities.keyword.*; +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.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.permanent.token.WingmateRocToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCardInOpponentsGraveyard; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * @author JayDi85 + */ +public class TombRobber extends CardImpl { + + public TombRobber(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Menace + this.addAbility(new MenaceAbility(false)); + + // {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.) + Effect effect = new ExploreSourceEffect(true, "{this}"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new DiscardCardCost()); + ability.addCost(new ManaCostsImpl("{1}")); + this.addAbility(ability); + } + + public TombRobber(final TombRobber card) { + super(card); + } + + @Override + public TombRobber copy() { + return new TombRobber(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 5095cc80e5..47bef2c9c9 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -81,6 +81,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Dire Fleet Daredevil", 99, Rarity.RARE, mage.cards.d.DireFleetDaredevil.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("Dinosaur Hunter", 67, Rarity.COMMON, mage.cards.d.DinosaurHunter.class)); cards.add(new SetCardInfo("Divine Verdict", 5, Rarity.COMMON, mage.cards.d.DivineVerdict.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)); @@ -147,6 +148,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Plains", 192, Rarity.COMMON, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class)); cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); + cards.add(new SetCardInfo("Protean Raider", 167, Rarity.RARE, mage.cards.p.ProteanRaider.class)); cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); cards.add(new SetCardInfo("Raging Regisaur", 168, Rarity.UNCOMMON, mage.cards.r.RagingRegisaur.class)); cards.add(new SetCardInfo("Raptor Companion", 19, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); @@ -160,6 +162,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("River Darter", 47, Rarity.COMMON, mage.cards.r.RiverDarter.class)); cards.add(new SetCardInfo("Riverwise Augur", 48, Rarity.UNCOMMON, mage.cards.r.RiverwiseAugur.class)); cards.add(new SetCardInfo("Sadistic Skymarcher", 85, Rarity.UNCOMMON, mage.cards.s.SadisticSkymarcher.class)); + cards.add(new SetCardInfo("Reckless Rage", 110, Rarity.UNCOMMON, mage.cards.r.RecklessRage.class)); cards.add(new SetCardInfo("Sailor of Means", 49, Rarity.COMMON, mage.cards.s.SailorOfMeans.class)); cards.add(new SetCardInfo("Sanctum of the Sun", 176, Rarity.MYTHIC, mage.cards.s.SanctumOfTheSun.class)); cards.add(new SetCardInfo("Sanguine Glorifier", 20, Rarity.COMMON, mage.cards.s.SanguineGlorifier.class)); @@ -194,6 +197,8 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 194, Rarity.COMMON, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Swift Warden", 146, Rarity.UNCOMMON, mage.cards.s.SwiftWarden.class)); cards.add(new SetCardInfo("Sworn Guardian", 58, Rarity.COMMON, mage.cards.s.SwornGuardian.class)); + cards.add(new SetCardInfo("Sun-Collared Raptor", 118, Rarity.COMMON, mage.cards.s.SunCollaredRaptor.class)); + cards.add(new SetCardInfo("Sun-Crested Pterodon", 27, Rarity.COMMON, mage.cards.s.SunCrestedPterodon.class)); cards.add(new SetCardInfo("Temple Altisaur", 28, Rarity.RARE, mage.cards.t.TempleAltisaur.class)); cards.add(new SetCardInfo("Tendershoot Dryad", 147, Rarity.RARE, mage.cards.t.TendershootDryad.class)); cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); @@ -204,6 +209,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Tilonalli's Summoner", 121, Rarity.RARE, mage.cards.t.TilonallisSummoner.class)); cards.add(new SetCardInfo("Timestream Navigator", 59, Rarity.MYTHIC, mage.cards.t.TimestreamNavigator.class)); cards.add(new SetCardInfo("Tomb of the Dusk Rose", 166, Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); + cards.add(new SetCardInfo("Tomb Robber", 87, Rarity.RARE, mage.cards.t.TombRobber.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); cards.add(new SetCardInfo("Twilight Prophet", 88, Rarity.MYTHIC, mage.cards.t.TwilightProphet.class)); From f185138fa357299c03fb0b51691acc17e72773ba Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 03:59:26 +0400 Subject: [PATCH 40/51] [RIX] Fixed duplicated Profane Procession and card number --- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 47bef2c9c9..528a405ee0 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -105,7 +105,6 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); - cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Hadana's Climb", 158, Rarity.RARE, mage.cards.h.HadanasClimb.class)); @@ -149,7 +148,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class)); cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); cards.add(new SetCardInfo("Protean Raider", 167, Rarity.RARE, mage.cards.p.ProteanRaider.class)); - cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); + cards.add(new SetCardInfo("Profane Procession", "166a", Rarity.RARE, mage.cards.p.ProfaneProcession.class)); cards.add(new SetCardInfo("Raging Regisaur", 168, Rarity.UNCOMMON, mage.cards.r.RagingRegisaur.class)); cards.add(new SetCardInfo("Raptor Companion", 19, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); @@ -208,7 +207,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Tilonali's Crown", 120, Rarity.COMMON, mage.cards.t.TilonalisCrown.class)); cards.add(new SetCardInfo("Tilonalli's Summoner", 121, Rarity.RARE, mage.cards.t.TilonallisSummoner.class)); cards.add(new SetCardInfo("Timestream Navigator", 59, Rarity.MYTHIC, mage.cards.t.TimestreamNavigator.class)); - cards.add(new SetCardInfo("Tomb of the Dusk Rose", 166, Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); + cards.add(new SetCardInfo("Tomb of the Dusk Rose", "106b", Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); cards.add(new SetCardInfo("Tomb Robber", 87, Rarity.RARE, mage.cards.t.TombRobber.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); From 5bcb93bec1de52f2f080ac67410d5fd6d40cf2b5 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 04:08:27 +0400 Subject: [PATCH 41/51] typos --- Mage.Sets/src/mage/cards/g/GraspingScoundrel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java b/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java index 92e534e61d..ee4727d144 100644 --- a/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java +++ b/Mage.Sets/src/mage/cards/g/GraspingScoundrel.java @@ -47,8 +47,9 @@ import mage.constants.Zone; public class GraspingScoundrel extends CardImpl{ public GraspingScoundrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); - this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.PIRATE); + this.subtype.add(SubType.HUMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); From 3e7c5aee9ccff35b872e705e3e7454a96298ea7c Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 04:09:52 +0400 Subject: [PATCH 42/51] typos --- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 3a105c1f29..428a7a8e2b 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -208,7 +208,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Tilonali's Crown", 120, Rarity.COMMON, mage.cards.t.TilonalisCrown.class)); cards.add(new SetCardInfo("Tilonalli's Summoner", 121, Rarity.RARE, mage.cards.t.TilonallisSummoner.class)); cards.add(new SetCardInfo("Timestream Navigator", 59, Rarity.MYTHIC, mage.cards.t.TimestreamNavigator.class)); - cards.add(new SetCardInfo("Tomb of the Dusk Rose", "106b", Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); + cards.add(new SetCardInfo("Tomb of the Dusk Rose", "166b", Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); cards.add(new SetCardInfo("Tomb Robber", 87, Rarity.RARE, mage.cards.t.TombRobber.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); From 72844741da30550670d08ba6a2b17a3968ff7226 Mon Sep 17 00:00:00 2001 From: Will Hall Date: Sat, 6 Jan 2018 16:29:48 -0800 Subject: [PATCH 43/51] Added Human type to Daring Buccaneer. --- Mage.Sets/src/mage/cards/d/DaringBuccaneer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/cards/d/DaringBuccaneer.java b/Mage.Sets/src/mage/cards/d/DaringBuccaneer.java index 5c3bdfd3bc..8f1368e3f9 100644 --- a/Mage.Sets/src/mage/cards/d/DaringBuccaneer.java +++ b/Mage.Sets/src/mage/cards/d/DaringBuccaneer.java @@ -53,6 +53,7 @@ public class DaringBuccaneer extends CardImpl { public DaringBuccaneer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.PIRATE); this.power = new MageInt(2); From 12805659284adb5259388b0143464f70434171fc Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 04:41:07 +0400 Subject: [PATCH 44/51] Fixed images downloading from scryfall (two sided cards) --- .../card/dl/sources/ScryfallImageSource.java | 22 ++++++++++++------- .../plugins/card/images/CardDownloadData.java | 11 ++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 2d7f1d0fed..6f664975ff 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -8,7 +8,7 @@ import java.util.Set; import org.mage.plugins.card.images.CardDownloadData; /** - * @author Quercitron + * @author Quercitron, JayDi85 * */ public enum ScryfallImageSource implements CardImageSource { @@ -217,17 +217,23 @@ public enum ScryfallImageSource implements CardImageSource { @Override public String generateURL(CardDownloadData card) throws Exception { + // special card number like "103a" already compatible + if (card.isCollectorIdWithStr()) { + return "https://img.scryfall.com/cards/large/en/" + formatSetName(card.getSet()) + "/" + + card.getCollectorId() + ".jpg"; + } + + // double faced cards do not supporte by API (need direct link for img) + // example: https://img.scryfall.com/cards/large/en/xln/173b.jpg if (card.isTwoFacedCard()) { - // double faced cards do not supporte by API (need direct link for img) - // example: https://img.scryfall.com/cards/large/en/xln/173b.jpg return "https://img.scryfall.com/cards/large/en/" + formatSetName(card.getSet()) + "/" + card.getCollectorId() + (card.isSecondSide() ? "b" : "a") + ".jpg"; - }else { - // single face cards support by single API call (redirect to img link) - // example: https://api.scryfall.com/cards/xln/121?format=image - return "https://api.scryfall.com/cards/" + formatSetName(card.getSet()) + "/" - + card.getCollectorId() + "?format=image"; } + + // basic cards by api call (redirect to img link) + // example: https://api.scryfall.com/cards/xln/121?format=image + return "https://api.scryfall.com/cards/" + formatSetName(card.getSet()) + "/" + + card.getCollectorId() + "?format=image"; } @Override diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java index 9956f8e10f..09d354aa76 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/CardDownloadData.java @@ -1,5 +1,7 @@ package org.mage.plugins.card.images; +import mage.util.CardUtil; + import java.util.Objects; /** @@ -128,6 +130,15 @@ public class CardDownloadData { return collectorId; } + public Integer getCollectorIdAsInt() { + return CardUtil.parseCardNumberAsInt(collectorId); + } + + public boolean isCollectorIdWithStr(){ + // card have special numbers like "103a", "180b" (scryfall style) + return !getCollectorId().equals(getCollectorIdAsInt().toString()); + } + public String getName() { return name; } From cae20c1a3f18eec45c8ab639d2172dd508edb2dc Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 04:58:02 +0400 Subject: [PATCH 45/51] [RIX] Added Swaggering Corsair --- .../src/mage/cards/s/SwaggeringCorsair.java | 94 +++++++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 1 + 2 files changed, 95 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java diff --git a/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java b/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java new file mode 100644 index 0000000000..8df6c051f9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java @@ -0,0 +1,94 @@ +/* + * 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.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.VariableManaCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.WingmateRocToken; +import mage.target.TargetPermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * @author JayDi85 + */ +public class SwaggeringCorsair extends CardImpl { + + public SwaggeringCorsair(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Raid - Swaggering Corsair enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), + RaidCondition.instance, + "Raid — Swaggering Corsair enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn."); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public SwaggeringCorsair(final SwaggeringCorsair card) { + super(card); + } + + @Override + public SwaggeringCorsair copy() { + return new SwaggeringCorsair(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 428a7a8e2b..087932537a 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -199,6 +199,7 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Sworn Guardian", 58, Rarity.COMMON, mage.cards.s.SwornGuardian.class)); cards.add(new SetCardInfo("Sun-Collared Raptor", 118, Rarity.COMMON, mage.cards.s.SunCollaredRaptor.class)); cards.add(new SetCardInfo("Sun-Crested Pterodon", 27, Rarity.COMMON, mage.cards.s.SunCrestedPterodon.class)); + cards.add(new SetCardInfo("Swaggering Corsair", 119, Rarity.COMMON, mage.cards.s.SwaggeringCorsair.class)); cards.add(new SetCardInfo("Temple Altisaur", 28, Rarity.RARE, mage.cards.t.TempleAltisaur.class)); cards.add(new SetCardInfo("Tendershoot Dryad", 147, Rarity.RARE, mage.cards.t.TendershootDryad.class)); cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); From 4255a575282d63876b172d5946bbf0933d906e74 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 7 Jan 2018 05:02:05 +0400 Subject: [PATCH 46/51] Cleanup --- .../src/mage/cards/d/DinosaurHunter.java | 3 -- Mage.Sets/src/mage/cards/p/ProteanRaider.java | 18 ----------- .../src/mage/cards/s/SunCollaredRaptor.java | 21 ------------ .../src/mage/cards/s/SunCrestedPterodon.java | 29 ----------------- .../src/mage/cards/s/SwaggeringCorsair.java | 20 ------------ Mage.Sets/src/mage/cards/t/TombRobber.java | 32 ------------------- 6 files changed, 123 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DinosaurHunter.java b/Mage.Sets/src/mage/cards/d/DinosaurHunter.java index 872d60b050..9711eb8b51 100644 --- a/Mage.Sets/src/mage/cards/d/DinosaurHunter.java +++ b/Mage.Sets/src/mage/cards/d/DinosaurHunter.java @@ -30,9 +30,7 @@ package mage.cards.d; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.*; import mage.abilities.effects.common.*; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -41,7 +39,6 @@ import mage.filter.common.*; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; -import mage.game.events.DamagedCreatureEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; diff --git a/Mage.Sets/src/mage/cards/p/ProteanRaider.java b/Mage.Sets/src/mage/cards/p/ProteanRaider.java index da936f4350..c15f237d43 100644 --- a/Mage.Sets/src/mage/cards/p/ProteanRaider.java +++ b/Mage.Sets/src/mage/cards/p/ProteanRaider.java @@ -31,32 +31,14 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCosts; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.costs.mana.VariableManaCost; -import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.CopyPermanentEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.permanent.token.WingmateRocToken; -import mage.target.TargetPermanent; import mage.watchers.common.PlayerAttackedWatcher; /** diff --git a/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java b/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java index 488fed2317..5655a4dc11 100644 --- a/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java +++ b/Mage.Sets/src/mage/cards/s/SunCollaredRaptor.java @@ -30,23 +30,8 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.condition.common.RaidCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.costs.mana.VariableManaCost; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.common.CopyPermanentEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -55,12 +40,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.permanent.token.WingmateRocToken; -import mage.target.TargetPermanent; -import mage.watchers.common.PlayerAttackedWatcher; /** * @author JayDi85 diff --git a/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java b/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java index 852ff1f436..6de23f7f4e 100644 --- a/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java +++ b/Mage.Sets/src/mage/cards/s/SunCrestedPterodon.java @@ -30,52 +30,23 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.condition.common.RaidCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCosts; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.costs.mana.VariableManaCost; -import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.common.CopyPermanentEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.VigilanceAbility; -import mage.abilities.keyword.WitherAbility; 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.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.permanent.token.WingmateRocToken; -import mage.target.TargetPermanent; -import mage.watchers.common.PlayerAttackedWatcher; /** * @author JayDi85 diff --git a/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java b/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java index 8df6c051f9..2d428c42a7 100644 --- a/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java +++ b/Mage.Sets/src/mage/cards/s/SwaggeringCorsair.java @@ -31,35 +31,15 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCosts; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.costs.mana.VariableManaCost; -import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.common.CopyPermanentEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Zone; -import mage.counters.Counter; import mage.counters.CounterType; -import mage.filter.FilterPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.permanent.token.WingmateRocToken; -import mage.target.TargetPermanent; import mage.watchers.common.PlayerAttackedWatcher; /** diff --git a/Mage.Sets/src/mage/cards/t/TombRobber.java b/Mage.Sets/src/mage/cards/t/TombRobber.java index 259206e5f0..6dd4d22118 100644 --- a/Mage.Sets/src/mage/cards/t/TombRobber.java +++ b/Mage.Sets/src/mage/cards/t/TombRobber.java @@ -30,50 +30,18 @@ package mage.cards.t; import java.util.UUID; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.Condition; -import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.condition.common.RaidCondition; import mage.abilities.costs.common.DiscardCardCost; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.costs.mana.VariableManaCost; -import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; -import mage.abilities.effects.EntersBattlefieldEffect; -import mage.abilities.effects.common.*; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.keyword.ExploreSourceEffect; import mage.abilities.keyword.*; 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.FilterCard; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.filter.predicate.mageobject.ColorPredicate; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.game.permanent.token.WingmateRocToken; -import mage.target.TargetPermanent; -import mage.target.common.TargetCardInOpponentsGraveyard; -import mage.watchers.common.PlayerAttackedWatcher; /** * @author JayDi85 From 0f0b1d83306e501ad6ac7803e1c4a21224793533 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 7 Jan 2018 02:33:32 +0100 Subject: [PATCH 47/51] [RIX] Added 8 cards. --- .../src/mage/cards/m/MausoleumHarpy.java | 90 +++++++++ .../mage/cards/m/MetzaliTowerOfTriumph.java | 137 ++++++++++++++ Mage.Sets/src/mage/cards/m/Mutiny.java | 179 ++++++++++++++++++ .../src/mage/cards/o/OathswornVampire.java | 117 ++++++++++++ Mage.Sets/src/mage/cards/o/OrazcaRelic.java | 78 ++++++++ Mage.Sets/src/mage/cards/p/PathOfMettle.java | 146 ++++++++++++++ .../src/mage/cards/p/PitilessPlunderer.java | 77 ++++++++ .../src/mage/cards/p/PrideOfConquerors.java | 67 +++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 25 ++- ...ttackBlockUnlessConditionSourceEffect.java | 3 +- .../java/mage/target/TargetPermanent.java | 9 + 11 files changed, 918 insertions(+), 10 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/m/MausoleumHarpy.java create mode 100644 Mage.Sets/src/mage/cards/m/MetzaliTowerOfTriumph.java create mode 100644 Mage.Sets/src/mage/cards/m/Mutiny.java create mode 100644 Mage.Sets/src/mage/cards/o/OathswornVampire.java create mode 100644 Mage.Sets/src/mage/cards/o/OrazcaRelic.java create mode 100644 Mage.Sets/src/mage/cards/p/PathOfMettle.java create mode 100644 Mage.Sets/src/mage/cards/p/PitilessPlunderer.java create mode 100644 Mage.Sets/src/mage/cards/p/PrideOfConquerors.java diff --git a/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java new file mode 100644 index 0000000000..58704cd78c --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java @@ -0,0 +1,90 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class MausoleumHarpy extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public MausoleumHarpy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.HARPY); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) + this.addAbility(new AscendAbility()); + + // Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on Mausoleum Harpy. + this.addAbility(new ConditionalTriggeredAbility( + new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter), + CitysBlessingCondition.instance, + "Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on {this}. ")); + + } + + public MausoleumHarpy(final MausoleumHarpy card) { + super(card); + } + + @Override + public MausoleumHarpy copy() { + return new MausoleumHarpy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MetzaliTowerOfTriumph.java b/Mage.Sets/src/mage/cards/m/MetzaliTowerOfTriumph.java new file mode 100644 index 0000000000..b22efae84d --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MetzaliTowerOfTriumph.java @@ -0,0 +1,137 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import mage.MageObjectReference; +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.OneShotEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.util.RandomUtil; +import mage.watchers.Watcher; +import mage.watchers.common.AttackedThisTurnWatcher; + +/** + * + * @author LevelX2 + */ +public class MetzaliTowerOfTriumph extends CardImpl { + + public MetzaliTowerOfTriumph(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.addSuperType(SuperType.LEGENDARY); + this.nightCard = true; + + // (Transforms from Path of Mettle.) + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("(Transforms from Path of Mettle.)")); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // {t}: Add one mana of any color to your mana pool. + this.addAbility(new AnyColorManaAbility()); + + // {1}{R}, {T}: Metzali, Tower of Triumph deals 2 damage to each opponent. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(2, TargetController.OPPONENT), new ManaCostsImpl("{1}{R}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {2}{W}, {T}: Choose a creature at random that attacked this turn. Destroy that creature. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MetzaliTowerOfTriumphEffect(), new ManaCostsImpl("{2}{W}")); + ability.addCost(new TapSourceCost()); + ability.addWatcher(new AttackedThisTurnWatcher()); + this.addAbility(ability); + + } + + public MetzaliTowerOfTriumph(final MetzaliTowerOfTriumph card) { + super(card); + } + + @Override + public MetzaliTowerOfTriumph copy() { + return new MetzaliTowerOfTriumph(this); + } + +} + +class MetzaliTowerOfTriumphEffect extends OneShotEffect { + + public MetzaliTowerOfTriumphEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Choose a creature at random that attacked this turn. Destroy that creature"; + } + + public MetzaliTowerOfTriumphEffect(final MetzaliTowerOfTriumphEffect effect) { + super(effect); + } + + @Override + public MetzaliTowerOfTriumphEffect copy() { + return new MetzaliTowerOfTriumphEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Watcher watcher = game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName()); + if (watcher != null && watcher instanceof AttackedThisTurnWatcher) { + Set attackedThisTurn = ((AttackedThisTurnWatcher) watcher).getAttackedThisTurnCreatures(); + List available = new ArrayList<>(); + for (MageObjectReference mor : attackedThisTurn) { + Permanent permanent = mor.getPermanent(game); + if (permanent != null && permanent.isCreature()) { + available.add(permanent); + } + } + Permanent permanent = available.get(RandomUtil.nextInt(available.size())); + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, false); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/m/Mutiny.java b/Mage.Sets/src/mage/cards/m/Mutiny.java new file mode 100644 index 0000000000..3f53a0f168 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/Mutiny.java @@ -0,0 +1,179 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.m; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class Mutiny extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public Mutiny(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); + + // Target creature an opponent controls deals damage equal to its power to another target creature that player controls. + this.getSpellAbility().addEffect(new MutinyEffect()); + this.getSpellAbility().addTarget(new MutinyFirstTarget(filter)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("another target creature that player controls"))); + + } + + public Mutiny(final Mutiny card) { + super(card); + } + + @Override + public Mutiny copy() { + return new Mutiny(this); + } +} + +class MutinyEffect extends OneShotEffect { + + public MutinyEffect() { + super(Outcome.Damage); + this.staticText = "Target creature an opponent controls deals damage equal to its power to another target creature that player controls"; + } + + public MutinyEffect(final MutinyEffect effect) { + super(effect); + } + + @Override + public MutinyEffect copy() { + return new MutinyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent firstTarget = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (firstTarget != null) { + int damage = firstTarget.getPower().getValue(); + Permanent secondTarget = game.getPermanent(source.getTargets().get(1).getFirstTarget()); + if (damage > 0 && secondTarget != null) { + secondTarget.damage(damage, firstTarget.getId(), game, false, true); + } + } + return true; + } + +} + +class MutinyFirstTarget extends TargetCreaturePermanent { + + public MutinyFirstTarget(FilterCreaturePermanent filter) { + super(1, 1, filter, false); + } + + public MutinyFirstTarget(final MutinyFirstTarget target) { + super(target); + } + + @Override + public void addTarget(UUID id, Ability source, Game game, boolean skipEvent) { + super.addTarget(id, source, game, skipEvent); + // Update the second target + UUID firstController = game.getControllerId(id); + if (firstController != null && source.getTargets().size() > 1) { + Player controllingPlayer = game.getPlayer(firstController); + TargetCreaturePermanent targetCreaturePermanent = (TargetCreaturePermanent) source.getTargets().get(1); + // Set a new filter to the second target with the needed restrictions + FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature that player " + controllingPlayer.getName() + " controls"); + filter.add(new ControllerIdPredicate(firstController)); + filter.add(Predicates.not(new PermanentIdPredicate(id))); + targetCreaturePermanent.replaceFilter(filter); + } + } + + @Override + public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) { + if (super.canTarget(controllerId, id, source, game)) { + // can only target, if the controller has at least two targetable creatures + UUID controllingPlayerId = game.getControllerId(id); + int possibleTargets = 0; + MageObject sourceObject = game.getObject(source.getId()); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, controllingPlayerId, game)) { + if (permanent.canBeTargetedBy(sourceObject, controllerId, game)) { + possibleTargets++; + } + } + return possibleTargets > 1; + } + return false; + } + + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + if (super.canChoose(sourceId, sourceControllerId, game)) { + UUID controllingPlayerId = game.getControllerId(sourceId); + for (UUID playerId : game.getOpponents(controllingPlayerId)) { + int possibleTargets = 0; + MageObject sourceObject = game.getObject(sourceId); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, playerId, game)) { + if (permanent.canBeTargetedBy(sourceObject, controllingPlayerId, game)) { + possibleTargets++; + } + } + if (possibleTargets > 1) { + return true; + } + } + } + return false; + } + + @Override + public MutinyFirstTarget copy() { + return new MutinyFirstTarget(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OathswornVampire.java b/Mage.Sets/src/mage/cards/o/OathswornVampire.java new file mode 100644 index 0000000000..69eaa5f443 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OathswornVampire.java @@ -0,0 +1,117 @@ +/* + * 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.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.YouGainedLifeCondition; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.watchers.common.PlayerGainedLifeWatcher; + +/** + * + * @author LevelX2 + */ +public class OathswornVampire extends CardImpl { + + public OathswornVampire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Oathsworn Vampire enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // You may cast Oathsworn Vampire from your graveyard if you gained life this turn. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new OathswornVampirePlayEffect()), new PlayerGainedLifeWatcher()); + } + + public OathswornVampire(final OathswornVampire card) { + super(card); + } + + @Override + public OathswornVampire copy() { + return new OathswornVampire(this); + } +} + +class OathswornVampirePlayEffect extends AsThoughEffectImpl { + + private Condition condition; + + public OathswornVampirePlayEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); + staticText = "You may cast {this} from your graveyard if you gained life this turn"; + condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0); + } + + public OathswornVampirePlayEffect(final OathswornVampirePlayEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public OathswornVampirePlayEffect copy() { + return new OathswornVampirePlayEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + if (sourceId.equals(source.getSourceId()) && source.getControllerId().equals(affectedControllerId)) { + Card card = game.getCard(source.getSourceId()); + if (card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { + return condition.apply(game, source); + } + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/o/OrazcaRelic.java b/Mage.Sets/src/mage/cards/o/OrazcaRelic.java new file mode 100644 index 0000000000..29ddc04a7f --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OrazcaRelic.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.o; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.AscendAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class OrazcaRelic extends CardImpl { + + public OrazcaRelic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // Ascend + this.addAbility(new AscendAbility()); + + // {T}: Add {C} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + + // {T}, Sacrifice Orazca Relic: You gain 3 life and draw a card. Activate this ability only if you have the city's blessing. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new GainLifeEffect(3), + new TapSourceCost(), + CitysBlessingCondition.instance); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(new DrawCardSourceControllerEffect(1).setText("and draw a card")); + this.addAbility(ability); + } + + public OrazcaRelic(final OrazcaRelic card) { + super(card); + } + + @Override + public OrazcaRelic copy() { + return new OrazcaRelic(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PathOfMettle.java b/Mage.Sets/src/mage/cards/p/PathOfMettle.java new file mode 100644 index 0000000000..c8242bb6c2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PathOfMettle.java @@ -0,0 +1,146 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.p; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TransformAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.m.MetzaliTowerOfTriumph; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author LevelX2 + */ +public class PathOfMettle extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that doesn't have first strike, double strike, vigilance, or haste"); + + static { + filter.add(Predicates.not(Predicates.or( + new AbilityPredicate(FirstStrikeAbility.class), + new AbilityPredicate(DoubleStrikeAbility.class), + new AbilityPredicate(VigilanceAbility.class), + new AbilityPredicate(HasteAbility.class) + ))); + } + + public PathOfMettle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + + this.transformable = true; + this.secondSideCardClazz = MetzaliTowerOfTriumph.class; + + // 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. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DamageAllEffect(1, filter))); + + // Whenever you attack with at least two creatures that have first strike, double strike, vigilance, and/or haste, transform Path of Mettle. + this.addAbility(new TransformAbility()); + this.addAbility(new PathOfMettleTriggeredAbility()); + } + + public PathOfMettle(final PathOfMettle card) { + super(card); + } + + @Override + public PathOfMettle copy() { + return new PathOfMettle(this); + } +} + +class PathOfMettleTriggeredAbility extends TriggeredAbilityImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that doesn't have first strike, double strike, vigilance, or haste"); + + static { + filter.add(Predicates.or( + new AbilityPredicate(FirstStrikeAbility.class), + new AbilityPredicate(DoubleStrikeAbility.class), + new AbilityPredicate(VigilanceAbility.class), + new AbilityPredicate(HasteAbility.class) + )); + } + + public PathOfMettleTriggeredAbility() { + super(Zone.BATTLEFIELD, new TransformSourceEffect(true)); + } + + public PathOfMettleTriggeredAbility(final PathOfMettleTriggeredAbility ability) { + super(ability); + } + + @Override + public PathOfMettleTriggeredAbility copy() { + return new PathOfMettleTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + int attackerCount = 0; + if (game.getCombat().getAttackingPlayerId().equals(getControllerId())) { + for (UUID attacker : game.getCombat().getAttackers()) { + if (filter.match(game.getPermanent(attacker), game)) { + attackerCount++; + } + } + return attackerCount >= 2; + } + return false; + + } + + @Override + public String getRule() { + return "Whenever you attack with at least two creatures that have first strike, double strike, vigilance, and/or haste, transform Path of Mettle"; + } + +} diff --git a/Mage.Sets/src/mage/cards/p/PitilessPlunderer.java b/Mage.Sets/src/mage/cards/p/PitilessPlunderer.java new file mode 100644 index 0000000000..a2b5355482 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PitilessPlunderer.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.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author LevelX2 + */ +public class PitilessPlunderer extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public PitilessPlunderer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(1); + this.toughness = new MageInt(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." + this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new TreasureToken()), false, filter)); + } + + public PitilessPlunderer(final PitilessPlunderer card) { + super(card); + } + + @Override + public PitilessPlunderer copy() { + return new PitilessPlunderer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PrideOfConquerors.java b/Mage.Sets/src/mage/cards/p/PrideOfConquerors.java new file mode 100644 index 0000000000..d3c701e329 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrideOfConquerors.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.p; + +import java.util.UUID; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.keyword.AscendEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +/** + * + * @author LevelX2 + */ +public class PrideOfConquerors extends CardImpl { + + public PrideOfConquerors(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) + this.getSpellAbility().addEffect(new AscendEffect()); + + // Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead. + this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn), + new BoostTargetEffect(1, 1, Duration.EndOfTurn), CitysBlessingCondition.instance, + "Creatures you control get +1/+1 until end of turn. If you have the city's blessing, those creatures get +2/+2 until end of turn instead")); + } + + public PrideOfConquerors(final PrideOfConquerors card) { + super(card); + } + + @Override + public PrideOfConquerors copy() { + return new PrideOfConquerors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 0749c57315..ad14cc8f2a 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -58,9 +58,9 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Admiral's Order", 31, Rarity.RARE, mage.cards.a.AdmiralsOrder.class)); cards.add(new SetCardInfo("Aggressive Urge", 122, Rarity.COMMON, mage.cards.a.AggressiveUrge.class)); + cards.add(new SetCardInfo("Angrath, Minotaur Pirate", 201, Rarity.MYTHIC, mage.cards.a.AngrathMinotaurPirate.class)); cards.add(new SetCardInfo("Angrath's Ambusher", 202, Rarity.UNCOMMON, mage.cards.a.AngrathsAmbusher.class)); cards.add(new SetCardInfo("Angrath's Fury", 204, Rarity.RARE, mage.cards.a.AngrathsFury.class)); - cards.add(new SetCardInfo("Angrath, Minotaur Pirate", 201, Rarity.MYTHIC, mage.cards.a.AngrathMinotaurPirate.class)); cards.add(new SetCardInfo("Arterial Flow", 62, Rarity.UNCOMMON, mage.cards.a.ArterialFlow.class)); cards.add(new SetCardInfo("Atzal, Cave of Eternity", 160, Rarity.RARE, mage.cards.a.AtzalCaveOfEternity.class)); cards.add(new SetCardInfo("Atzocan Seer", 153, Rarity.UNCOMMON, mage.cards.a.AtzocanSeer.class)); @@ -84,8 +84,8 @@ public class RivalsOfIxalan extends ExpansionSet { 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("Etali, Primal Storm", 100, Rarity.RARE, mage.cards.e.EtaliPrimalStorm.class)); cards.add(new SetCardInfo("Enter the Unknown", 128, Rarity.UNCOMMON, mage.cards.e.EnterTheUnknown.class)); + cards.add(new SetCardInfo("Etali, Primal Storm", 100, Rarity.RARE, mage.cards.e.EtaliPrimalStorm.class)); cards.add(new SetCardInfo("Everdawn Champion", 6, Rarity.UNCOMMON, mage.cards.e.EverdawnChampion.class)); cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); cards.add(new SetCardInfo("Exultant Skymarcher", 7, Rarity.COMMON, mage.cards.e.ExultantSkymarcher.class)); @@ -103,10 +103,8 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); - cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); - cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); - cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Hadana's Climb", 158, Rarity.RARE, mage.cards.h.HadanasClimb.class)); + cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Highland Lake", 189, Rarity.UNCOMMON, mage.cards.h.HighlandLake.class)); cards.add(new SetCardInfo("Hunt the Weak", 133, Rarity.COMMON, mage.cards.h.HuntTheWeak.class)); cards.add(new SetCardInfo("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.class)); @@ -115,38 +113,47 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Jade Bearer", 134, Rarity.COMMON, mage.cards.j.JadeBearer.class)); cards.add(new SetCardInfo("Jadecraft Artisan", 135, Rarity.COMMON, mage.cards.j.JadecraftArtisan.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)); cards.add(new SetCardInfo("Jungleborn Pioneer", 137, Rarity.COMMON, mage.cards.j.JunglebornPioneer.class)); - cards.add(new SetCardInfo("Journey to Eternity", 160, Rarity.RARE, mage.cards.j.JourneyToEternity.class)); cards.add(new SetCardInfo("Kitesail Corsair", 41, Rarity.COMMON, mage.cards.k.KitesailCorsair.class)); cards.add(new SetCardInfo("Knight of the Stampede", 138, Rarity.COMMON, mage.cards.k.KnightOfTheStampede.class)); - cards.add(new SetCardInfo("Kumena's Awakening", 42, Rarity.RARE, mage.cards.k.KumenasAwakening.class)); cards.add(new SetCardInfo("Kumena, Tyrant of Orazca", 162, Rarity.MYTHIC, mage.cards.k.KumenaTyrantOfOrazca.class)); + cards.add(new SetCardInfo("Kumena's Awakening", 42, Rarity.RARE, mage.cards.k.KumenasAwakening.class)); cards.add(new SetCardInfo("Legion Conquistador", 11, Rarity.COMMON, mage.cards.l.LegionConquistador.class)); cards.add(new SetCardInfo("Legion Lieutenant", 163, Rarity.UNCOMMON, mage.cards.l.LegionLieutenant.class)); cards.add(new SetCardInfo("Luminous Bonds", 12, Rarity.COMMON, mage.cards.l.LuminousBonds.class)); cards.add(new SetCardInfo("Majestic Heliopterus", 13, Rarity.UNCOMMON, mage.cards.m.MajesticHeliopterus.class)); cards.add(new SetCardInfo("Martyr of Dusk", 14, Rarity.COMMON, mage.cards.m.MartyrOfDusk.class)); cards.add(new SetCardInfo("Mastermind's Acquisition", 77, Rarity.RARE, mage.cards.m.MastermindsAcquisition.class)); + cards.add(new SetCardInfo("Mausoleum Harpy", 78, Rarity.UNCOMMON, mage.cards.m.MausoleumHarpy.class)); cards.add(new SetCardInfo("Merfolk Mistbinder", 164, Rarity.UNCOMMON, mage.cards.m.MerfolkMistbinder.class)); + cards.add(new SetCardInfo("Metzali, Tower of Triumph", 165, Rarity.RARE, mage.cards.m.MetzaliTowerOfTriumph.class)); cards.add(new SetCardInfo("Mist-Cloaked Herald", 43, Rarity.COMMON, mage.cards.m.MistCloakedHerald.class)); cards.add(new SetCardInfo("Moment of Craving", 79, Rarity.COMMON, mage.cards.m.MomentOfCraving.class)); cards.add(new SetCardInfo("Moment of Triumph", 15, Rarity.COMMON, mage.cards.m.MomentOfTriumph.class)); cards.add(new SetCardInfo("Mountain", 195, Rarity.COMMON, mage.cards.basiclands.Mountain.class)); + cards.add(new SetCardInfo("Mutiny", 106, Rarity.COMMON, mage.cards.m.Mutiny.class)); cards.add(new SetCardInfo("Naturalize", 139, Rarity.COMMON, mage.cards.n.Naturalize.class)); cards.add(new SetCardInfo("Needletooth Raptor", 107, Rarity.UNCOMMON, mage.cards.n.NeedletoothRaptor.class)); cards.add(new SetCardInfo("Negate", 44, Rarity.COMMON, mage.cards.n.Negate.class)); cards.add(new SetCardInfo("Nezahal, Primal Tide", 45, Rarity.RARE, mage.cards.n.NezahalPrimalTide.class)); + cards.add(new SetCardInfo("Oathsworn Vampire", 80, Rarity.UNCOMMON, mage.cards.o.OathswornVampire.class)); cards.add(new SetCardInfo("Orazca Frillback", 140, Rarity.COMMON, OrazcaFrillback.class)); cards.add(new SetCardInfo("Orazca Raptor", 108, Rarity.COMMON, mage.cards.o.OrazcaRaptor.class)); + cards.add(new SetCardInfo("Orazca Relic", 181, Rarity.COMMON, mage.cards.o.OrazcaRelic.class)); cards.add(new SetCardInfo("Overgrown Armasaur", 141, Rarity.COMMON, mage.cards.o.OvergrownArmasaur.class)); cards.add(new SetCardInfo("Paladin of Atonement", 16, Rarity.RARE, mage.cards.p.PaladinOfAtonement.class)); cards.add(new SetCardInfo("Path of Discovery", 142, Rarity.RARE, mage.cards.p.PathOfDiscovery.class)); + cards.add(new SetCardInfo("Path of Mettle", 165, Rarity.RARE, mage.cards.p.PathOfMettle.class)); cards.add(new SetCardInfo("Pirate's Pillage", 109, Rarity.UNCOMMON, mage.cards.p.PiratesPillage.class)); + cards.add(new SetCardInfo("Pitiless Plunderer", 81, Rarity.UNCOMMON, mage.cards.p.PitilessPlunderer.class)); cards.add(new SetCardInfo("Plains", 192, Rarity.COMMON, mage.cards.basiclands.Plains.class)); cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class)); cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); + cards.add(new SetCardInfo("Pride of Conquerors", 17, Rarity.UNCOMMON, mage.cards.p.PrideOfConquerors.class)); cards.add(new SetCardInfo("Profane Procession", 166, Rarity.RARE, mage.cards.p.ProfaneProcession.class)); + cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); cards.add(new SetCardInfo("Raging Regisaur", 168, Rarity.UNCOMMON, mage.cards.r.RagingRegisaur.class)); cards.add(new SetCardInfo("Raptor Companion", 19, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); @@ -203,17 +210,17 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Tilonalli's Summoner", 121, Rarity.RARE, mage.cards.t.TilonallisSummoner.class)); cards.add(new SetCardInfo("Timestream Navigator", 59, Rarity.MYTHIC, mage.cards.t.TimestreamNavigator.class)); cards.add(new SetCardInfo("Tomb of the Dusk Rose", 166, Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); - cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); + cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Twilight Prophet", 88, Rarity.MYTHIC, mage.cards.t.TwilightProphet.class)); cards.add(new SetCardInfo("Vampire Champion", 198, Rarity.COMMON, mage.cards.v.VampireChampion.class)); cards.add(new SetCardInfo("Vampire Revenant", 89, Rarity.COMMON, mage.cards.v.VampireRevenant.class)); cards.add(new SetCardInfo("Vault of Catlacan", 173, Rarity.RARE, mage.cards.v.VaultOfCatlacan.class)); cards.add(new SetCardInfo("Vona's Hunger", 90, Rarity.RARE, mage.cards.v.VonasHunger.class)); cards.add(new SetCardInfo("Voracious Vampire", 91, Rarity.COMMON, mage.cards.v.VoraciousVampire.class)); + cards.add(new SetCardInfo("Vraska, Scheming Gorgon", 197, Rarity.MYTHIC, mage.cards.v.VraskaSchemingGorgon.class)); 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("Warkite Marauder", 60, Rarity.RARE, mage.cards.w.WarkiteMarauder.class)); cards.add(new SetCardInfo("Waterknot", 61, Rarity.COMMON, mage.cards.w.Waterknot.class)); cards.add(new SetCardInfo("Wayward Swordtooth", 150, Rarity.RARE, mage.cards.w.WaywardSwordtooth.class)); 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 index d96365b26e..5a54e93d4c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackBlockUnlessConditionSourceEffect.java @@ -40,7 +40,7 @@ import mage.game.permanent.Permanent; */ public class CantAttackBlockUnlessConditionSourceEffect extends RestrictionEffect { - private Condition condition; + private final Condition condition; public CantAttackBlockUnlessConditionSourceEffect(Condition condition) { super(Duration.WhileOnBattlefield); @@ -50,6 +50,7 @@ public class CantAttackBlockUnlessConditionSourceEffect extends RestrictionEffec public CantAttackBlockUnlessConditionSourceEffect(final CantAttackBlockUnlessConditionSourceEffect effect) { super(effect); + this.condition = effect.condition; } @Override diff --git a/Mage/src/main/java/mage/target/TargetPermanent.java b/Mage/src/main/java/mage/target/TargetPermanent.java index 32d143a04c..0098193177 100644 --- a/Mage/src/main/java/mage/target/TargetPermanent.java +++ b/Mage/src/main/java/mage/target/TargetPermanent.java @@ -200,4 +200,13 @@ public class TargetPermanent extends TargetObject { return new TargetPermanent(this); } + /** + * User carefully! + * + * @param filter + */ + public void replaceFilter(FilterPermanent filter) { + this.filter = filter; + this.targetName = filter.getMessage(); + } } From 3480d47d11e1ffcdc4f8447b4888fe315dc31dae Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 7 Jan 2018 10:54:15 +0100 Subject: [PATCH 48/51] [RIX] Added 7 cards. --- .../src/mage/cards/a/AdarkarValkyrie.java | 4 +- Mage.Sets/src/mage/cards/b/BoneToAsh.java | 14 +- .../src/mage/cards/e/EssenceBacklash.java | 14 +- Mage.Sets/src/mage/cards/g/GeistSnatch.java | 11 +- .../src/mage/cards/g/GleamingBarrier.java | 69 ++++++ .../src/mage/cards/g/GoldForgeGarrison.java | 80 +++++++ Mage.Sets/src/mage/cards/g/GoldenDemise.java | 74 +++++++ .../src/mage/cards/g/GoldenGuardian.java | 198 ++++++++++++++++++ Mage.Sets/src/mage/cards/g/GruesomeFate.java | 63 ++++++ Mage.Sets/src/mage/cards/h/Hornswoggle.java | 64 ++++++ .../mage/cards/h/HuatliRadiantChampion.java | 84 ++++++++ .../src/mage/cards/i/InducedAmnesia.java | 152 ++++++++++++++ .../src/mage/cards/o/OjutaisCommand.java | 28 +-- .../src/mage/cards/p/PsychicBarrier.java | 13 +- Mage.Sets/src/mage/cards/r/RemoveSoul.java | 14 +- .../src/mage/cards/s/SilumgarSorcerer.java | 17 +- .../src/mage/cards/s/SoulManipulation.java | 10 +- Mage.Sets/src/mage/cards/s/SoulswornJury.java | 13 +- Mage.Sets/src/mage/cards/s/SummonersBane.java | 11 +- Mage.Sets/src/mage/cards/t/TrapEssence.java | 16 +- Mage.Sets/src/mage/cards/w/WitheringBoon.java | 11 +- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 8 + .../main/java/mage/filter/StaticFilters.java | 1 + .../emblems/HuatliRadiantChampionEmblem.java | 52 +++++ .../token/GoldForgeGarrisonGolemToken.java | 28 +++ Utils/mtg-cards-data.txt | 4 +- 26 files changed, 920 insertions(+), 133 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/g/GleamingBarrier.java create mode 100644 Mage.Sets/src/mage/cards/g/GoldForgeGarrison.java create mode 100644 Mage.Sets/src/mage/cards/g/GoldenDemise.java create mode 100644 Mage.Sets/src/mage/cards/g/GoldenGuardian.java create mode 100644 Mage.Sets/src/mage/cards/g/GruesomeFate.java create mode 100644 Mage.Sets/src/mage/cards/h/Hornswoggle.java create mode 100644 Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java create mode 100644 Mage.Sets/src/mage/cards/i/InducedAmnesia.java create mode 100644 Mage/src/main/java/mage/game/command/emblems/HuatliRadiantChampionEmblem.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/GoldForgeGarrisonGolemToken.java diff --git a/Mage.Sets/src/mage/cards/a/AdarkarValkyrie.java b/Mage.Sets/src/mage/cards/a/AdarkarValkyrie.java index 3d954f13fb..ae3abfebab 100644 --- a/Mage.Sets/src/mage/cards/a/AdarkarValkyrie.java +++ b/Mage.Sets/src/mage/cards/a/AdarkarValkyrie.java @@ -63,7 +63,7 @@ public class AdarkarValkyrie extends CardImpl { } public AdarkarValkyrie(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); addSuperType(SuperType.SNOW); this.subtype.add(SubType.ANGEL); @@ -152,6 +152,6 @@ class AdarkarValkyrieDelayedTriggeredAbility extends DelayedTriggeredAbility { @Override public String getRule() { - return "When target creature other than Adarkar Valkyrie dies this turn, " + super.getRule(); + return "When target creature other than {this} dies this turn, " + super.getRule(); } } diff --git a/Mage.Sets/src/mage/cards/b/BoneToAsh.java b/Mage.Sets/src/mage/cards/b/BoneToAsh.java index 829b2c1a42..357d26b06b 100644 --- a/Mage.Sets/src/mage/cards/b/BoneToAsh.java +++ b/Mage.Sets/src/mage/cards/b/BoneToAsh.java @@ -33,8 +33,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -43,18 +42,11 @@ import mage.target.TargetSpell; */ public class BoneToAsh extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public BoneToAsh(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); // Counter target creature spell. - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); this.getSpellAbility().addEffect(new CounterTargetEffect()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/e/EssenceBacklash.java b/Mage.Sets/src/mage/cards/e/EssenceBacklash.java index 7a7aa59db8..5672d69a60 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceBacklash.java +++ b/Mage.Sets/src/mage/cards/e/EssenceBacklash.java @@ -34,8 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.stack.Spell; import mage.players.Player; @@ -47,18 +46,11 @@ import mage.target.TargetSpell; */ public class EssenceBacklash extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public EssenceBacklash(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{R}"); // Counter target creature spell. Essence Backlash deals damage equal to that spell's power to its controller. - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); this.getSpellAbility().addEffect(new EssenceBacklashEffect()); } diff --git a/Mage.Sets/src/mage/cards/g/GeistSnatch.java b/Mage.Sets/src/mage/cards/g/GeistSnatch.java index e107045669..6d7b17c0ea 100644 --- a/Mage.Sets/src/mage/cards/g/GeistSnatch.java +++ b/Mage.Sets/src/mage/cards/g/GeistSnatch.java @@ -34,8 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.token.SpiritBlueToken; import mage.game.permanent.token.Token; @@ -47,17 +46,11 @@ import mage.target.TargetSpell; */ public class GeistSnatch extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public GeistSnatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); // Counter target creature spell. Create a 1/1 blue Spirit creature token with flying. - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); this.getSpellAbility().addEffect(new GeistSnatchCounterTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/g/GleamingBarrier.java b/Mage.Sets/src/mage/cards/g/GleamingBarrier.java new file mode 100644 index 0000000000..b1ff6fc454 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GleamingBarrier.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.TreasureToken; + +/** + * + * @author LevelX2 + */ +public class GleamingBarrier extends CardImpl { + + public GleamingBarrier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // 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." + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new TreasureToken()))); + } + + public GleamingBarrier(final GleamingBarrier card) { + super(card); + } + + @Override + public GleamingBarrier copy() { + return new GleamingBarrier(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoldForgeGarrison.java b/Mage.Sets/src/mage/cards/g/GoldForgeGarrison.java new file mode 100644 index 0000000000..f056218b75 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoldForgeGarrison.java @@ -0,0 +1,80 @@ +/* + * 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.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.GenericManaCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.permanent.token.GoldForgeGarrisonGolemToken; + +/** + * + * @author LevelX2 + */ +public class GoldForgeGarrison extends CardImpl { + + public GoldForgeGarrison(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.nightCard = true; + + // (Transforms from Golden Guardian.) + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("(Transforms from Golden Guardian.)")); + ability.setRuleAtTheTop(true); + this.addAbility(ability); + + // {T}: Add two mana of any one color to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost())); + + // {4}, {T}: Create a 4/4 colorless Golem artifact creature token. + ability = new SimpleActivatedAbility(new CreateTokenEffect(new GoldForgeGarrisonGolemToken(), 1), new GenericManaCost(4)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public GoldForgeGarrison(final GoldForgeGarrison card) { + super(card); + } + + @Override + public GoldForgeGarrison copy() { + return new GoldForgeGarrison(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoldenDemise.java b/Mage.Sets/src/mage/cards/g/GoldenDemise.java new file mode 100644 index 0000000000..1de4a2f9f7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoldenDemise.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.abilities.effects.keyword.AscendEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class GoldenDemise extends CardImpl { + + public GoldenDemise(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); + + // Ascend + this.getSpellAbility().addEffect(new AscendEffect()); + + // 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. + FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control"); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + this.getSpellAbility().addEffect(new ConditionalContinuousEffect( + new BoostAllEffect(-2, -2, Duration.EndOfTurn, filter, false), + new BoostAllEffect(-2, -2, Duration.EndOfTurn), + CitysBlessingCondition.instance, + "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" + )); + } + + public GoldenDemise(final GoldenDemise card) { + super(card); + } + + @Override + public GoldenDemise copy() { + return new GoldenDemise(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoldenGuardian.java b/Mage.Sets/src/mage/cards/g/GoldenGuardian.java new file mode 100644 index 0000000000..a3171a7bfa --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoldenGuardian.java @@ -0,0 +1,198 @@ +/* + * 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.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class GoldenGuardian extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control"); + + static { + filter.add(new AnotherPredicate()); + } + + public GoldenGuardian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + + this.subtype.add(SubType.GOLEM); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.transformable = true; + this.secondSideCardClazz = GoldForgeGarrison.class; + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {2}: Golden Guardian fights another target creature you control. When Golden Guardian dies this turn, return it to the battlefield transformed under your control. + this.addAbility(new TransformAbility()); + Ability ability = new SimpleActivatedAbility(new GoldenGuardianEffect(), new GenericManaCost(2)); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new GoldenGuardianDelayedTriggeredAbility(), false)); + this.addAbility(ability); + + } + + public GoldenGuardian(final GoldenGuardian card) { + super(card); + } + + @Override + public GoldenGuardian copy() { + return new GoldenGuardian(this); + } +} + +class GoldenGuardianEffect extends OneShotEffect { + + public GoldenGuardianEffect() { + super(Outcome.Damage); + this.staticText = "{this} fights another target creature you control"; + } + + public GoldenGuardianEffect(final GoldenGuardianEffect effect) { + super(effect); + } + + @Override + public GoldenGuardianEffect copy() { + return new GoldenGuardianEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature1 = game.getPermanent(source.getSourceId()); + Permanent creature2 = game.getPermanent(source.getFirstTarget()); + // 20110930 - 701.10 + if (creature1 != null && creature2 != null) { + if (creature1.isCreature() && creature2.isCreature()) { + return creature1.fight(creature2, source, game); + } + } + return false; + } +} + +class GoldenGuardianDelayedTriggeredAbility extends DelayedTriggeredAbility { + + public GoldenGuardianDelayedTriggeredAbility() { + super(new GoldenGuardianReturnTransformedEffect(), Duration.EndOfTurn); + } + + public GoldenGuardianDelayedTriggeredAbility(final GoldenGuardianDelayedTriggeredAbility ability) { + super(ability); + } + + @Override + public GoldenGuardianDelayedTriggeredAbility copy() { + return new GoldenGuardianDelayedTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.ZONE_CHANGE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (((ZoneChangeEvent) event).isDiesEvent()) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "When {this} dies this turn, " + super.getRule(); + } +} + +class GoldenGuardianReturnTransformedEffect extends OneShotEffect { + + public GoldenGuardianReturnTransformedEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "return it to the battlefield transformed under your control"; + } + + public GoldenGuardianReturnTransformedEffect(final GoldenGuardianReturnTransformedEffect effect) { + super(effect); + } + + @Override + public GoldenGuardianReturnTransformedEffect copy() { + return new GoldenGuardianReturnTransformedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { + game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE); + Card card = game.getCard(source.getSourceId()); + if (card != null) { + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/g/GruesomeFate.java b/Mage.Sets/src/mage/cards/g/GruesomeFate.java new file mode 100644 index 0000000000..43e6d87424 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GruesomeFate.java @@ -0,0 +1,63 @@ +/* + * 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.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LevelX2 + */ +public class GruesomeFate extends CardImpl { + + public GruesomeFate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{7}{5}"); + + // Each opponent loses 1 life for each creature you control. + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + filter.add(new ControllerPredicate(TargetController.YOU)); + this.getSpellAbility().addEffect(new LoseLifeOpponentsEffect(new PermanentsOnBattlefieldCount(filter))); + } + + public GruesomeFate(final GruesomeFate card) { + super(card); + } + + @Override + public GruesomeFate copy() { + return new GruesomeFate(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/Hornswoggle.java b/Mage.Sets/src/mage/cards/h/Hornswoggle.java new file mode 100644 index 0000000000..e94df5944d --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/Hornswoggle.java @@ -0,0 +1,64 @@ +/* + * 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.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.TreasureToken; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class Hornswoggle extends CardImpl { + + public Hornswoggle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}"); + + // 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." + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken()) + .setText("You create a colorless Treasure artifact token with \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.\"")); + } + + public Hornswoggle(final Hornswoggle card) { + super(card); + } + + @Override + public Hornswoggle copy() { + return new Hornswoggle(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java b/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java new file mode 100644 index 0000000000..c9b3d1e9d7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuatliRadiantChampion.java @@ -0,0 +1,84 @@ +/* + * 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.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GetEmblemEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.command.emblems.HuatliRadiantChampionEmblem; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class HuatliRadiantChampion extends CardImpl { + + public HuatliRadiantChampion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUATLI); + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); + + // +1: Put a loyalty counter on Huatli, Radiant Champion for each creature you control. + this.addAbility(new LoyaltyAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), + new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED), true), 1)); + + // -1: Target creature gets +X/+X until end of turn, where X is the number of creatures you control. + PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED); + LoyaltyAbility ability2 = new LoyaltyAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true) + .setText("Target creature gets +X/+X until end of turn, where X is the number of creatures you control"), -1); + ability2.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability2); + + // -8: You get an emblem with "Whenever a creature enters the battlefield under your control, you may draw a card." + this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new HuatliRadiantChampionEmblem()), -8)); + } + + public HuatliRadiantChampion(final HuatliRadiantChampion card) { + super(card); + } + + @Override + public HuatliRadiantChampion copy() { + return new HuatliRadiantChampion(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/InducedAmnesia.java b/Mage.Sets/src/mage/cards/i/InducedAmnesia.java new file mode 100644 index 0000000000..2ee18e7057 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/InducedAmnesia.java @@ -0,0 +1,152 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.i; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class InducedAmnesia extends CardImpl { + + public InducedAmnesia(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + // When Induced Amnesia enters the battlefield, target player exiles all the cards in his or her hand face down, then draws that many cards. + Ability ability = new EntersBattlefieldTriggeredAbility(new InducedAmnesiaExileEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + // When Induced Amnesia is put into a graveyard from the battlefield, return the exiled cards to their owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new InducedAmnesiaReturnEffect())); + } + + public InducedAmnesia(final InducedAmnesia card) { + super(card); + } + + @Override + public InducedAmnesia copy() { + return new InducedAmnesia(this); + } +} + +class InducedAmnesiaExileEffect extends OneShotEffect { + + public InducedAmnesiaExileEffect() { + super(Outcome.Detriment); + this.staticText = "target player exiles all the cards in his or her hand face down, then draws that many cards"; + } + + public InducedAmnesiaExileEffect(final InducedAmnesiaExileEffect effect) { + super(effect); + } + + @Override + public InducedAmnesiaExileEffect copy() { + return new InducedAmnesiaExileEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (targetPlayer != null && sourcePermanent != null) { + int numberOfCards = targetPlayer.getHand().size(); + if (numberOfCards > 0) { + UUID exileId = CardUtil.getCardExileZoneId(game, source); + for (Card card : targetPlayer.getHand().getCards(game)) { + card.moveToExile(exileId, sourcePermanent.getName(), source.getSourceId(), game); + card.setFaceDown(true, game); + } + game.informPlayers(sourcePermanent.getLogName() + ": " + targetPlayer.getLogName() + " exiles his or her hand face down (" + numberOfCards + "card" + (numberOfCards > 1 ? "s" : "") + ')'); + game.applyEffects(); + targetPlayer.drawCards(numberOfCards, game); + } + return true; + } + return false; + } +} + +class InducedAmnesiaReturnEffect extends OneShotEffect { + + public InducedAmnesiaReturnEffect() { + super(Outcome.Benefit); + this.staticText = "return the exiled cards to their owner's hand"; + } + + public InducedAmnesiaReturnEffect(final InducedAmnesiaReturnEffect effect) { + super(effect); + } + + @Override + public InducedAmnesiaReturnEffect copy() { + return new InducedAmnesiaReturnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && sourcePermanent != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, source); + int numberOfCards = 0; + ExileZone exileZone = game.getExile().getExileZone(exileId); + if (exileZone != null) { + for (Card card : exileZone.getCards(game)) { + numberOfCards++; + card.moveToZone(Zone.HAND, source.getSourceId(), game, true); + card.setFaceDown(false, game); + } + } + if (numberOfCards > 0) { + game.informPlayers(sourcePermanent.getLogName() + ": " + controller.getLogName() + " returns " + numberOfCards + " card" + (numberOfCards > 1 ? "s" : "") + " from exile to hand"); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/o/OjutaisCommand.java b/Mage.Sets/src/mage/cards/o/OjutaisCommand.java index ab3f30fa84..7bc186227d 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaisCommand.java +++ b/Mage.Sets/src/mage/cards/o/OjutaisCommand.java @@ -38,9 +38,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; import mage.filter.FilterCard; -import mage.filter.FilterSpell; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureCard; -import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.target.TargetSpell; import mage.target.common.TargetCardInYourGraveyard; @@ -50,40 +49,35 @@ import mage.target.common.TargetCardInYourGraveyard; * @author fireshoes */ public class OjutaisCommand extends CardImpl { - + private static final FilterCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); + static { filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); } - - private static final FilterSpell filter2 = new FilterSpell("creature spell"); - static { - filter2.add(new CardTypePredicate(CardType.CREATURE)); - } - public OjutaisCommand(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{U}"); - // Choose two - + // Choose two - this.getSpellAbility().getModes().setMinModes(2); this.getSpellAbility().getModes().setMaxModes(2); - + // Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield; this.getSpellAbility().getEffects().add(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().getTargets().add(new TargetCardInYourGraveyard(filter)); - + // or You gain 4 life; Mode mode = new Mode(); mode.getEffects().add(new GainLifeEffect(4)); this.getSpellAbility().getModes().addMode(mode); - + // or Counter target creature spell; mode = new Mode(); - mode.getTargets().add(new TargetSpell(filter2)); + mode.getTargets().add(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); mode.getEffects().add(new CounterTargetEffect()); - this.getSpellAbility().getModes().addMode(mode); - + this.getSpellAbility().getModes().addMode(mode); + // or Draw a card mode = new Mode(); mode.getEffects().add(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/p/PsychicBarrier.java b/Mage.Sets/src/mage/cards/p/PsychicBarrier.java index 478f97d84e..4767faedb0 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicBarrier.java +++ b/Mage.Sets/src/mage/cards/p/PsychicBarrier.java @@ -33,8 +33,7 @@ import mage.abilities.effects.common.LoseLifeTargetControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -43,17 +42,11 @@ import mage.target.TargetSpell; */ public class PsychicBarrier extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public PsychicBarrier(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}"); // Counter target creature spell. Its controller loses 1 life. - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addEffect(new LoseLifeTargetControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/r/RemoveSoul.java b/Mage.Sets/src/mage/cards/r/RemoveSoul.java index 4b8fabf0f9..2ad14026b7 100644 --- a/Mage.Sets/src/mage/cards/r/RemoveSoul.java +++ b/Mage.Sets/src/mage/cards/r/RemoveSoul.java @@ -32,8 +32,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -42,17 +41,10 @@ import mage.target.TargetSpell; */ public class RemoveSoul extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public RemoveSoul(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); - - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); this.getSpellAbility().addEffect(new CounterTargetEffect()); } diff --git a/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java b/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java index 855e11a213..90f403e6cd 100644 --- a/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java +++ b/Mage.Sets/src/mage/cards/s/SilumgarSorcerer.java @@ -39,8 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -48,15 +47,9 @@ import mage.target.TargetSpell; * @author LevelX2 */ public class SilumgarSorcerer extends CardImpl { - - private static final FilterSpell filter = new FilterSpell("creature spell"); - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public SilumgarSorcerer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); @@ -68,11 +61,11 @@ public class SilumgarSorcerer extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Exploit (When this creature enters the battlefield, you may sacrifice a creature.) this.addAbility(new ExploitAbility()); - + // When Silumgar Sorcerer exploits a creature, counter target creature spell. Ability ability = new ExploitCreatureTriggeredAbility(new CounterTargetEffect(), false); - ability.addTarget(new TargetSpell(filter)); - this.addAbility(ability); + ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); + this.addAbility(ability); } public SilumgarSorcerer(final SilumgarSorcerer card) { diff --git a/Mage.Sets/src/mage/cards/s/SoulManipulation.java b/Mage.Sets/src/mage/cards/s/SoulManipulation.java index a351ce628d..719b4e9718 100644 --- a/Mage.Sets/src/mage/cards/s/SoulManipulation.java +++ b/Mage.Sets/src/mage/cards/s/SoulManipulation.java @@ -34,9 +34,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; import mage.filter.StaticFilters; -import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetSpell; import mage.target.common.TargetCardInYourGraveyard; @@ -46,12 +44,6 @@ import mage.target.common.TargetCardInYourGraveyard; */ public class SoulManipulation extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public SoulManipulation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{B}"); @@ -61,7 +53,7 @@ public class SoulManipulation extends CardImpl { // Counter target creature spell; this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); // and/or return target creature card from your graveyard to your hand. Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/cards/s/SoulswornJury.java b/Mage.Sets/src/mage/cards/s/SoulswornJury.java index 5efe3ad785..927a0b4d89 100644 --- a/Mage.Sets/src/mage/cards/s/SoulswornJury.java +++ b/Mage.Sets/src/mage/cards/s/SoulswornJury.java @@ -40,8 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -50,14 +49,8 @@ import mage.target.TargetSpell; */ public class SoulswornJury extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public SoulswornJury(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); @@ -67,7 +60,7 @@ public class SoulswornJury extends CardImpl { // {1}{U}, Sacrifice Soulsworn Jury: Counter target creature spell. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{1}{U}")); - ability.addTarget(new TargetSpell(filter)); + ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SummonersBane.java b/Mage.Sets/src/mage/cards/s/SummonersBane.java index 6a4ba14d8e..fc77065d18 100644 --- a/Mage.Sets/src/mage/cards/s/SummonersBane.java +++ b/Mage.Sets/src/mage/cards/s/SummonersBane.java @@ -33,8 +33,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.game.permanent.token.IllusionToken; import mage.target.TargetSpell; @@ -44,16 +43,10 @@ import mage.target.TargetSpell; */ public class SummonersBane extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public SummonersBane(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addEffect(new CreateTokenEffect(new IllusionToken())); } diff --git a/Mage.Sets/src/mage/cards/t/TrapEssence.java b/Mage.Sets/src/mage/cards/t/TrapEssence.java index 8b0a84c0c9..fde4becc7f 100644 --- a/Mage.Sets/src/mage/cards/t/TrapEssence.java +++ b/Mage.Sets/src/mage/cards/t/TrapEssence.java @@ -35,8 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.counters.CounterType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.SecondTargetPointer; @@ -47,24 +46,17 @@ import mage.target.targetpointer.SecondTargetPointer; */ public class TrapEssence extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } - public TrapEssence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{U}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}{U}{R}"); // Counter target creature spell. Put two +1/+1 counters on up to one target creature. this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)); effect.setText("Put two +1/+1 counters on up to one target creature"); effect.setTargetPointer(new SecondTargetPointer()); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(0,1)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1)); } public TrapEssence(final TrapEssence card) { diff --git a/Mage.Sets/src/mage/cards/w/WitheringBoon.java b/Mage.Sets/src/mage/cards/w/WitheringBoon.java index a00f3f6329..9685d9e4a5 100644 --- a/Mage.Sets/src/mage/cards/w/WitheringBoon.java +++ b/Mage.Sets/src/mage/cards/w/WitheringBoon.java @@ -33,8 +33,7 @@ import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -42,19 +41,15 @@ import mage.target.TargetSpell; * @author markedagain */ public class WitheringBoon extends CardImpl { - private static final FilterSpell filter = new FilterSpell("creature spell"); - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - } public WitheringBoon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); // As an additional cost to cast Withering Boon, pay 3 life. this.getSpellAbility().addCost(new PayLifeCost(3)); // Counter target creature spell. this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE)); } public WitheringBoon(final WitheringBoon card) { diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index b49f5fb614..03e3c619f8 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -104,16 +104,24 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Frilled Deathspitter", 104, Rarity.COMMON, mage.cards.f.FrilledDeathspitter.class)); cards.add(new SetCardInfo("Ghalta, Primal Hunger", 130, Rarity.RARE, mage.cards.g.GhaltaPrimalHunger.class)); cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); + cards.add(new SetCardInfo("Gleaming Barrier", 178, Rarity.COMMON, mage.cards.g.GleamingBarrier.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); + cards.add(new SetCardInfo("Gold-Forge Garrison", 179, Rarity.RARE, mage.cards.g.GoldForgeGarrison.class)); + cards.add(new SetCardInfo("Golden Demise", 73, Rarity.UNCOMMON, mage.cards.g.GoldenDemise.class)); + cards.add(new SetCardInfo("Golden Guardian", 179, Rarity.RARE, mage.cards.g.GoldenGuardian.class)); cards.add(new SetCardInfo("Grasping Scoundrel", 74, Rarity.COMMON, mage.cards.g.GraspingScoundrel.class)); + cards.add(new SetCardInfo("Gruesome Fate", 75, Rarity.COMMON, mage.cards.g.GruesomeFate.class)); + cards.add(new SetCardInfo("Hornswoggle", 39, Rarity.UNCOMMON, mage.cards.h.Hornswoggle.class)); cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Hadana's Climb", "158a", Rarity.RARE, mage.cards.h.HadanasClimb.class)); cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Highland Lake", 189, Rarity.UNCOMMON, mage.cards.h.HighlandLake.class)); + cards.add(new SetCardInfo("Huatli, Radiant Champion", 159, Rarity.MYTHIC, mage.cards.h.HuatliRadiantChampion.class)); cards.add(new SetCardInfo("Hunt the Weak", 133, Rarity.COMMON, mage.cards.h.HuntTheWeak.class)); cards.add(new SetCardInfo("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.class)); cards.add(new SetCardInfo("Imperial Ceratops", 10, Rarity.UNCOMMON, mage.cards.i.ImperialCeratops.class)); + cards.add(new SetCardInfo("Induced Amnesia", 40, Rarity.RARE, mage.cards.i.InducedAmnesia.class)); cards.add(new SetCardInfo("Island", 193, Rarity.COMMON, mage.cards.basiclands.Island.class)); cards.add(new SetCardInfo("Jade Bearer", 134, Rarity.COMMON, mage.cards.j.JadeBearer.class)); cards.add(new SetCardInfo("Jadecraft Artisan", 135, Rarity.COMMON, mage.cards.j.JadecraftArtisan.class)); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 6b6823ce81..7f6ba2b49d 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -74,6 +74,7 @@ public final class StaticFilters { public static final FilterPermanent FILTER_PERMANENT_NON_LAND = new FilterNonlandPermanent(); public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell"); + public static final FilterCreatureSpell FILTER_SPELL_CREATURE = new FilterCreatureSpell("creature spell"); public static final FilterSpell FILTER_SPELL_NON_CREATURE = (FilterSpell) new FilterSpell("noncreature spell").add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); diff --git a/Mage/src/main/java/mage/game/command/emblems/HuatliRadiantChampionEmblem.java b/Mage/src/main/java/mage/game/command/emblems/HuatliRadiantChampionEmblem.java new file mode 100644 index 0000000000..7a78737668 --- /dev/null +++ b/Mage/src/main/java/mage/game/command/emblems/HuatliRadiantChampionEmblem.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ..AS IS.. AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.game.command.emblems; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.command.Emblem; + +/** + * + * @author LevelX2 + */ +public class HuatliRadiantChampionEmblem extends Emblem { + + public HuatliRadiantChampionEmblem() { + this.setName("Emblem Huatli"); + + // Whenever a creature enters the battlefield under your control, you may draw a card. + Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.COMMAND, + new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_CONTROLLED_A_CREATURE, true); + this.getAbilities().add(ability); + this.setExpansionSetCodeForImage("RIX"); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/GoldForgeGarrisonGolemToken.java b/Mage/src/main/java/mage/game/permanent/token/GoldForgeGarrisonGolemToken.java new file mode 100644 index 0000000000..4cbf82d830 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/GoldForgeGarrisonGolemToken.java @@ -0,0 +1,28 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author LevelX2 + */ +public class GoldForgeGarrisonGolemToken extends Token { + + public GoldForgeGarrisonGolemToken() { + super("Golem", "4/4 colorless Golem artifact creature token"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + + subtype.add(SubType.GOLEM); + power = new MageInt(4); + toughness = new MageInt(4); + + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 4933120bc3..f9e2c86284 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32770,7 +32770,7 @@ Fathom Fleet Boarder|Rivals of Ixalan|71|C|{2}{B}|Creature - Orc Pirate|3|3|When 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.| Grasping Scoundrel|Rivals of Ixalan|74|C|{B}|Creature - Human Pirate|1|1|Grasping Scoundrel gets +1/+0 as long as it's attacking.| -Gruesome fate|Rivals of Ixalan|75|C|{7}{5}|Sorcery|||Each opponent loses 1 life for each creature you control.| +Gruesome Fate|Rivals of Ixalan|75|C|{7}{5}|Sorcery|||Each opponent loses 1 life for each creature you control.| Impale|Rivals of Ixalan|76|C|{2}{B}{B}|Sorcery|||Destroy target creature.| 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.| Mausoleum Harpy|Rivals of Ixalan|78|U|{4}{B}|Creature - Harpy|3|3|Flying$Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on Mausoleum Harpy. | @@ -32880,7 +32880,7 @@ Azor's Gateway|Rivals of Ixalan|176|M|{2}|Legendary Artifact|||{1}, {t}: Draw a 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.| +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.| Orazca Relic|Rivals of Ixalan|181|C|{3}|Artifact|||Ascend (If you control ten or more permanents, you gain the city's blessing for the rest of the game.)${T}: Add {C} to your mana pool.${T}, Sacrifice Orazca Relic: You gain 3 life and draw a card. Activate this ability only if you have the city's blessing.| From fafc94d4d69f71d8489072ed230f52c3fbb3e620 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 7 Jan 2018 10:57:40 +0100 Subject: [PATCH 49/51] [RIX] Fixed set card list. --- Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 03e3c619f8..caf667cc3f 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -78,10 +78,10 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Crested Herdcaller", 126, Rarity.UNCOMMON, mage.cards.c.CrestedHerdcaller.class)); cards.add(new SetCardInfo("Daring Buccaneer", 98, Rarity.UNCOMMON, mage.cards.d.DaringBuccaneer.class)); cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); + cards.add(new SetCardInfo("Dinosaur Hunter", 67, Rarity.COMMON, mage.cards.d.DinosaurHunter.class)); cards.add(new SetCardInfo("Dire Fleet Daredevil", 99, Rarity.RARE, mage.cards.d.DireFleetDaredevil.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("Dinosaur Hunter", 67, Rarity.COMMON, mage.cards.d.DinosaurHunter.class)); cards.add(new SetCardInfo("Divine Verdict", 5, Rarity.COMMON, mage.cards.d.DivineVerdict.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)); @@ -106,17 +106,15 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Giltgrove Stalker", 131, Rarity.COMMON, mage.cards.g.GiltgroveStalker.class)); cards.add(new SetCardInfo("Gleaming Barrier", 178, Rarity.COMMON, mage.cards.g.GleamingBarrier.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); - cards.add(new SetCardInfo("Gold-Forge Garrison", 179, Rarity.RARE, mage.cards.g.GoldForgeGarrison.class)); cards.add(new SetCardInfo("Golden Demise", 73, Rarity.UNCOMMON, mage.cards.g.GoldenDemise.class)); cards.add(new SetCardInfo("Golden Guardian", 179, Rarity.RARE, mage.cards.g.GoldenGuardian.class)); + cards.add(new SetCardInfo("Gold-Forge Garrison", 179, Rarity.RARE, mage.cards.g.GoldForgeGarrison.class)); cards.add(new SetCardInfo("Grasping Scoundrel", 74, Rarity.COMMON, mage.cards.g.GraspingScoundrel.class)); cards.add(new SetCardInfo("Gruesome Fate", 75, Rarity.COMMON, mage.cards.g.GruesomeFate.class)); - cards.add(new SetCardInfo("Hornswoggle", 39, Rarity.UNCOMMON, mage.cards.h.Hornswoggle.class)); - cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); - cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Hadana's Climb", "158a", Rarity.RARE, mage.cards.h.HadanasClimb.class)); cards.add(new SetCardInfo("Hardy Veteran", 132, Rarity.COMMON, mage.cards.h.HardyVeteran.class)); cards.add(new SetCardInfo("Highland Lake", 189, Rarity.UNCOMMON, mage.cards.h.HighlandLake.class)); + cards.add(new SetCardInfo("Hornswoggle", 39, Rarity.UNCOMMON, mage.cards.h.Hornswoggle.class)); cards.add(new SetCardInfo("Huatli, Radiant Champion", 159, Rarity.MYTHIC, mage.cards.h.HuatliRadiantChampion.class)); cards.add(new SetCardInfo("Hunt the Weak", 133, Rarity.COMMON, mage.cards.h.HuntTheWeak.class)); cards.add(new SetCardInfo("Impale", 76, Rarity.COMMON, mage.cards.i.Impale.class)); @@ -165,13 +163,14 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Plummet", 143, Rarity.COMMON, mage.cards.p.Plummet.class)); cards.add(new SetCardInfo("Polyraptor", 144, Rarity.MYTHIC, mage.cards.p.Polyraptor.class)); cards.add(new SetCardInfo("Pride of Conquerors", 17, Rarity.UNCOMMON, mage.cards.p.PrideOfConquerors.class)); - cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); - cards.add(new SetCardInfo("Protean Raider", 167, Rarity.RARE, mage.cards.p.ProteanRaider.class)); cards.add(new SetCardInfo("Profane Procession", "166a", Rarity.RARE, mage.cards.p.ProfaneProcession.class)); + cards.add(new SetCardInfo("Protean Raider", 167, Rarity.RARE, mage.cards.p.ProteanRaider.class)); + cards.add(new SetCardInfo("Radiant Destiny", 18, Rarity.RARE, mage.cards.r.RadiantDestiny.class)); cards.add(new SetCardInfo("Raging Regisaur", 168, Rarity.UNCOMMON, mage.cards.r.RagingRegisaur.class)); cards.add(new SetCardInfo("Raptor Companion", 19, Rarity.COMMON, mage.cards.r.RaptorCompanion.class)); cards.add(new SetCardInfo("Ravenous Chupacabra", 82, Rarity.COMMON, mage.cards.r.RavenousChupacabra.class)); cards.add(new SetCardInfo("Reaver Ambush", 83, Rarity.UNCOMMON, mage.cards.r.ReaverAmbush.class)); + cards.add(new SetCardInfo("Reckless Rage", 110, Rarity.UNCOMMON, mage.cards.r.RecklessRage.class)); cards.add(new SetCardInfo("Recover", 84, Rarity.COMMON, mage.cards.r.Recover.class)); cards.add(new SetCardInfo("Rekindling Phoenix", 111, Rarity.MYTHIC, mage.cards.r.RekindlingPhoenix.class)); cards.add(new SetCardInfo("Relentless Raptor", 169, Rarity.UNCOMMON, mage.cards.r.RelentlessRaptor.class)); @@ -180,7 +179,6 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("River Darter", 47, Rarity.COMMON, mage.cards.r.RiverDarter.class)); cards.add(new SetCardInfo("Riverwise Augur", 48, Rarity.UNCOMMON, mage.cards.r.RiverwiseAugur.class)); cards.add(new SetCardInfo("Sadistic Skymarcher", 85, Rarity.UNCOMMON, mage.cards.s.SadisticSkymarcher.class)); - cards.add(new SetCardInfo("Reckless Rage", 110, Rarity.UNCOMMON, mage.cards.r.RecklessRage.class)); cards.add(new SetCardInfo("Sailor of Means", 49, Rarity.COMMON, mage.cards.s.SailorOfMeans.class)); cards.add(new SetCardInfo("Sanctum of the Sun", "176b", Rarity.MYTHIC, mage.cards.s.SanctumOfTheSun.class)); cards.add(new SetCardInfo("Sanguine Glorifier", 20, Rarity.COMMON, mage.cards.s.SanguineGlorifier.class)); @@ -211,13 +209,13 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Strength of the Pack", 145, Rarity.UNCOMMON, mage.cards.s.StrengthOfThePack.class)); cards.add(new SetCardInfo("Strider Harness", 183, Rarity.COMMON, mage.cards.s.StriderHarness.class)); cards.add(new SetCardInfo("Sun Sentinel", 26, Rarity.COMMON, mage.cards.s.SunSentinel.class)); + cards.add(new SetCardInfo("Sun-Collared Raptor", 118, Rarity.COMMON, mage.cards.s.SunCollaredRaptor.class)); + cards.add(new SetCardInfo("Sun-Crested Pterodon", 27, Rarity.COMMON, mage.cards.s.SunCrestedPterodon.class)); cards.add(new SetCardInfo("Swab Goblin", 203, Rarity.COMMON, mage.cards.s.SwabGoblin.class)); + cards.add(new SetCardInfo("Swaggering Corsair", 119, Rarity.COMMON, mage.cards.s.SwaggeringCorsair.class)); cards.add(new SetCardInfo("Swamp", 194, Rarity.COMMON, mage.cards.basiclands.Swamp.class)); cards.add(new SetCardInfo("Swift Warden", 146, Rarity.UNCOMMON, mage.cards.s.SwiftWarden.class)); cards.add(new SetCardInfo("Sworn Guardian", 58, Rarity.COMMON, mage.cards.s.SwornGuardian.class)); - cards.add(new SetCardInfo("Sun-Collared Raptor", 118, Rarity.COMMON, mage.cards.s.SunCollaredRaptor.class)); - cards.add(new SetCardInfo("Sun-Crested Pterodon", 27, Rarity.COMMON, mage.cards.s.SunCrestedPterodon.class)); - cards.add(new SetCardInfo("Swaggering Corsair", 119, Rarity.COMMON, mage.cards.s.SwaggeringCorsair.class)); cards.add(new SetCardInfo("Temple Altisaur", 28, Rarity.RARE, mage.cards.t.TempleAltisaur.class)); cards.add(new SetCardInfo("Tendershoot Dryad", 147, Rarity.RARE, mage.cards.t.TendershootDryad.class)); cards.add(new SetCardInfo("Tetzimoc, Primal Death", 86, Rarity.RARE, mage.cards.t.TetzimocPrimalDeath.class)); @@ -229,7 +227,6 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Timestream Navigator", 59, Rarity.MYTHIC, mage.cards.t.TimestreamNavigator.class)); cards.add(new SetCardInfo("Tomb of the Dusk Rose", "166b", Rarity.RARE, mage.cards.t.TombOfTheDuskRose.class)); cards.add(new SetCardInfo("Tomb Robber", 87, Rarity.RARE, mage.cards.t.TombRobber.class)); - cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Trapjaw Tyrant", 29, Rarity.MYTHIC, mage.cards.t.TrapjawTyrant.class)); cards.add(new SetCardInfo("Traveler's Amulet", 184, Rarity.COMMON, mage.cards.t.TravelersAmulet.class)); cards.add(new SetCardInfo("Twilight Prophet", 88, Rarity.MYTHIC, mage.cards.t.TwilightProphet.class)); From e997022de632f2cab037d6ac1ce75edbde438fb2 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 7 Jan 2018 12:25:46 +0100 Subject: [PATCH 50/51] [RIX] Fixed set card [RIX] Added 7 cards. --- Mage.Sets/src/mage/cards/b/Brainbite.java | 5 +- Mage.Sets/src/mage/cards/d/DarkInquiry.java | 60 +++++ Mage.Sets/src/mage/cards/d/DeadMansChest.java | 229 ++++++++++++++++++ .../src/mage/cards/d/DeadeyeBrawler.java | 78 ++++++ .../src/mage/cards/d/DeadeyeRigHauler.java | 73 ++++++ .../src/mage/cards/e/ExpelFromOrazca.java | 71 ++++++ .../src/mage/cards/f/FathomFleetBoarder.java | 81 +++++++ .../src/mage/cards/f/FormOfTheDinosaur.java | 103 ++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 11 +- 9 files changed, 705 insertions(+), 6 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/d/DarkInquiry.java create mode 100644 Mage.Sets/src/mage/cards/d/DeadMansChest.java create mode 100644 Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java create mode 100644 Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java create mode 100644 Mage.Sets/src/mage/cards/e/ExpelFromOrazca.java create mode 100644 Mage.Sets/src/mage/cards/f/FathomFleetBoarder.java create mode 100644 Mage.Sets/src/mage/cards/f/FormOfTheDinosaur.java diff --git a/Mage.Sets/src/mage/cards/b/Brainbite.java b/Mage.Sets/src/mage/cards/b/Brainbite.java index e9e04a740e..a2ce6a2afd 100644 --- a/Mage.Sets/src/mage/cards/b/Brainbite.java +++ b/Mage.Sets/src/mage/cards/b/Brainbite.java @@ -42,10 +42,7 @@ import mage.target.common.TargetOpponent; public class Brainbite extends CardImpl { public Brainbite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{B}"); - - - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{B}"); // Target opponent reveals his or her hand. You choose a card from it. That player discards that card. this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/d/DarkInquiry.java b/Mage.Sets/src/mage/cards/d/DarkInquiry.java new file mode 100644 index 0000000000..091417e158 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DarkInquiry.java @@ -0,0 +1,60 @@ +/* + * 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.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class DarkInquiry extends CardImpl { + + public DarkInquiry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); + + // Target opponent reveals his or her hand. You choose a non land card from it. That player discards that card. + this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(StaticFilters.FILTER_CARD_A_NON_LAND)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public DarkInquiry(final DarkInquiry card) { + super(card); + } + + @Override + public DarkInquiry copy() { + return new DarkInquiry(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadMansChest.java b/Mage.Sets/src/mage/cards/d/DeadMansChest.java new file mode 100644 index 0000000000..b76c47f001 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadMansChest.java @@ -0,0 +1,229 @@ +/* + * 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.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.DiesAttachedTriggeredAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.AsThoughManaEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.ManaType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.ManaPoolItem; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class DeadMansChest extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public DeadMansChest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature an opponent controls + TargetPermanent auraTarget = new TargetPermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // 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. + this.addAbility(new DiesAttachedTriggeredAbility(new DeadMansChestEffect(), "enchanted creature", false)); + } + + public DeadMansChest(final DeadMansChest card) { + super(card); + } + + @Override + public DeadMansChest copy() { + return new DeadMansChest(this); + } +} + +class DeadMansChestEffect extends OneShotEffect { + + public DeadMansChestEffect() { + super(Outcome.Benefit); + this.staticText = "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"; + } + + public DeadMansChestEffect(final DeadMansChestEffect effect) { + super(effect); + } + + @Override + public DeadMansChestEffect copy() { + return new DeadMansChestEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + Permanent attachedTo = (Permanent) getValue("attachedTo"); + if (controller != null && sourceObject != null && attachedTo != null) { + Player owner = game.getPlayer(attachedTo.getOwnerId()); + int amount = attachedTo.getPower().getValue(); + if (owner != null && amount > 0) { + Set cards = controller.getLibrary().getTopCards(game, amount); + if (!cards.isEmpty()) { + controller.moveCardsToExile(cards, source, game, true, source.getSourceId(), sourceObject.getLogName()); + for (Card card : cards) { + if (!card.isLand()) { + ContinuousEffect effect = new DeadMansChestCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + game.addEffect(effect, source); + effect = new DeadMansChestSpendManaEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + game.addEffect(effect, source); + } + } + } + } + return true; + } + return false; + } +} + +class DeadMansChestCastFromExileEffect extends AsThoughEffectImpl { + + public DeadMansChestCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); + staticText = "You may cast nonland cards from among them as long as they remain exiled"; + } + + public DeadMansChestCastFromExileEffect(final DeadMansChestCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public DeadMansChestCastFromExileEffect copy() { + return new DeadMansChestCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (objectId.equals(getTargetPointer().getFirst(game, source))) { + if (affectedControllerId.equals(source.getControllerId())) { + return true; + } + } else { + if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) { + // object has moved zone so effect can be discarted + this.discard(); + } + } + return false; + } +} + +class DeadMansChestSpendManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { + + public DeadMansChestSpendManaEffect() { + super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.Custom, Outcome.Benefit); + staticText = "and you may spend mana as though it were mana of any type to cast those spells"; + } + + public DeadMansChestSpendManaEffect(final DeadMansChestSpendManaEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public DeadMansChestSpendManaEffect copy() { + return new DeadMansChestSpendManaEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (objectId.equals(((FixedTarget) getTargetPointer()).getTarget()) + && game.getState().getZoneChangeCounter(objectId) <= ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1) { + + if (affectedControllerId.equals(source.getControllerId())) { + // if the card moved from exile to spell the zone change counter is increased by 1 + if (game.getState().getZoneChangeCounter(objectId) == ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1) { + return true; + } + } + + } else { + if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) { + // object has moved zone so effect can be discarted + this.discard(); + } + } + return false; + } + + @Override + public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { + return mana.getFirstAvailable(); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java b/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java new file mode 100644 index 0000000000..6f88d3c026 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.AscendAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author LevelX2 + */ +public class DeadeyeBrawler extends CardImpl { + + public DeadeyeBrawler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // Ascend + this.addAbility(new AscendAbility()); + + // Whenever Deadeye Brawler deals combat damage to a player, if you have the city's blessing, draw a card. + this.addAbility(new ConditionalTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility( + new DrawCardSourceControllerEffect(1), false, false), CitysBlessingCondition.instance, + "Whenever {this} deals combat damage to a player, if you have the city's blessing, draw a card.")); + + } + + public DeadeyeBrawler(final DeadeyeBrawler card) { + super(card); + } + + @Override + public DeadeyeBrawler copy() { + return new DeadeyeBrawler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java b/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java new file mode 100644 index 0000000000..57d5ba84fd --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.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.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author LevelX2 + */ +public class DeadeyeRigHauler extends CardImpl { + + public DeadeyeRigHauler(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(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. + Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true), RaidCondition.instance, + "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, you may return target creature to its owner's hand."); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public DeadeyeRigHauler(final DeadeyeRigHauler card) { + super(card); + } + + @Override + public DeadeyeRigHauler copy() { + return new DeadeyeRigHauler(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/ExpelFromOrazca.java b/Mage.Sets/src/mage/cards/e/ExpelFromOrazca.java new file mode 100644 index 0000000000..29840f64b0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ExpelFromOrazca.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.e; + +import java.util.UUID; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.keyword.AscendEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author LevelX2 + */ +public class ExpelFromOrazca extends CardImpl { + + public ExpelFromOrazca(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + // Ascend + this.getSpellAbility().addEffect(new AscendEffect()); + + // Return target nonland permanent to its owner's hand. If you have the city's blessing, you may put that permanent on top of its owner's library instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new PutOnLibraryTargetEffect(true), + new ReturnToHandTargetEffect(), + CitysBlessingCondition.instance, + "Return target nonland permanent to its owner's hand. If you have the city's blessing, you may put that permanent on top of its owner's library instead" + )); + this.getSpellAbility().addTarget(new TargetNonlandPermanent()); + } + + public ExpelFromOrazca(final ExpelFromOrazca card) { + super(card); + } + + @Override + public ExpelFromOrazca copy() { + return new ExpelFromOrazca(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetBoarder.java b/Mage.Sets/src/mage/cards/f/FathomFleetBoarder.java new file mode 100644 index 0000000000..ae6e45938d --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FathomFleetBoarder.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.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author LevelX2 + */ +public class FathomFleetBoarder extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control another Pirate"); + + static { + filter.add(new SubtypePredicate(SubType.PIRATE)); + filter.add(new AnotherPredicate()); + } + + public FathomFleetBoarder(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Fathom Fleet Boarder enters the battlefield, you lose 2 life unless you control another Pirate. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new ConditionalOneShotEffect(new LoseLifeSourceControllerEffect(2), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), + "you lose 2 life unless you control another Pirate"), + false)); + } + + public FathomFleetBoarder(final FathomFleetBoarder card) { + super(card); + } + + @Override + public FathomFleetBoarder copy() { + return new FathomFleetBoarder(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FormOfTheDinosaur.java b/Mage.Sets/src/mage/cards/f/FormOfTheDinosaur.java new file mode 100644 index 0000000000..6a7b364ac5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FormOfTheDinosaur.java @@ -0,0 +1,103 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SetPlayerLifeSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class FormOfTheDinosaur extends CardImpl { + + public FormOfTheDinosaur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}{R}"); + + // When Form of the Dinosaur enters the battlefield, your life total becomes 15. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SetPlayerLifeSourceEffect(15), false)); + + // At the beginning of your upkeep, Form of the Dinosaur deals 15 damage to target creature an opponent controls and that creature deals damage equal to its power to you. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new FormOfTheDinosaurEffect(), TargetController.YOU, false); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + public FormOfTheDinosaur(final FormOfTheDinosaur card) { + super(card); + } + + @Override + public FormOfTheDinosaur copy() { + return new FormOfTheDinosaur(this); + } +} + +class FormOfTheDinosaurEffect extends OneShotEffect { + + public FormOfTheDinosaurEffect() { + super(Outcome.Damage); + this.staticText = "{this} deals 15 damage to target creature an opponent controls and that creature deals damage equal to its power to you"; + } + + public FormOfTheDinosaurEffect(final FormOfTheDinosaurEffect effect) { + super(effect); + } + + @Override + public FormOfTheDinosaurEffect copy() { + return new FormOfTheDinosaurEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (targetCreature != null) { + targetCreature.damage(15, source.getSourceId(), game, false, true); + controller.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index caf667cc3f..608eb9a683 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -77,6 +77,10 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Colossal Dreadmaw", 125, Rarity.COMMON, mage.cards.c.ColossalDreadmaw.class)); cards.add(new SetCardInfo("Crested Herdcaller", 126, Rarity.UNCOMMON, mage.cards.c.CrestedHerdcaller.class)); cards.add(new SetCardInfo("Daring Buccaneer", 98, Rarity.UNCOMMON, mage.cards.d.DaringBuccaneer.class)); + cards.add(new SetCardInfo("Dark Inquiry", 65, Rarity.COMMON, mage.cards.d.DarkInquiry.class)); + cards.add(new SetCardInfo("Dead Man's Chest", 66, Rarity.RARE, mage.cards.d.DeadMansChest.class)); + cards.add(new SetCardInfo("Deadeye Brawler", 155, Rarity.UNCOMMON, mage.cards.d.DeadeyeBrawler.class)); + cards.add(new SetCardInfo("Deadeye Rig-Hauler", 36, Rarity.COMMON, mage.cards.d.DeadeyeRigHauler.class)); cards.add(new SetCardInfo("Deeproot Elite", 127, Rarity.RARE, mage.cards.d.DeeprootElite.class)); cards.add(new SetCardInfo("Dinosaur Hunter", 67, Rarity.COMMON, mage.cards.d.DinosaurHunter.class)); cards.add(new SetCardInfo("Dire Fleet Daredevil", 99, Rarity.RARE, mage.cards.d.DireFleetDaredevil.class)); @@ -90,15 +94,18 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Etali, Primal Storm", 100, Rarity.RARE, mage.cards.e.EtaliPrimalStorm.class)); cards.add(new SetCardInfo("Everdawn Champion", 6, Rarity.UNCOMMON, mage.cards.e.EverdawnChampion.class)); cards.add(new SetCardInfo("Evolving Wilds", 186, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); + cards.add(new SetCardInfo("Expel From Orazca", 37, Rarity.UNCOMMON, mage.cards.e.ExpelFromOrazca.class)); cards.add(new SetCardInfo("Exultant Skymarcher", 7, Rarity.COMMON, mage.cards.e.ExultantSkymarcher.class)); cards.add(new SetCardInfo("Famished Paladin", 8, Rarity.UNCOMMON, mage.cards.f.FamishedPaladin.class)); cards.add(new SetCardInfo("Fanatical Firebrand", 101, Rarity.COMMON, mage.cards.f.FanaticalFirebrand.class)); + cards.add(new SetCardInfo("Fathom Fleet Boarder", 71, Rarity.COMMON, mage.cards.f.FathomFleetBoarder.class)); cards.add(new SetCardInfo("Flood of Recollection", 38, Rarity.UNCOMMON, mage.cards.f.FloodOfRecollection.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)); cards.add(new SetCardInfo("Forerunner of the Legion", 9, Rarity.UNCOMMON, mage.cards.f.ForerunnerOfTheLegion.class)); cards.add(new SetCardInfo("Forest", 196, Rarity.COMMON, mage.cards.basiclands.Forest.class)); + cards.add(new SetCardInfo("Form of the Dinosaur", 103, Rarity.RARE, mage.cards.f.FormOfTheDinosaur.class)); cards.add(new SetCardInfo("Forsaken Sanctuary", 187, Rarity.UNCOMMON, mage.cards.f.ForsakenSanctuary.class)); cards.add(new SetCardInfo("Foul Orchard", 188, Rarity.UNCOMMON, mage.cards.f.FoulOrchard.class)); cards.add(new SetCardInfo("Frilled Deathspitter", 104, Rarity.COMMON, mage.cards.f.FrilledDeathspitter.class)); @@ -107,8 +114,8 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Gleaming Barrier", 178, Rarity.COMMON, mage.cards.g.GleamingBarrier.class)); cards.add(new SetCardInfo("Goblin Trailblazer", 105, Rarity.COMMON, mage.cards.g.GoblinTrailblazer.class)); cards.add(new SetCardInfo("Golden Demise", 73, Rarity.UNCOMMON, mage.cards.g.GoldenDemise.class)); - cards.add(new SetCardInfo("Golden Guardian", 179, Rarity.RARE, mage.cards.g.GoldenGuardian.class)); - cards.add(new SetCardInfo("Gold-Forge Garrison", 179, Rarity.RARE, mage.cards.g.GoldForgeGarrison.class)); + cards.add(new SetCardInfo("Golden Guardian", "179a", Rarity.RARE, mage.cards.g.GoldenGuardian.class)); + cards.add(new SetCardInfo("Gold-Forge Garrison", "179b", Rarity.RARE, mage.cards.g.GoldForgeGarrison.class)); cards.add(new SetCardInfo("Grasping Scoundrel", 74, Rarity.COMMON, mage.cards.g.GraspingScoundrel.class)); cards.add(new SetCardInfo("Gruesome Fate", 75, Rarity.COMMON, mage.cards.g.GruesomeFate.class)); cards.add(new SetCardInfo("Hadana's Climb", "158a", Rarity.RARE, mage.cards.h.HadanasClimb.class)); From 0e119ffa01c103cfb81f7ed47b0831c149ff1e81 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 7 Jan 2018 13:29:40 +0100 Subject: [PATCH 51/51] [RIX] Fixed set card [RIX] Added 5 cards. --- .../src/mage/cards/c/ChargingTuskodon.java | 115 ++++++++++++++++ Mage.Sets/src/mage/cards/c/CleansingRay.java | 74 +++++++++++ .../src/mage/cards/c/CraftyCutpurse.java | 123 ++++++++++++++++++ Mage.Sets/src/mage/cards/c/CrashingTide.java | 81 ++++++++++++ .../src/mage/cards/c/CuriousObsession.java | 97 ++++++++++++++ Mage.Sets/src/mage/sets/RivalsOfIxalan.java | 5 + .../common/AttackedThisStepCondition.java | 1 + .../common/AttackedThisTurnCondition.java | 25 ++++ .../SacrificeSourceUnlessConditionEffect.java | 3 + 9 files changed, 524 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ChargingTuskodon.java create mode 100644 Mage.Sets/src/mage/cards/c/CleansingRay.java create mode 100644 Mage.Sets/src/mage/cards/c/CraftyCutpurse.java create mode 100644 Mage.Sets/src/mage/cards/c/CrashingTide.java create mode 100644 Mage.Sets/src/mage/cards/c/CuriousObsession.java create mode 100644 Mage/src/main/java/mage/abilities/condition/common/AttackedThisTurnCondition.java diff --git a/Mage.Sets/src/mage/cards/c/ChargingTuskodon.java b/Mage.Sets/src/mage/cards/c/ChargingTuskodon.java new file mode 100644 index 0000000000..8af07485e0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChargingTuskodon.java @@ -0,0 +1,115 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamageEvent; +import mage.game.events.GameEvent; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class ChargingTuskodon extends CardImpl { + + public ChargingTuskodon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // If Charging Tuskodon would deal combat damage to a player, it deals double that damage to that player instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ChargingTuskodonEffect())); + } + + public ChargingTuskodon(final ChargingTuskodon card) { + super(card); + } + + @Override + public ChargingTuskodon copy() { + return new ChargingTuskodon(this); + } +} + +class ChargingTuskodonEffect extends ReplacementEffectImpl { + + public ChargingTuskodonEffect() { + super(Duration.WhileOnBattlefield, Outcome.Damage); + staticText = "If {this} would deal combat damage to a player, it deals double that damage to that player instead"; + } + + public ChargingTuskodonEffect(final ChargingTuskodonEffect effect) { + super(effect); + } + + @Override + public ChargingTuskodonEffect copy() { + return new ChargingTuskodonEffect(this); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.getSourceId().equals(event.getSourceId()) && ((DamageEvent) event).isCombatDamage(); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + event.setAmount(CardUtil.addWithOverflowCheck(event.getAmount(), event.getAmount())); + return false; + } + +} diff --git a/Mage.Sets/src/mage/cards/c/CleansingRay.java b/Mage.Sets/src/mage/cards/c/CleansingRay.java new file mode 100644 index 0000000000..6fe7328039 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CleansingRay.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author LevelX2 + */ +public class CleansingRay extends CardImpl { + + public CleansingRay(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}"); + + // Choose one - + // - Destroy target Vampire. + getSpellAbility().addEffect(new DestroyTargetEffect()); + FilterPermanent filter = new FilterPermanent("Vampire"); + filter.add(new SubtypePredicate(SubType.VAMPIRE)); + getSpellAbility().addTarget(new TargetPermanent(filter)); + + // - Destroy target enchantment. + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetEnchantmentPermanent()); + this.getSpellAbility().addMode(mode); + + } + + public CleansingRay(final CleansingRay card) { + super(card); + } + + @Override + public CleansingRay copy() { + return new CleansingRay(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CraftyCutpurse.java b/Mage.Sets/src/mage/cards/c/CraftyCutpurse.java new file mode 100644 index 0000000000..a65d349b58 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CraftyCutpurse.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.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class CraftyCutpurse extends CardImpl { + + public CraftyCutpurse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + 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()); + + // When Crafty Cutpurse enters the battlefield, each token that would be created under an opponent's control this turn is created under your control instead. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CraftyCutpurseReplacementEffect(), false)); + + } + + public CraftyCutpurse(final CraftyCutpurse card) { + super(card); + } + + @Override + public CraftyCutpurse copy() { + return new CraftyCutpurse(this); + } +} + +class CraftyCutpurseReplacementEffect extends ReplacementEffectImpl { + + public CraftyCutpurseReplacementEffect() { + super(Duration.EndOfTurn, Outcome.GainControl); + staticText = "each token that would be created under an opponent's control this turn is created under your control instead"; + } + + public CraftyCutpurseReplacementEffect(final CraftyCutpurseReplacementEffect effect) { + super(effect); + } + + @Override + public CraftyCutpurseReplacementEffect copy() { + return new CraftyCutpurseReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE || event.getType() == GameEvent.EventType.CREATE_TOKEN; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.CREATE_TOKEN) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && controller.hasOpponent(event.getPlayerId(), game)) { + return true; + } + } + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + event.setPlayerId(controller.getId()); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CrashingTide.java b/Mage.Sets/src/mage/cards/c/CrashingTide.java new file mode 100644 index 0000000000..f4cb1d1fd5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CrashingTide.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.c; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +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.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CrashingTide extends CardImpl { + + public CrashingTide(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); + + // Crashing tide has flash as long as you control a Merfolk. + FilterControlledPermanent filter = new FilterControlledPermanent(); + filter.add(new SubtypePredicate(SubType.MERFOLK)); + this.addAbility(new SimpleStaticAbility(Zone.ALL, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlashAbility.getInstance(), Duration.WhileOnBattlefield, true), + new PermanentsOnTheBattlefieldCondition(filter), + "{this} has flash as long as you control a Merfolk")).setRuleAtTheTop(true)); + + // Return target creature to it's owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("
Draw a card")); + } + + public CrashingTide(final CrashingTide card) { + super(card); + } + + @Override + public CrashingTide copy() { + return new CrashingTide(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CuriousObsession.java b/Mage.Sets/src/mage/cards/c/CuriousObsession.java new file mode 100644 index 0000000000..d57baf7085 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CuriousObsession.java @@ -0,0 +1,97 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.AttackedThisTurnCondition; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessConditionEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.AttackedThisTurnWatcher; + +/** + * + * @author LevelX2 + */ +public class CuriousObsession extends CardImpl { + + public CuriousObsession(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1 and has "Whenever this creature deals combat damage to a player, you may draw a card. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield)); + Ability gainedAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA); + effect.setText("and has \"Whenever this creature deals combat damage to a player, you may draw a card.\""); + ability.addEffect(effect); + this.addAbility(ability); + + // At the beginning of your end step, if you didn't attack with a creature this turn sacrifice Curious Obsession. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceUnlessConditionEffect(AttackedThisTurnCondition.instance) + .setText("if you didn't attack with a creature this turn sacrifice {this}"), + TargetController.YOU, false), new AttackedThisTurnWatcher()); + + } + + public CuriousObsession(final CuriousObsession card) { + super(card); + } + + @Override + public CuriousObsession copy() { + return new CuriousObsession(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java index 608eb9a683..28cf7825bb 100644 --- a/Mage.Sets/src/mage/sets/RivalsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/RivalsOfIxalan.java @@ -72,10 +72,15 @@ public class RivalsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Canal Monitor", 63, Rarity.COMMON, mage.cards.c.CanalMonitor.class)); cards.add(new SetCardInfo("Captain's Hook", 177, Rarity.RARE, mage.cards.c.CaptainsHook.class)); cards.add(new SetCardInfo("Champion of Dusk", 64, Rarity.RARE, mage.cards.c.ChampionOfDusk.class)); + cards.add(new SetCardInfo("Charging Tuskodon", 97, Rarity.UNCOMMON, mage.cards.c.ChargingTuskodon.class)); cards.add(new SetCardInfo("Cherished Hatchling", 124, Rarity.UNCOMMON, mage.cards.c.CherishedHatchling.class)); cards.add(new SetCardInfo("Cinder Barrens", 205, Rarity.COMMON, mage.cards.c.CinderBarrens.class)); + cards.add(new SetCardInfo("Cleansing Ray", 4, Rarity.COMMON, mage.cards.c.CleansingRay.class)); cards.add(new SetCardInfo("Colossal Dreadmaw", 125, Rarity.COMMON, mage.cards.c.ColossalDreadmaw.class)); + cards.add(new SetCardInfo("Crafty Cutpurse", 33, Rarity.RARE, mage.cards.c.CraftyCutpurse.class)); + cards.add(new SetCardInfo("Crashing Tide", 34, Rarity.COMMON, mage.cards.c.CrashingTide.class)); cards.add(new SetCardInfo("Crested Herdcaller", 126, Rarity.UNCOMMON, mage.cards.c.CrestedHerdcaller.class)); + cards.add(new SetCardInfo("Curious Obsession", 35, Rarity.UNCOMMON, mage.cards.c.CuriousObsession.class)); cards.add(new SetCardInfo("Daring Buccaneer", 98, Rarity.UNCOMMON, mage.cards.d.DaringBuccaneer.class)); cards.add(new SetCardInfo("Dark Inquiry", 65, Rarity.COMMON, mage.cards.d.DarkInquiry.class)); cards.add(new SetCardInfo("Dead Man's Chest", 66, Rarity.RARE, mage.cards.d.DeadMansChest.class)); diff --git a/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java index 7ecc8fb53c..52a9df7254 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/AttackedThisStepCondition.java @@ -46,6 +46,7 @@ public enum AttackedThisStepCondition implements Condition { && watcher.getNumberAttackingCurrentStep(source.getControllerId()) > 0; } + @Override public String toString() { return "during the declare attackers step and only if you've been attacked this step."; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/AttackedThisTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AttackedThisTurnCondition.java new file mode 100644 index 0000000000..6341d527a8 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/AttackedThisTurnCondition.java @@ -0,0 +1,25 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.watchers.common.AttackedThisTurnWatcher; + +/** + * + * @author LevelX2 + */ +public enum AttackedThisTurnCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName()); + return !watcher.getAttackedThisTurnCreatures().isEmpty(); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java index 74013143bb..15ef1f2672 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessConditionEffect.java @@ -75,6 +75,9 @@ public class SacrificeSourceUnlessConditionEffect extends OneShotEffect { @Override public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } StringBuilder sb = new StringBuilder("sacrifice {this} unless "); sb.append(condition.toString()); return sb.toString();