diff --git a/Mage.Sets/src/mage/sets/elspethvstezzeret/GoldmeadowHarrier.java b/Mage.Sets/src/mage/sets/elspethvstezzeret/GoldmeadowHarrier.java new file mode 100644 index 00000000000..ad64eabcecd --- /dev/null +++ b/Mage.Sets/src/mage/sets/elspethvstezzeret/GoldmeadowHarrier.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.elspethvstezzeret; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Abilities; +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.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class GoldmeadowHarrier extends CardImpl { + + public GoldmeadowHarrier (UUID ownerId) { + super(ownerId, 3, "Goldmeadow Harrier", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "DDF"; + this.subtype.add("Kithkin"); + this.subtype.add("Soldier"); + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public GoldmeadowHarrier (final GoldmeadowHarrier card) { + super(card); + } + + @Override + public GoldmeadowHarrier copy() { + return new GoldmeadowHarrier(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/PhyrexianRager.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/PhyrexianRager.java index 41aee083616..e62905aa987 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/PhyrexianRager.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/PhyrexianRager.java @@ -29,31 +29,17 @@ package mage.sets.mirrodinbesieged; 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.DrawCardControllerEffect; -import mage.abilities.effects.common.LoseLifeSourceEffect; -import mage.cards.CardImpl; /** * * @author Loki */ -public class PhyrexianRager extends CardImpl { +public class PhyrexianRager extends mage.sets.tenth.PhyrexianRager { public PhyrexianRager (UUID ownerId) { - super(ownerId, 51, "Phyrexian Rager", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + super(ownerId); + this.cardNumber = 51; this.expansionSetCode = "MBS"; - this.subtype.add("Horror"); - this.color.setBlack(true); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1), false); - ability.addEffect(new LoseLifeSourceEffect(1)); - this.addAbility(ability); } public PhyrexianRager (final PhyrexianRager card) { diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/Sangromancer.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/Sangromancer.java new file mode 100644 index 00000000000..839ae3ff7f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/Sangromancer.java @@ -0,0 +1,135 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.mirrodinbesieged; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author Loki + */ +public class Sangromancer extends CardImpl { + + public Sangromancer (UUID ownerId) { + super(ownerId, 53, "Sangromancer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "MBS"; + this.subtype.add("Vampire"); + this.subtype.add("Shaman"); + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new SangromancerFirstTriggeredAbility()); + this.addAbility(new SangromancerSecondTriggeredAbility()); + } + + public Sangromancer (final Sangromancer card) { + super(card); + } + + @Override + public Sangromancer copy() { + return new Sangromancer(this); + } +} + +class SangromancerFirstTriggeredAbility extends TriggeredAbilityImpl { + SangromancerFirstTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new GainLifeEffect(3), true); + } + + SangromancerFirstTriggeredAbility(final SangromancerFirstTriggeredAbility ability) { + super(ability); + } + + @Override + public SangromancerFirstTriggeredAbility copy() { + return new SangromancerFirstTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getFromZone() == Constants.Zone.BATTLEFIELD && zEvent.getToZone() == Constants.Zone.GRAVEYARD) { + Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD); + if (p != null && p.getCardType().contains(CardType.CREATURE) && game.getOpponents(this.getControllerId()).contains(p.getControllerId())) { + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature an opponent controls is put into a graveyard from the battlefield, " + super.getRule(); + } +} + +class SangromancerSecondTriggeredAbility extends TriggeredAbilityImpl { + SangromancerSecondTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new GainLifeEffect(3), true); + } + + SangromancerSecondTriggeredAbility(final SangromancerSecondTriggeredAbility ability) { + super(ability); + } + + @Override + public SangromancerSecondTriggeredAbility copy() { + return new SangromancerSecondTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DISCARDED_CARD && game.getOpponents(this.getControllerId()).contains(event.getPlayerId())) { + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever an opponent discards a card, " + super.getRule(); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/tenth/PhyrexianRager.java b/Mage.Sets/src/mage/sets/tenth/PhyrexianRager.java new file mode 100644 index 00000000000..c8726ca79d9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/PhyrexianRager.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.tenth; + +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.DrawCardControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceEffect; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class PhyrexianRager extends CardImpl { + + public PhyrexianRager (UUID ownerId) { + super(ownerId, 167, "Phyrexian Rager", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "10E"; + this.subtype.add("Horror"); + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1), false); + ability.addEffect(new LoseLifeSourceEffect(1)); + this.addAbility(ability); + } + + public PhyrexianRager (final PhyrexianRager card) { + super(card); + } + + @Override + public PhyrexianRager copy() { + return new PhyrexianRager(this); + } + +}