From 8da963b77162a1edbf1bb3ea339a5895f7a308e2 Mon Sep 17 00:00:00 2001 From: North Date: Sat, 21 May 2011 10:16:29 +0300 Subject: [PATCH] Added ROE cards. --- .../riseoftheeldrazi/BalaGedScorpion.java | 77 +++++++++++ .../sets/riseoftheeldrazi/BattleRampart.java | 76 +++++++++++ .../sets/riseoftheeldrazi/CadaverImp.java | 72 ++++++++++ .../riseoftheeldrazi/DawnglareInvoker.java | 115 ++++++++++++++++ .../sets/riseoftheeldrazi/DeathCultist.java | 74 ++++++++++ .../riseoftheeldrazi/FrostwindInvoker.java | 127 ++++++++++++++++++ .../sets/riseoftheeldrazi/GoblinArsonist.java | 115 ++++++++++++++++ .../sets/riseoftheeldrazi/KorLineSlinger.java | 80 +++++++++++ .../src/mage/sets/zendikar/BloodSeeker.java | 5 +- ...tureEntersBattlefieldTriggeredAbility.java | 13 -- 10 files changed, 739 insertions(+), 15 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/BalaGedScorpion.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/BattleRampart.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/CadaverImp.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/DawnglareInvoker.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/DeathCultist.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/FrostwindInvoker.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinArsonist.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/KorLineSlinger.java diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/BalaGedScorpion.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BalaGedScorpion.java new file mode 100644 index 0000000000..81aec880e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BalaGedScorpion.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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonType; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class BalaGedScorpion extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 1 or less"); + + static { + filter.setPower(2); + filter.setPowerComparison(ComparisonType.LessThan); + } + + public BalaGedScorpion(UUID ownerId) { + super(ownerId, 95, "Bala Ged Scorpion", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Scorpion"); + + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true); + ability.addTarget(new TargetCreaturePermanent(filter)); + + this.addAbility(ability); + } + + public BalaGedScorpion(final BalaGedScorpion card) { + super(card); + } + + @Override + public BalaGedScorpion copy() { + return new BalaGedScorpion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/BattleRampart.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BattleRampart.java new file mode 100644 index 0000000000..38774bcc33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BattleRampart.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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class BattleRampart extends CardImpl { + + public BattleRampart(UUID ownerId) { + super(ownerId, 135, "Battle Rampart", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Wall"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + this.addAbility(DefenderAbility.getInstance()); + + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), + new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public BattleRampart(final BattleRampart card) { + super(card); + } + + @Override + public BattleRampart copy() { + return new BattleRampart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CadaverImp.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CadaverImp.java new file mode 100644 index 0000000000..6c366a25c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CadaverImp.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author North + */ +public class CadaverImp extends CardImpl { + + public CadaverImp(UUID ownerId) { + super(ownerId, 99, "Cadaver Imp", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Imp"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); + this.addAbility(ability); + + } + + public CadaverImp(final CadaverImp card) { + super(card); + } + + @Override + public CadaverImp copy() { + return new CadaverImp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DawnglareInvoker.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DawnglareInvoker.java new file mode 100644 index 0000000000..b2b681086d --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DawnglareInvoker.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.sets.riseoftheeldrazi; + +import java.util.List; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class DawnglareInvoker extends CardImpl { + + public DawnglareInvoker(UUID ownerId) { + super(ownerId, 16, "Dawnglare Invoker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Kor"); + this.subtype.add("Wizard"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DawnglareInvokerEffect(), + new ManaCostsImpl("{8}")); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public DawnglareInvoker(final DawnglareInvoker card) { + super(card); + } + + @Override + public DawnglareInvoker copy() { + return new DawnglareInvoker(this); + } +} + +class DawnglareInvokerEffect extends OneShotEffect { + + public DawnglareInvokerEffect() { + super(Outcome.Tap); + } + + public DawnglareInvokerEffect(final DawnglareInvokerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + List allCreatures = game.getBattlefield().getAllActivePermanents(FilterCreaturePermanent.getDefault(), player.getId()); + for (Permanent creature : allCreatures) { + creature.tap(game); + } + return true; + } + return false; + } + + @Override + public DawnglareInvokerEffect copy() { + return new DawnglareInvokerEffect(this); + } + + @Override + public String getText(Ability source) { + return "Tap all creatures target player controls."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DeathCultist.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DeathCultist.java new file mode 100644 index 0000000000..e10b92642b --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DeathCultist.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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class DeathCultist extends CardImpl { + + public DeathCultist(UUID ownerId) { + super(ownerId, 105, "Death Cultist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + SimpleActivatedAbility ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, + new LoseLifeTargetEffect(3), + new SacrificeSourceCost()); + ability.addEffect(new GainLifeEffect(3)); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public DeathCultist(final DeathCultist card) { + super(card); + } + + @Override + public DeathCultist copy() { + return new DeathCultist(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/FrostwindInvoker.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/FrostwindInvoker.java new file mode 100644 index 0000000000..56871679f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/FrostwindInvoker.java @@ -0,0 +1,127 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.List; +import java.util.UUID; +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.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author North + */ +public class FrostwindInvoker extends CardImpl { + + public FrostwindInvoker(UUID ownerId) { + super(ownerId, 68, "Frostwind Invoker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new FrostwindInvokerEffect(), new ManaCostsImpl("{8}"))); + } + + public FrostwindInvoker(final FrostwindInvoker card) { + super(card); + } + + @Override + public FrostwindInvoker copy() { + return new FrostwindInvoker(this); + } +} + +class FrostwindInvokerEffect extends ContinuousEffectImpl { + + public FrostwindInvokerEffect() { + super(Duration.EndOfTurn, Outcome.AddAbility); + } + + public FrostwindInvokerEffect(final FrostwindInvokerEffect effect) { + super(effect); + } + + @Override + public FrostwindInvokerEffect copy() { + return new FrostwindInvokerEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + switch (layer) { + case AbilityAddingRemovingEffects_6: + List allCreatures = game.getBattlefield().getAllActivePermanents(FilterCreaturePermanent.getDefault(), player.getId()); + for (Permanent creature : allCreatures) { + creature.getAbilities().add(FlyingAbility.getInstance()); + } + break; + } + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public String getText(Ability source) { + return "Creatures you control gain flying until end of turn."; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.AbilityAddingRemovingEffects_6; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinArsonist.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinArsonist.java new file mode 100644 index 0000000000..6aad37565e --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinArsonist.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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author North + */ +public class GoblinArsonist extends CardImpl { + + public GoblinArsonist(UUID ownerId) { + super(ownerId, 147, "Goblin Arsonist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Goblin"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new GoblinArsonistEffect(), true)); + } + + public GoblinArsonist(final GoblinArsonist card) { + super(card); + } + + @Override + public GoblinArsonist copy() { + return new GoblinArsonist(this); + } +} + +class GoblinArsonistEffect extends OneShotEffect { + + public GoblinArsonistEffect() { + super(Outcome.Damage); + } + + public GoblinArsonistEffect(final GoblinArsonistEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); + Player player = game.getPlayer(source.getControllerId()); + player.choose(Outcome.Damage, target, game); + + Permanent arsonist = game.getPermanent(source.getSourceId()); + if (arsonist != null) { + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + permanent.damage(1, arsonist.getId(), game, true, false); + return true; + } + + Player targetPlayer = game.getPlayer(target.getFirstTarget()); + if (targetPlayer != null) { + targetPlayer.damage(1, arsonist.getId(), game, true, false); + return true; + } + } + return false; + } + + @Override + public GoblinArsonistEffect copy() { + return new GoblinArsonistEffect(this); + } + + @Override + public String getText(Ability source) { + return "have it deal 1 damage to target creature or player"; + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KorLineSlinger.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KorLineSlinger.java new file mode 100644 index 0000000000..b1a541be88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KorLineSlinger.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.sets.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonType; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class KorLineSlinger extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); + + static { + filter.setPower(4); + filter.setPowerComparison(ComparisonType.LessThan); + } + + public KorLineSlinger(UUID ownerId) { + super(ownerId, 30, "Kor Line-Slinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Kor"); + this.subtype.add("Scout"); + + this.color.setWhite(true); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public KorLineSlinger(final KorLineSlinger card) { + super(card); + } + + @Override + public KorLineSlinger copy() { + return new KorLineSlinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/BloodSeeker.java b/Mage.Sets/src/mage/sets/zendikar/BloodSeeker.java index 628fe3f630..5e718aebd2 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BloodSeeker.java +++ b/Mage.Sets/src/mage/sets/zendikar/BloodSeeker.java @@ -51,8 +51,9 @@ public class BloodSeeker extends CardImpl { this.color.setBlack(true); this.power = new MageInt(1); this.toughness = new MageInt(1); - - this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), true, true, new TargetPlayer())); + CreatureEntersBattlefieldTriggeredAbility ability = new CreatureEntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), true, true); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); } public BloodSeeker(final BloodSeeker card) { diff --git a/Mage/src/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java b/Mage/src/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java index f6192fe1b9..957dfc7c88 100644 --- a/Mage/src/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/CreatureEntersBattlefieldTriggeredAbility.java @@ -80,19 +80,6 @@ public class CreatureEntersBattlefieldTriggeredAbility extends TriggeredAbilityI this.opponentController = opponentController; } - /** - * - * @param effect - * @param optional - * @param opponentController - * @param target - needed if the ability targets a player or a creature - */ - public CreatureEntersBattlefieldTriggeredAbility(Effect effect, boolean optional, boolean opponentController, Target target) { - super(Zone.BATTLEFIELD, effect, optional); - this.opponentController = opponentController; - this.addTarget(target); - } - public CreatureEntersBattlefieldTriggeredAbility(CreatureEntersBattlefieldTriggeredAbility ability) { super(ability); }