From 1cac5bdead73458a5df5c561a1d590df51d58985 Mon Sep 17 00:00:00 2001 From: Trevor Date: Mon, 18 May 2015 19:45:44 -0700 Subject: [PATCH 01/12] --- .../src/mage/sets/tempest/RootwaterDiver.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java diff --git a/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java b/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java new file mode 100644 index 0000000000..f9e7310e0a --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java @@ -0,0 +1,53 @@ +/* + * 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.sets.tempest; + + +import java.util.UUID; + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.Ability; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.constants.Zone; +import mage.filter.common.FilterArtifactCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author Trevor + */ + +public class RootwaterDiver extends CardImpl { + public RootwaterDiver(UUID ownerId) { + super(ownerId, 81, "Rootwater Diver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Merfolk"); + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new ColorlessManaAbility()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"))); + this.addAbility(ability); + + } + public RootwaterDiver(final RootwaterDiver card) { + super(card); + } + + @Override + public RootwaterDiver copy() { + return new RootwaterDiver(this); + } +} \ No newline at end of file From b0fdd262941a170a944faa119fd18c929fcb5491 Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 16:44:46 -0700 Subject: [PATCH 02/12] --- .../sets/unlimitededition/KeldonWarlord.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/unlimitededition/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/unlimitededition/KeldonWarlord.java b/Mage.Sets/src/mage/sets/unlimitededition/KeldonWarlord.java new file mode 100644 index 0000000000..75a44c57e8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/KeldonWarlord.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.sets.unlimitededition; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends CardImpl { + + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Wall creatures you control."); + static { + filter.add(Predicates.not(new SubtypePredicate("Wall"))); + } + + public KeldonWarlord(UUID ownerId) { + super(ownerId, 161, "Keldon Warlord", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "2ED"; + this.subtype.add("Human"); + this.subtype.add("Barbarian"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Keldon Warlord's power and toughness are each equal to the number of non-Wall creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From c448211e43a950a997b70cf1f775f293928b39a1 Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:33:35 -0700 Subject: [PATCH 03/12] --- .../src/mage/sets/urzassaga/SleeperAgent.java | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java diff --git a/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java b/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java new file mode 100644 index 0000000000..a27398f555 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.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.sets.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TGower + */ +public class SleeperAgent extends CardImpl { + + public SleeperAgent(UUID ownerId) { + super(ownerId, 159, "Sleeper Agent", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "USG"; + this.subtype.add("Minion"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Sleeper Agent enters the battlefield, target opponent gains control of it. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SleeperAgentChangeControlEffect(), false)); + // At the beginning of your upkeep, Sleeper Agent deals 2 damage to you. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(2), TargetController.YOU, false)); + } + + public SleeperAgent(final SleeperAgent card) { + super(card); + } + + @Override + public SleeperAgent copy() { + return new SleeperAgent(this); + } +} + +class SleeperAgentChangeControlEffect extends OneShotEffect { + + public SleeperAgentChangeControlEffect() { + super(Outcome.Benefit); + this.staticText = "an opponent gains control of it"; + } + + public SleeperAgentChangeControlEffect(final SleeperAgentChangeControlEffect effect) { + super(effect); + } + + @Override + public SleeperAgentChangeControlEffect copy() { + return new SleeperAgentChangeControlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Target target = new TargetOpponent(); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (controller.chooseTarget(outcome, target, source, game)) { + ContinuousEffect effect = new SleeperAgentGainControlEffect(Duration.Custom, target.getFirstTarget()); + effect.setTargetPointer(new FixedTarget(source.getSourceId())); + game.addEffect(effect, source); + return true; + } + } + return false; + } +} + +class SleeperAgentGainControlEffect extends ContinuousEffectImpl { + + UUID controller; + + public SleeperAgentGainControlEffect(Duration duration, UUID controller) { + super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + this.controller = controller; + } + + public SleeperAgentGainControlEffect(final SleeperAgentGainControlEffect effect) { + super(effect); + this.controller = effect.controller; + } + + @Override + public SleeperAgentGainControlEffect copy() { + return new SleeperAgentGainControlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (targetPointer != null) { + permanent = game.getPermanent(targetPointer.getFirst(game, source)); + } + if (permanent != null) { + return permanent.changeControllerId(controller, game); + } + return false; + } + + @Override + public String getText(Mode mode) { + return "Gain control of Sleeper Agent"; + } +} + From 2af964e16feec19ff354b9f67d4d618a44782ead Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:34:31 -0700 Subject: [PATCH 04/12] --- .../mage/sets/fifthedition/KeldonWarlord.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fifthedition/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/fifthedition/KeldonWarlord.java b/Mage.Sets/src/mage/sets/fifthedition/KeldonWarlord.java new file mode 100644 index 0000000000..a94d4e613c --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/KeldonWarlord.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.sets.fifthedition; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends mage.sets.unlimitededition.KeldonWarlord { + + public KeldonWarlord(UUID ownerId) { + super(ownerId); + this.cardNumber = 247; + this.expansionSetCode = "5ED"; + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From ce5d66600136e15670514bce936dac9e1bf8ff8d Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:35:01 -0700 Subject: [PATCH 05/12] --- .../sets/fourthedition/KeldonWarlord.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fourthedition/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/fourthedition/KeldonWarlord.java b/Mage.Sets/src/mage/sets/fourthedition/KeldonWarlord.java new file mode 100644 index 0000000000..48905f1bbe --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/KeldonWarlord.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.sets.fourthedition; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends mage.sets.unlimitededition.KeldonWarlord { + + public KeldonWarlord(UUID ownerId) { + super(ownerId); + this.cardNumber = 225; + this.expansionSetCode = "4ED"; + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From 9d8f7e2c1424e4643dfee6055641d810ff812270 Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:35:29 -0700 Subject: [PATCH 06/12] --- .../mage/sets/limitedalpha/KeldonWarlord.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/limitedalpha/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/limitedalpha/KeldonWarlord.java b/Mage.Sets/src/mage/sets/limitedalpha/KeldonWarlord.java new file mode 100644 index 0000000000..87bec7ea40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/KeldonWarlord.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.sets.limitedalpha; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends mage.sets.unlimitededition.KeldonWarlord { + + public KeldonWarlord(UUID ownerId) { + super(ownerId); + this.cardNumber = 161; + this.expansionSetCode = "LEA"; + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From c4370426f424b2d4bc507288e0f4c9a46754288a Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:35:51 -0700 Subject: [PATCH 07/12] --- .../mage/sets/limitedbeta/KeldonWarlord.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/limitedbeta/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/limitedbeta/KeldonWarlord.java b/Mage.Sets/src/mage/sets/limitedbeta/KeldonWarlord.java new file mode 100644 index 0000000000..3e7819efae --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/KeldonWarlord.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.sets.limitedbeta; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends mage.sets.unlimitededition.KeldonWarlord { + + public KeldonWarlord(UUID ownerId) { + super(ownerId); + this.cardNumber = 162; + this.expansionSetCode = "LEB"; + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From 58925698faf3f6647158fe852ecaaab1d82be49e Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:36:22 -0700 Subject: [PATCH 08/12] --- .../sets/mastersedition/KeldonWarlord.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/mastersedition/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/mastersedition/KeldonWarlord.java b/Mage.Sets/src/mage/sets/mastersedition/KeldonWarlord.java new file mode 100644 index 0000000000..8bf49a6fc1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/KeldonWarlord.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.sets.mastersedition; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends mage.sets.unlimitededition.KeldonWarlord { + + public KeldonWarlord(UUID ownerId) { + super(ownerId); + this.cardNumber = 101; + this.expansionSetCode = "MED"; + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From abf962aae74b704be1f5a57438de5f4ff71c1301 Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:36:45 -0700 Subject: [PATCH 09/12] --- .../sets/revisededition/KeldonWarlord.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/revisededition/KeldonWarlord.java diff --git a/Mage.Sets/src/mage/sets/revisededition/KeldonWarlord.java b/Mage.Sets/src/mage/sets/revisededition/KeldonWarlord.java new file mode 100644 index 0000000000..d9ca12fdc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/KeldonWarlord.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.sets.revisededition; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class KeldonWarlord extends mage.sets.unlimitededition.KeldonWarlord { + + public KeldonWarlord(UUID ownerId) { + super(ownerId); + this.cardNumber = 159; + this.expansionSetCode = "3ED"; + } + + public KeldonWarlord(final KeldonWarlord card) { + super(card); + } + + @Override + public KeldonWarlord copy() { + return new KeldonWarlord(this); + } +} From 8e5dccd7267f94f486ad4cba47a4a4af05589dab Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:37:09 -0700 Subject: [PATCH 10/12] --- .../src/mage/sets/tempest/RootwaterDiver.java | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java b/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java index f9e7310e0a..9f0bdb6c7d 100644 --- a/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java +++ b/Mage.Sets/src/mage/sets/tempest/RootwaterDiver.java @@ -1,13 +1,33 @@ /* - * 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. + * 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.tempest; - import java.util.UUID; - import mage.constants.CardType; import mage.constants.Rarity; import mage.abilities.Ability; @@ -24,25 +44,26 @@ import mage.target.common.TargetCardInYourGraveyard; /** * - * @author Trevor + * @author TGower */ - public class RootwaterDiver extends CardImpl { + public RootwaterDiver(UUID ownerId) { super(ownerId, 81, "Rootwater Diver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}"); - this.expansionSetCode = "TMP"; + this.expansionSetCode = "TMP"; this.subtype.add("Merfolk"); - this.color.setBlue(true); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new ColorlessManaAbility()); + + // {tap}, Sacrifice Rootwater Diver: Return target artifact card from your graveyard to your hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"))); this.addAbility(ability); } - public RootwaterDiver(final RootwaterDiver card) { + + public RootwaterDiver(final RootwaterDiver card) { super(card); } @@ -50,4 +71,4 @@ public class RootwaterDiver extends CardImpl { public RootwaterDiver copy() { return new RootwaterDiver(this); } -} \ No newline at end of file +} From ded89ebdd0ea7ee052ae5a720546f4afbb5840e3 Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 19 May 2015 19:37:54 -0700 Subject: [PATCH 11/12] --- .../mage/sets/tenthedition/SleeperAgent.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/tenthedition/SleeperAgent.java diff --git a/Mage.Sets/src/mage/sets/tenthedition/SleeperAgent.java b/Mage.Sets/src/mage/sets/tenthedition/SleeperAgent.java new file mode 100644 index 0000000000..7ea244ca74 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenthedition/SleeperAgent.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.sets.tenthedition; + +import java.util.UUID; + +/** + * + * @author TGower + */ +public class SleeperAgent extends mage.sets.urzassaga.SleeperAgent { + + public SleeperAgent(UUID ownerId) { + super(ownerId); + this.cardNumber = 178; + this.expansionSetCode = "10E"; + } + + public SleeperAgent(final SleeperAgent card) { + super(card); + } + + @Override + public SleeperAgent copy() { + return new SleeperAgent(this); + } +} From 35ecb1b26e86ea6f9acb81403a73c7680dfdb275 Mon Sep 17 00:00:00 2001 From: TGower Date: Wed, 20 May 2015 21:02:31 -0700 Subject: [PATCH 12/12] --- .../src/mage/sets/urzassaga/SleeperAgent.java | 66 ++++--------------- 1 file changed, 11 insertions(+), 55 deletions(-) diff --git a/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java b/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java index a27398f555..369dc33c3d 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java +++ b/Mage.Sets/src/mage/sets/urzassaga/SleeperAgent.java @@ -30,12 +30,9 @@ package mage.sets.urzassaga; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.Mode; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; @@ -47,10 +44,7 @@ import mage.constants.SubLayer; import mage.constants.TargetController; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.Target; import mage.target.common.TargetOpponent; -import mage.target.targetpointer.FixedTarget; /** * @@ -66,7 +60,9 @@ public class SleeperAgent extends CardImpl { this.toughness = new MageInt(3); // When Sleeper Agent enters the battlefield, target opponent gains control of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SleeperAgentChangeControlEffect(), false)); + Ability ability = new EntersBattlefieldTriggeredAbility(new SleeperAgentChangeControlEffect(), false); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); // At the beginning of your upkeep, Sleeper Agent deals 2 damage to you. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(2), TargetController.YOU, false)); } @@ -81,11 +77,11 @@ public class SleeperAgent extends CardImpl { } } -class SleeperAgentChangeControlEffect extends OneShotEffect { +class SleeperAgentChangeControlEffect extends ContinuousEffectImpl { public SleeperAgentChangeControlEffect() { - super(Outcome.Benefit); - this.staticText = "an opponent gains control of it"; + super(Duration.Custom, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + staticText = "target opponent gains control of {this}"; } public SleeperAgentChangeControlEffect(final SleeperAgentChangeControlEffect effect) { @@ -99,54 +95,14 @@ class SleeperAgentChangeControlEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Target target = new TargetOpponent(); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - if (controller.chooseTarget(outcome, target, source, game)) { - ContinuousEffect effect = new SleeperAgentGainControlEffect(Duration.Custom, target.getFirstTarget()); - effect.setTargetPointer(new FixedTarget(source.getSourceId())); - game.addEffect(effect, source); - return true; - } - } - return false; - } -} - -class SleeperAgentGainControlEffect extends ContinuousEffectImpl { - - UUID controller; - - public SleeperAgentGainControlEffect(Duration duration, UUID controller) { - super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); - this.controller = controller; - } - - public SleeperAgentGainControlEffect(final SleeperAgentGainControlEffect effect) { - super(effect); - this.controller = effect.controller; - } - - @Override - public SleeperAgentGainControlEffect copy() { - return new SleeperAgentGainControlEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); - if (targetPointer != null) { - permanent = game.getPermanent(targetPointer.getFirst(game, source)); - } + Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game); if (permanent != null) { - return permanent.changeControllerId(controller, game); + return permanent.changeControllerId(source.getFirstTarget(), game); + } else { + discard(); } return false; } - - @Override - public String getText(Mode mode) { - return "Gain control of Sleeper Agent"; - } } +