From cbe0d2afc16ff66b06677f48aeccfdf346171bf8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Sep 2017 20:06:57 -0400 Subject: [PATCH 1/5] Implemented Captivating Crew --- .../src/mage/cards/c/CaptivatingCrew.java | 91 +++++++++++++++++++ Mage.Sets/src/mage/sets/Exodus.java | 2 +- Mage.Sets/src/mage/sets/Ixalan.java | 1 + 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/c/CaptivatingCrew.java diff --git a/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java b/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java new file mode 100644 index 0000000000..5e90f4283d --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CaptivatingCrew.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.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +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 TheElk801 + */ +public class CaptivatingCrew extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public CaptivatingCrew(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // {3}{R}: Gain control of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{3}{R}")); + Effect effect = new UntapTargetEffect(); + effect.setText("Untap that creature"); + ability.addEffect(effect); + effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setText("It gains haste until end of turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public CaptivatingCrew(final CaptivatingCrew card) { + super(card); + } + + @Override + public CaptivatingCrew copy() { + return new CaptivatingCrew(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Exodus.java b/Mage.Sets/src/mage/sets/Exodus.java index 05b9ae6630..2d90d39242 100644 --- a/Mage.Sets/src/mage/sets/Exodus.java +++ b/Mage.Sets/src/mage/sets/Exodus.java @@ -135,7 +135,7 @@ public class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Rootwater Alligator", 122, Rarity.COMMON, mage.cards.r.RootwaterAlligator.class)); cards.add(new SetCardInfo("Rootwater Mystic", 44, Rarity.COMMON, mage.cards.r.RootwaterMystic.class)); cards.add(new SetCardInfo("Sabertooth Wyvern", 99, Rarity.UNCOMMON, mage.cards.s.SabertoothWyvern.class)); - cards.add(new SetCardInfo("ScareTactics", 73, Rarity.COMMON, mage.cards.s.ScareTactics.class)); + cards.add(new SetCardInfo("Scare Tactics", 73, Rarity.COMMON, mage.cards.s.ScareTactics.class)); cards.add(new SetCardInfo("School of Piranha", 45, Rarity.COMMON, mage.cards.s.SchoolOfPiranha.class)); cards.add(new SetCardInfo("Scrivener", 46, Rarity.UNCOMMON, mage.cards.s.Scrivener.class)); cards.add(new SetCardInfo("Seismic Assault", 101, Rarity.RARE, mage.cards.s.SeismicAssault.class)); diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index dad49e8011..ae345964e3 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -48,6 +48,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Burning Sun's Avatar", 135, Rarity.RARE, mage.cards.b.BurningSunsAvatar.class)); cards.add(new SetCardInfo("Call to the Feast", 219, Rarity.UNCOMMON, mage.cards.c.CallToTheFeast.class)); cards.add(new SetCardInfo("Captain Lannery Storm", 136, Rarity.RARE, mage.cards.c.CaptainLanneryStorm.class)); + cards.add(new SetCardInfo("Captivating Crew", 137, Rarity.RARE, mage.cards.c.CaptivatingCrew.class)); cards.add(new SetCardInfo("Carnage Tyrant", 179, Rarity.MYTHIC, mage.cards.c.CarnageTyrant.class)); cards.add(new SetCardInfo("Castaway's Despair", 281, Rarity.COMMON, mage.cards.c.CastawaysDespair.class)); cards.add(new SetCardInfo("Charging Monstrosaur", 138, Rarity.UNCOMMON, mage.cards.c.ChargingMonstrosaur.class)); From 923333c7e097e2a13051c0d04932712f957526bc Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Sep 2017 20:39:15 -0400 Subject: [PATCH 2/5] small update --- Mage.Sets/src/mage/cards/b/BloodCrypt.java | 10 +++++----- Mage.Sets/src/mage/cards/b/BreedingPool.java | 10 +++++----- Mage.Sets/src/mage/cards/g/GodlessShrine.java | 10 +++++----- Mage.Sets/src/mage/cards/h/HallowedFountain.java | 10 +++++----- Mage.Sets/src/mage/cards/o/OvergrownTomb.java | 10 ++++------ Mage.Sets/src/mage/cards/s/SacredFoundry.java | 10 +++++----- Mage.Sets/src/mage/cards/s/SteamVents.java | 10 +++++----- Mage.Sets/src/mage/cards/s/StompingGround.java | 5 ++--- Mage.Sets/src/mage/cards/t/TempleGarden.java | 10 +++++----- Mage.Sets/src/mage/cards/w/WateryGrave.java | 7 +++---- 10 files changed, 44 insertions(+), 48 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BloodCrypt.java b/Mage.Sets/src/mage/cards/b/BloodCrypt.java index 5b3397a9d2..d176adbfd2 100644 --- a/Mage.Sets/src/mage/cards/b/BloodCrypt.java +++ b/Mage.Sets/src/mage/cards/b/BloodCrypt.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.b; import mage.abilities.common.AsEntersBattlefieldAbility; @@ -46,15 +45,16 @@ import java.util.UUID; */ public class BloodCrypt extends CardImpl { - public BloodCrypt (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public BloodCrypt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.SWAMP, SubType.MOUNTAIN); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public BloodCrypt (final BloodCrypt card) { + public BloodCrypt(final BloodCrypt card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/b/BreedingPool.java b/Mage.Sets/src/mage/cards/b/BreedingPool.java index d617b43993..628bb5ac4a 100644 --- a/Mage.Sets/src/mage/cards/b/BreedingPool.java +++ b/Mage.Sets/src/mage/cards/b/BreedingPool.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.b; import mage.abilities.common.AsEntersBattlefieldAbility; @@ -46,15 +45,16 @@ import java.util.UUID; */ public class BreedingPool extends CardImpl { - public BreedingPool (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public BreedingPool(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.FOREST, SubType.ISLAND); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Breeding Pool enters the battlefield tapped")); } - public BreedingPool (final BreedingPool card) { + public BreedingPool(final BreedingPool card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/g/GodlessShrine.java b/Mage.Sets/src/mage/cards/g/GodlessShrine.java index 5628093768..dc091dadd2 100644 --- a/Mage.Sets/src/mage/cards/g/GodlessShrine.java +++ b/Mage.Sets/src/mage/cards/g/GodlessShrine.java @@ -25,7 +25,6 @@ * 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; @@ -45,16 +44,17 @@ import mage.constants.SubType; */ public class GodlessShrine extends CardImpl { - public GodlessShrine (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public GodlessShrine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.PLAINS); this.subtype.add(SubType.SWAMP); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlackManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Godless Shrine enters the battlefield tapped")); } - public GodlessShrine (final GodlessShrine card) { + public GodlessShrine(final GodlessShrine card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/h/HallowedFountain.java b/Mage.Sets/src/mage/cards/h/HallowedFountain.java index 1b6a81552a..27a81923fe 100644 --- a/Mage.Sets/src/mage/cards/h/HallowedFountain.java +++ b/Mage.Sets/src/mage/cards/h/HallowedFountain.java @@ -25,7 +25,6 @@ * 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; @@ -45,16 +44,17 @@ import mage.constants.SubType; */ public class HallowedFountain extends CardImpl { - public HallowedFountain (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public HallowedFountain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.PLAINS); this.subtype.add(SubType.ISLAND); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new WhiteManaAbility()); this.addAbility(new BlueManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Hallowed Fountain enters the battlefield tapped")); } - public HallowedFountain (final HallowedFountain card) { + public HallowedFountain(final HallowedFountain card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/o/OvergrownTomb.java b/Mage.Sets/src/mage/cards/o/OvergrownTomb.java index 8f96904673..0874001f2a 100644 --- a/Mage.Sets/src/mage/cards/o/OvergrownTomb.java +++ b/Mage.Sets/src/mage/cards/o/OvergrownTomb.java @@ -25,7 +25,6 @@ * 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; @@ -45,18 +44,17 @@ import mage.constants.SubType; */ public class OvergrownTomb extends CardImpl { - public OvergrownTomb (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public OvergrownTomb(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.SWAMP); this.subtype.add(SubType.FOREST); + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlackManaAbility()); this.addAbility(new GreenManaAbility()); - - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public OvergrownTomb (final OvergrownTomb card) { + public OvergrownTomb(final OvergrownTomb card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/s/SacredFoundry.java b/Mage.Sets/src/mage/cards/s/SacredFoundry.java index 9660140203..b04fa0774e 100644 --- a/Mage.Sets/src/mage/cards/s/SacredFoundry.java +++ b/Mage.Sets/src/mage/cards/s/SacredFoundry.java @@ -25,7 +25,6 @@ * 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; @@ -45,16 +44,17 @@ import mage.constants.SubType; */ public class SacredFoundry extends CardImpl { - public SacredFoundry (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public SacredFoundry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.MOUNTAIN); this.subtype.add(SubType.PLAINS); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new RedManaAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public SacredFoundry (final SacredFoundry card) { + public SacredFoundry(final SacredFoundry card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/s/SteamVents.java b/Mage.Sets/src/mage/cards/s/SteamVents.java index 328427191d..665d29799e 100644 --- a/Mage.Sets/src/mage/cards/s/SteamVents.java +++ b/Mage.Sets/src/mage/cards/s/SteamVents.java @@ -25,7 +25,6 @@ * 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; @@ -45,16 +44,17 @@ import mage.constants.SubType; */ public class SteamVents extends CardImpl { - public SteamVents (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public SteamVents(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.ISLAND); this.subtype.add(SubType.MOUNTAIN); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlueManaAbility()); this.addAbility(new RedManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Steam Vents enters the battlefield tapped")); } - public SteamVents (final SteamVents card) { + public SteamVents(final SteamVents card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/s/StompingGround.java b/Mage.Sets/src/mage/cards/s/StompingGround.java index 503ac103aa..3ceff54012 100644 --- a/Mage.Sets/src/mage/cards/s/StompingGround.java +++ b/Mage.Sets/src/mage/cards/s/StompingGround.java @@ -45,14 +45,13 @@ import mage.constants.SubType; public class StompingGround extends CardImpl { public StompingGround(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.MOUNTAIN); this.subtype.add(SubType.FOREST); + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), - "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } public StompingGround(final StompingGround card) { diff --git a/Mage.Sets/src/mage/cards/t/TempleGarden.java b/Mage.Sets/src/mage/cards/t/TempleGarden.java index 8dfadac2dd..b7fc019c30 100644 --- a/Mage.Sets/src/mage/cards/t/TempleGarden.java +++ b/Mage.Sets/src/mage/cards/t/TempleGarden.java @@ -25,7 +25,6 @@ * 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; @@ -45,16 +44,17 @@ import mage.constants.SubType; */ public class TempleGarden extends CardImpl { - public TempleGarden (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + public TempleGarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.FOREST); this.subtype.add(SubType.PLAINS); + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } - public TempleGarden (final TempleGarden card) { + public TempleGarden(final TempleGarden card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WateryGrave.java b/Mage.Sets/src/mage/cards/w/WateryGrave.java index 11c58d176b..bf380072f0 100644 --- a/Mage.Sets/src/mage/cards/w/WateryGrave.java +++ b/Mage.Sets/src/mage/cards/w/WateryGrave.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.w; import java.util.UUID; @@ -46,13 +45,13 @@ import mage.constants.SubType; public class WateryGrave extends CardImpl { public WateryGrave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); this.subtype.add(SubType.ISLAND); this.subtype.add(SubType.SWAMP); - + + this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); - this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); } public WateryGrave(final WateryGrave card) { From 0c27e9fce5d123600cc6bc626595788d45f21f0b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Sep 2017 21:59:29 -0400 Subject: [PATCH 3/5] Implemented Kukemssa Pirates --- .../src/mage/cards/k/KukemssaPirates.java | 91 +++++++++++++++++++ Mage.Sets/src/mage/sets/Mirage.java | 1 + Utils/mtg-cards-data.txt | 1 + 3 files changed, 93 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KukemssaPirates.java diff --git a/Mage.Sets/src/mage/cards/k/KukemssaPirates.java b/Mage.Sets/src/mage/cards/k/KukemssaPirates.java new file mode 100644 index 0000000000..f7d123c64a --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KukemssaPirates.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.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.target.common.TargetArtifactPermanent; + +/** + * + * @author TheElk801 + */ +public class KukemssaPirates extends CardImpl { + + private final UUID originalId; + + public KukemssaPirates(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); + + // Whenever Kukemssa Pirates attacks and isn't blocked, you may gain control of target artifact defending player controls. If you do, Kukemssa Pirates assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new GainControlTargetEffect(Duration.Custom), true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + ability.addTarget(new TargetArtifactPermanent(new FilterArtifactPermanent("artifact defending player controls"))); + originalId = ability.getOriginalId(); + this.addAbility(ability); + } + + public KukemssaPirates(final KukemssaPirates card) { + super(card); + this.originalId = card.originalId; + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(originalId)) { + ability.getTargets().clear(); + FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact defending player controls"); + UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId()); + filter.add(new ControllerIdPredicate(defenderId)); + TargetArtifactPermanent target = new TargetArtifactPermanent(filter); + ability.addTarget(target); + } + } + + @Override + public KukemssaPirates copy() { + return new KukemssaPirates(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Mirage.java b/Mage.Sets/src/mage/sets/Mirage.java index 9443d093e9..2bd04a2dd4 100644 --- a/Mage.Sets/src/mage/sets/Mirage.java +++ b/Mage.Sets/src/mage/sets/Mirage.java @@ -180,6 +180,7 @@ public class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Jungle Wurm", 122, Rarity.COMMON, mage.cards.j.JungleWurm.class)); cards.add(new SetCardInfo("Kaervek's Torch", 185, Rarity.COMMON, mage.cards.k.KaerveksTorch.class)); cards.add(new SetCardInfo("Karoo Meerkat", 123, Rarity.UNCOMMON, mage.cards.k.KarooMeerkat.class)); + cards.add(new SetCardInfo("Kukemssa Pirates", 71, Rarity.RARE, mage.cards.k.KukemssaPirates.class)); cards.add(new SetCardInfo("Kukemssa Serpent", 72, Rarity.COMMON, mage.cards.k.KukemssaSerpent.class)); cards.add(new SetCardInfo("Lead Golem", 271, Rarity.UNCOMMON, mage.cards.l.LeadGolem.class)); cards.add(new SetCardInfo("Lightning Reflexes", 186, Rarity.COMMON, mage.cards.l.LightningReflexes.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index b2a7ee3e72..5574ddb3e2 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32378,6 +32378,7 @@ Boneyard Parley|Ixalan|94|M|{5}{B}{B}|Sorcery|||Exile up to five target creature Deadeye Tormentor|Ixalan|98|C|{2}{B}|Creature - Human Pirate|2|2|Raid — When Deadeye Tormentor enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.| Deadeye Tracker|Ixalan|99|R|{B}|Creature - Human Pirate|1|1|{1}{B}, {T}: Exile two target cards from an opponent's graveyard. Deadeye Tracker explores.| Deathless Ancient|Ixalan|100|U|{4}{B}{B}|Creature - Vampire Knight|4|4|Flying$Tap three untapped Vampires you control: Return Deathless Ancient from your graveyard to your hand.| +Dire Fleet Ravager|Ixalan|104|M|{3}{B}{B}|Creature - Orc Pirate Wizard|4|4|Menace, deathtouch$When Dire Fleet Ravager enters the battlefield, each player loses a third of his or her life, rounded up.| Duress|Ixalan|105|C|{B}|Sorcery|||Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card.| Fathom Fleet Captain|Ixalan|106|R|{1}{B}|Creature - Human Pirate|2|1|Menace$Whenever Fathom Fleet Captain attacks, if you control another nontoken Pirate, you may pay {2}. If you do, creature a 2/2 black Pirate creature token with menace.| Kitesail Freebooter|Ixalan|110|U|{1}{B}|Creature - Human Pirate|1|2|Flying$When Kitesail Freebooter enters the battlefield, target opponent reveals his or her hand. You choose a noncreature, nonland card from it. Exile that card until Kitesail Freebooter leaves the battlefield.| From df06d2953a5c79113392944b2007049aa2ac3d43 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Sep 2017 22:12:17 -0400 Subject: [PATCH 4/5] Implemented Scent of Jasmine --- .../src/mage/cards/s/ScentOfJasmine.java | 112 ++++++++++++++++++ Mage.Sets/src/mage/sets/UrzasDestiny.java | 1 + 2 files changed, 113 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ScentOfJasmine.java diff --git a/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java b/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java new file mode 100644 index 0000000000..6e49f3c225 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java @@ -0,0 +1,112 @@ +/* + * 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.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public class ScentOfJasmine extends CardImpl { + + public ScentOfJasmine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + // Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way. + Effect effect = new ScentOfJasmineEffect(); + effect.setText("Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way."); + this.getSpellAbility().addEffect(effect); + } + + public ScentOfJasmine(final ScentOfJasmine card) { + super(card); + } + + @Override + public ScentOfJasmine copy() { + return new ScentOfJasmine(this); + } +} + +class ScentOfJasmineEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("white cards"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public ScentOfJasmineEffect() { + super(Outcome.GainLife); + } + + public ScentOfJasmineEffect(final ScentOfJasmineEffect effect) { + super(effect); + } + + @Override + public ScentOfJasmineEffect copy() { + return new ScentOfJasmineEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Cards cards = new CardsImpl(); + if (player.getHand().count(filter, game) > 0) { + TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter); + if (player.choose(Outcome.Benefit, target, source.getSourceId(), game)) { + for (UUID uuid : target.getTargets()) { + cards.add(player.getHand().get(uuid, game)); + } + player.revealCards("cards", cards, game); + player.gainLife(cards.getCards(game).size() * 2, game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/UrzasDestiny.java b/Mage.Sets/src/mage/sets/UrzasDestiny.java index 8d85982e31..87ed6e299a 100644 --- a/Mage.Sets/src/mage/sets/UrzasDestiny.java +++ b/Mage.Sets/src/mage/sets/UrzasDestiny.java @@ -139,6 +139,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Rescue", 44, Rarity.COMMON, mage.cards.r.Rescue.class)); cards.add(new SetCardInfo("Rofellos, Llanowar Emissary", 118, Rarity.RARE, mage.cards.r.RofellosLlanowarEmissary.class)); cards.add(new SetCardInfo("Sanctimony", 16, Rarity.UNCOMMON, mage.cards.s.Sanctimony.class)); + cards.add(new SetCardInfo("Scent of Jasmine", 17, Rarity.COMMON, mage.cards.s.ScentOfJasmine.class)); cards.add(new SetCardInfo("Scour", 18, Rarity.UNCOMMON, mage.cards.s.Scour.class)); cards.add(new SetCardInfo("Serra Advocate", 19, Rarity.UNCOMMON, mage.cards.s.SerraAdvocate.class)); cards.add(new SetCardInfo("Sigil of Sleep", 46, Rarity.COMMON, mage.cards.s.SigilOfSleep.class)); From af71c05cd548ccf08426bf757e67e5f8ae42d31f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Sep 2017 22:21:07 -0400 Subject: [PATCH 5/5] Implemented Axelrod Gunnarson --- .../src/mage/cards/a/AxelrodGunnarson.java | 78 +++++++++++++++++++ Mage.Sets/src/mage/sets/Chronicles.java | 1 + Mage.Sets/src/mage/sets/Legends.java | 1 + .../src/mage/sets/MastersEditionIII.java | 1 + 4 files changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java diff --git a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java new file mode 100644 index 0000000000..af0a6e29e4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.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.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageAndDiedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author TheElk801 + */ +public class AxelrodGunnarson extends CardImpl { + + public AxelrodGunnarson(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{R}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.GIANT); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever a creature dealt damage by Axelrod Gunnarson this turn dies, you gain 1 life and Axelrod deals 1 damage to target player. + Ability ability = new DealtDamageAndDiedTriggeredAbility(new GainLifeEffect(1), false); + Effect effect = new DamageTargetEffect(1); + effect.setText("and {this} deals 1 damage to target player"); + ability.addEffect(effect); + ability.addTarget(new TargetPlayer()); + } + + public AxelrodGunnarson(final AxelrodGunnarson card) { + super(card); + } + + @Override + public AxelrodGunnarson copy() { + return new AxelrodGunnarson(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Chronicles.java b/Mage.Sets/src/mage/sets/Chronicles.java index f6a5f8a6c8..9f1fa4ff52 100644 --- a/Mage.Sets/src/mage/sets/Chronicles.java +++ b/Mage.Sets/src/mage/sets/Chronicles.java @@ -62,6 +62,7 @@ public class Chronicles extends ExpansionSet { cards.add(new SetCardInfo("Argothian Pixies", 29, Rarity.COMMON, mage.cards.a.ArgothianPixies.class)); cards.add(new SetCardInfo("Ashnod's Altar", 72, Rarity.COMMON, mage.cards.a.AshnodsAltar.class)); cards.add(new SetCardInfo("Ashnod's Transmogrant", 73, Rarity.COMMON, mage.cards.a.AshnodsTransmogrant.class)); + cards.add(new SetCardInfo("Axelrod Gunnarson", 107, Rarity.RARE, mage.cards.a.AxelrodGunnarson.class)); cards.add(new SetCardInfo("Azure Drake", 15, Rarity.UNCOMMON, mage.cards.a.AzureDrake.class)); cards.add(new SetCardInfo("Barl's Cage", 74, Rarity.RARE, mage.cards.b.BarlsCage.class)); cards.add(new SetCardInfo("Beasts of Bogardan", 45, Rarity.UNCOMMON, mage.cards.b.BeastsOfBogardan.class)); diff --git a/Mage.Sets/src/mage/sets/Legends.java b/Mage.Sets/src/mage/sets/Legends.java index 6c6865ca0d..f0434ac5fb 100644 --- a/Mage.Sets/src/mage/sets/Legends.java +++ b/Mage.Sets/src/mage/sets/Legends.java @@ -66,6 +66,7 @@ public class Legends extends ExpansionSet { cards.add(new SetCardInfo("Arcades Sabboth", 258, Rarity.RARE, mage.cards.a.ArcadesSabboth.class)); cards.add(new SetCardInfo("Arena of the Ancients", 215, Rarity.RARE, mage.cards.a.ArenaOfTheAncients.class)); cards.add(new SetCardInfo("Avoid Fate", 89, Rarity.COMMON, mage.cards.a.AvoidFate.class)); + cards.add(new SetCardInfo("Axelrod Gunnarson", 259, Rarity.RARE, mage.cards.a.AxelrodGunnarson.class)); cards.add(new SetCardInfo("Azure Drake", 46, Rarity.UNCOMMON, mage.cards.a.AzureDrake.class)); cards.add(new SetCardInfo("Backfire", 47, Rarity.UNCOMMON, mage.cards.b.Backfire.class)); cards.add(new SetCardInfo("Barbary Apes", 90, Rarity.COMMON, mage.cards.b.BarbaryApes.class)); diff --git a/Mage.Sets/src/mage/sets/MastersEditionIII.java b/Mage.Sets/src/mage/sets/MastersEditionIII.java index bafe726bff..a328bee391 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIII.java @@ -64,6 +64,7 @@ public class MastersEditionIII extends ExpansionSet { cards.add(new SetCardInfo("Arena of the Ancients", 188, Rarity.RARE, mage.cards.a.ArenaOfTheAncients.class)); cards.add(new SetCardInfo("Ashes to Ashes", 58, Rarity.UNCOMMON, mage.cards.a.AshesToAshes.class)); cards.add(new SetCardInfo("Astrolabe", 189, Rarity.COMMON, mage.cards.a.Astrolabe.class)); + cards.add(new SetCardInfo("Axelrod Gunnarson", 143, Rarity.UNCOMMON, mage.cards.a.AxelrodGunnarson.class)); cards.add(new SetCardInfo("Barktooth Warbeard", 144, Rarity.COMMON, mage.cards.b.BarktoothWarbeard.class)); cards.add(new SetCardInfo("Barl's Cage", 190, Rarity.RARE, mage.cards.b.BarlsCage.class)); cards.add(new SetCardInfo("Bartel Runeaxe", 145, Rarity.UNCOMMON, mage.cards.b.BartelRuneaxe.class));