diff --git a/Mage.Sets/src/mage/sets/judgment/KeepWatch.java b/Mage.Sets/src/mage/sets/judgment/KeepWatch.java new file mode 100644 index 00000000000..af495798e2c --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/KeepWatch.java @@ -0,0 +1,92 @@ +/* + * 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.judgment; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.combat.CombatGroup; + +/** + * + * @author jeffwadsworth + */ +public class KeepWatch extends CardImpl { + + public KeepWatch(UUID ownerId) { + super(ownerId, 43, "Keep Watch", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "JUD"; + + this.color.setBlue(true); + + // Draw a card for each attacking creature. + this.getSpellAbility().addEffect(new DrawCardControllerEffect(new AttackingCreatureCount())); + } + + public KeepWatch(final KeepWatch card) { + super(card); + } + + @Override + public KeepWatch copy() { + return new KeepWatch(this); + } +} + +class AttackingCreatureCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility) { + int count = 0; + for (CombatGroup combatGroup : game.getCombat().getGroups()) { + count += combatGroup.getAttackers().size(); + } + return count; + } + + @Override + public DynamicValue copy() { + return this; + } + + @Override + public String getMessage() { + return "attacking creature"; + } + + @Override + public String toString() { + return "one"; + } + +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ShepherdOfRot.java b/Mage.Sets/src/mage/sets/onslaught/ShepherdOfRot.java new file mode 100644 index 00000000000..e17517f0122 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ShepherdOfRot.java @@ -0,0 +1,79 @@ +/* + * 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.onslaught; + +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.TapSourceCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.LoseLifePlayersEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author jeffwadsworth + */ +public class ShepherdOfRot extends CardImpl { + + final String rule = "Each player loses 1 life for each Zombie on the battlefield"; + + static final private FilterPermanent filter = new FilterPermanent("Zombie"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public ShepherdOfRot(UUID ownerId) { + super(ownerId, 168, "Shepherd of Rot", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.subtype.add("Cleric"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Each player loses 1 life for each Zombie on the battlefield. + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new LoseLifePlayersEffect(new PermanentsOnBattlefieldCount(filter), rule), new TapSourceCost())); + } + + public ShepherdOfRot(final ShepherdOfRot card) { + super(card); + } + + @Override + public ShepherdOfRot copy() { + return new ShepherdOfRot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/Helldozer.java b/Mage.Sets/src/mage/sets/planechase/Helldozer.java new file mode 100644 index 00000000000..f5c8cfd89cd --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/Helldozer.java @@ -0,0 +1,111 @@ +/* + * 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.planechase; + +import java.util.UUID; +import mage.Constants; +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.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author jeffwadsworth + */ +public class Helldozer extends CardImpl { + + public Helldozer(UUID ownerId) { + super(ownerId, 30, "Helldozer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}"); + this.expansionSetCode = "HOP"; + this.subtype.add("Zombie"); + this.subtype.add("Giant"); + + this.color.setBlack(true); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // {B}{B}{B}, {tap}: Destroy target land. If that land was nonbasic, untap Helldozer. + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new HelldozerEffect(), new ManaCostsImpl("{B}{B}{B}")); + ability.addTarget(new TargetLandPermanent()); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + } + + public Helldozer(final Helldozer card) { + super(card); + } + + @Override + public Helldozer copy() { + return new Helldozer(this); + } +} + +class HelldozerEffect extends OneShotEffect { + + public HelldozerEffect() { + super(Constants.Outcome.DestroyPermanent); + this.staticText = "Destroy target land. If that land was nonbasic, untap Helldozer"; + } + + public HelldozerEffect(final HelldozerEffect effect) { + super(effect); + } + + @Override + public HelldozerEffect copy() { + return new HelldozerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent helldozer = game.getPermanent(source.getSourceId()); + Permanent landTarget = game.getPermanent(source.getFirstTarget()); + if (landTarget != null) { + landTarget.destroy(id, game, false); + } + Permanent landPermanent = (Permanent) game.getLastKnownInformation(landTarget.getId(), Zone.BATTLEFIELD); + if (landPermanent != null + && !landPermanent.getSupertype().contains("Basic") + && helldozer != null) { + return helldozer.untap(game); + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planechase/KeepWatch.java b/Mage.Sets/src/mage/sets/planechase/KeepWatch.java new file mode 100644 index 00000000000..4131eada591 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/KeepWatch.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.planechase; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class KeepWatch extends mage.sets.judgment.KeepWatch { + + public KeepWatch(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "HOP"; + } + + public KeepWatch(final KeepWatch card) { + super(card); + } + + @Override + public KeepWatch copy() { + return new KeepWatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/Nefashu.java b/Mage.Sets/src/mage/sets/planechase/Nefashu.java new file mode 100644 index 00000000000..61d38ea4147 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/Nefashu.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.planechase; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class Nefashu extends CardImpl { + + final String rule = "Whenever Nefashu attacks, up to five target creatures each get -1/-1 until end of turn."; + + public Nefashu(UUID ownerId) { + super(ownerId, 34, "Nefashu", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "HOP"; + this.subtype.add("Zombie"); + this.subtype.add("Mutant"); + + this.color.setBlack(true); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Whenever Nefashu attacks, up to five target creatures each get -1/-1 until end of turn. + Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect(-1, -1, Constants.Duration.EndOfTurn), false, rule); + ability.addTarget(new TargetCreaturePermanent(0, 5)); + this.addAbility(ability); + } + + public Nefashu(final Nefashu card) { + super(card); + } + + @Override + public Nefashu copy() { + return new Nefashu(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/planechase/ShepherdOfRot.java b/Mage.Sets/src/mage/sets/planechase/ShepherdOfRot.java new file mode 100644 index 00000000000..75f04fd45fc --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/ShepherdOfRot.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.planechase; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class ShepherdOfRot extends mage.sets.onslaught.ShepherdOfRot { + + public ShepherdOfRot(UUID ownerId) { + super(ownerId); + this.cardNumber = 40; + this.expansionSetCode = "HOP"; + } + + public ShepherdOfRot(final ShepherdOfRot card) { + super(card); + } + + @Override + public ShepherdOfRot copy() { + return new ShepherdOfRot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnika/Helldozer.java b/Mage.Sets/src/mage/sets/ravnika/Helldozer.java new file mode 100644 index 00000000000..7f8d58ae679 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnika/Helldozer.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.ravnika; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class Helldozer extends mage.sets.planechase.Helldozer { + + public Helldozer(UUID ownerId) { + super(ownerId); + this.cardNumber = 88; + this.expansionSetCode = "RAV"; + } + + public Helldozer(final Helldozer card) { + super(card); + } + + @Override + public Helldozer copy() { + return new Helldozer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/Nefashu.java b/Mage.Sets/src/mage/sets/scourge/Nefashu.java new file mode 100644 index 00000000000..80573f2de75 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/Nefashu.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.scourge; + +import java.util.UUID; + +/** + * + * @author jeffwadsworth + */ +public class Nefashu extends mage.sets.planechase.Nefashu { + + public Nefashu(UUID ownerId) { + super(ownerId); + this.cardNumber = 70; + this.expansionSetCode = "SCG"; + } + + public Nefashu(final Nefashu card) { + super(card); + } + + @Override + public Nefashu copy() { + return new Nefashu(this); + } +} diff --git a/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java b/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java index 1daee44ef37..ee857b0f127 100644 --- a/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/AttacksTriggeredAbility.java @@ -40,13 +40,21 @@ import mage.game.events.GameEvent.EventType; * @author BetaSteward_at_googlemail.com */ public class AttacksTriggeredAbility extends TriggeredAbilityImpl { + + protected String text; public AttacksTriggeredAbility(Effect effect, boolean optional) { super(Zone.BATTLEFIELD, effect, optional); } + + public AttacksTriggeredAbility(Effect effect, boolean optional, String text) { + super(Zone.BATTLEFIELD, effect, optional); + this.text = text; + } public AttacksTriggeredAbility(final AttacksTriggeredAbility ability) { super(ability); + this.text = ability.text; } @Override @@ -59,7 +67,10 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl { private DynamicValue amount; + String text; public LoseLifePlayersEffect(int amount) { super(Constants.Outcome.Damage); this.amount = new StaticValue(amount); staticText = "each player loses " + amount + " life"; } + + public LoseLifePlayersEffect(DynamicValue amount) { + super(Constants.Outcome.Damage); + this.amount = amount; + staticText = "each player loses " + amount + " life"; + } + + public LoseLifePlayersEffect(DynamicValue amount, String text) { + super(Constants.Outcome.Damage); + this.amount = amount; + staticText = text; + } public LoseLifePlayersEffect(final LoseLifePlayersEffect effect) { super(effect); this.amount = effect.amount; + this.text = effect.text; } @Override