diff --git a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java index bd3f73d3d6a..fe9bd4e47b5 100644 --- a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java +++ b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java @@ -67,7 +67,7 @@ public class AgelessSentinels extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Ageless Sentinels blocks, it becomes a Bird Giant, and it loses defender. - Ability ability = new BlocksTriggeredAbility(new AgelessSentinelsEffect(), false); + Ability ability = new BlocksTriggeredAbility(new AgelessSentinelsEffect(), false, false, true); Effect effect = new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield); effect.setText("and it loses defender"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/a/AlabornZealot.java b/Mage.Sets/src/mage/cards/a/AlabornZealot.java new file mode 100644 index 00000000000..37b137ba16d --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AlabornZealot.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public class AlabornZealot extends CardImpl { + + public AlabornZealot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Alaborn Zealot blocks a creature, destroy that creature and Alaborn Zealot. + Ability ability = new BlocksTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); + ability.addEffect(new DestroySourceEffect().setText("and {this}")); + this.addAbility(ability); + } + + public AlabornZealot(final AlabornZealot card) { + super(card); + } + + @Override + public AlabornZealot copy() { + return new AlabornZealot(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CinderWall.java b/Mage.Sets/src/mage/cards/c/CinderWall.java index 94215962aa1..3d7b059518b 100644 --- a/Mage.Sets/src/mage/cards/c/CinderWall.java +++ b/Mage.Sets/src/mage/cards/c/CinderWall.java @@ -46,7 +46,7 @@ import mage.constants.SubType; public class CinderWall extends CardImpl { public CinderWall(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); this.subtype.add(SubType.WALL); this.power = new MageInt(3); @@ -55,9 +55,10 @@ public class CinderWall extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // When Cinder Wall blocks, destroy it at end of combat. - this.addAbility( - new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroySourceEffect())) - , false)); + this.addAbility(new BlocksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroySourceEffect())), + false, false, true + )); } public CinderWall(final CinderWall card) { diff --git a/Mage.Sets/src/mage/cards/d/DefiantVanguard.java b/Mage.Sets/src/mage/cards/d/DefiantVanguard.java index 45de395c37c..3b28b8d6dc4 100644 --- a/Mage.Sets/src/mage/cards/d/DefiantVanguard.java +++ b/Mage.Sets/src/mage/cards/d/DefiantVanguard.java @@ -80,7 +80,10 @@ public class DefiantVanguard extends CardImpl { // When Defiant Vanguard blocks, at end of combat, destroy it and all creatures it blocked this turn. this.addAbility( - new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DefiantVanguardEffect())), false), + new BlocksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DefiantVanguardEffect())), + false, false, true + ), new BlockedAttackerWatcher() ); diff --git a/Mage.Sets/src/mage/cards/l/LoyalSentry.java b/Mage.Sets/src/mage/cards/l/LoyalSentry.java index 0f58f0d88ae..d7ba486a57c 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalSentry.java +++ b/Mage.Sets/src/mage/cards/l/LoyalSentry.java @@ -31,14 +31,12 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BlocksTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Outcome; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -55,7 +53,9 @@ public class LoyalSentry extends CardImpl { this.toughness = new MageInt(1); // When Loyal Sentry blocks a creature, destroy that creature and Loyal Sentry. - this.addAbility(new BlocksTriggeredAbility(new LoyalSentryEffect(), false, true)); + Ability ability = new BlocksTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); + ability.addEffect(new DestroySourceEffect().setText("and {this}")); + this.addAbility(ability); } public LoyalSentry(final LoyalSentry card) { @@ -67,34 +67,3 @@ public class LoyalSentry extends CardImpl { return new LoyalSentry(this); } } - -class LoyalSentryEffect extends OneShotEffect { - - LoyalSentryEffect() { - super(Outcome.DestroyPermanent); - staticText = "destroy that creature and {this}"; - } - - LoyalSentryEffect(LoyalSentryEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent p = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (p != null) { - p.destroy(source.getSourceId(), game, false); - } - Permanent s = game.getPermanent(source.getSourceId()); - if (s != null) { - s.destroy(source.getSourceId(), game, false); - } - return true; - } - - @Override - public LoyalSentryEffect copy() { - return new LoyalSentryEffect(this); - } - -} diff --git a/Mage.Sets/src/mage/cards/s/StoicEphemera.java b/Mage.Sets/src/mage/cards/s/StoicEphemera.java index 2c78feb9be6..9587de28d89 100644 --- a/Mage.Sets/src/mage/cards/s/StoicEphemera.java +++ b/Mage.Sets/src/mage/cards/s/StoicEphemera.java @@ -47,7 +47,7 @@ import mage.constants.SubType; public class StoicEphemera extends CardImpl { public StoicEphemera(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(5); this.toughness = new MageInt(5); @@ -57,8 +57,11 @@ public class StoicEphemera extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Stoic Ephemera blocks, sacrifice it at end of combat. - this.addAbility(new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( - new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())), false)); + this.addAbility(new BlocksTriggeredAbility( + new CreateDelayedTriggeredAbilityEffect( + new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect()) + ), false, false, true + )); } public StoicEphemera(final StoicEphemera card) { diff --git a/Mage.Sets/src/mage/cards/w/WallOfJunk.java b/Mage.Sets/src/mage/cards/w/WallOfJunk.java index 7aab73c4625..39bf45f978a 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfJunk.java +++ b/Mage.Sets/src/mage/cards/w/WallOfJunk.java @@ -47,7 +47,7 @@ import mage.constants.SubType; public class WallOfJunk extends CardImpl { public WallOfJunk(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(7); @@ -59,7 +59,7 @@ public class WallOfJunk extends CardImpl { Effect effect = new CreateDelayedTriggeredAbilityEffect( new AtTheEndOfCombatDelayedTriggeredAbility(new ReturnToHandSourceEffect(true))); effect.setText("return it to its owner's hand at end of combat"); - this.addAbility(new BlocksTriggeredAbility(effect, false)); + this.addAbility(new BlocksTriggeredAbility(effect, false, false, true)); } public WallOfJunk(final WallOfJunk card) { diff --git a/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java b/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java index 1696fcde21d..dc852ff723f 100644 --- a/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java +++ b/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java @@ -51,7 +51,9 @@ public class ZephyrSpirit extends CardImpl { // When Zephyr Spirit blocks, return it to its owner's hand. this.addAbility(new BlocksTriggeredAbility( - new ReturnToHandSourceEffect(true).setText("return it to its owner's hand"), false)); + new ReturnToHandSourceEffect(true).setText("return it to its owner's hand"), + false, false, true + )); } public ZephyrSpirit(final ZephyrSpirit card) { diff --git a/Mage.Sets/src/mage/sets/PortalSecondAge.java b/Mage.Sets/src/mage/sets/PortalSecondAge.java index 8c36225d915..1abbd4e4edc 100644 --- a/Mage.Sets/src/mage/sets/PortalSecondAge.java +++ b/Mage.Sets/src/mage/sets/PortalSecondAge.java @@ -64,6 +64,7 @@ public class PortalSecondAge extends ExpansionSet { cards.add(new SetCardInfo("Alaborn Musketeer", 123, Rarity.COMMON, mage.cards.a.AlabornMusketeer.class)); cards.add(new SetCardInfo("Alaborn Trooper", 124, Rarity.COMMON, mage.cards.a.AlabornTrooper.class)); cards.add(new SetCardInfo("Alaborn Veteran", 125, Rarity.RARE, mage.cards.a.AlabornVeteran.class)); + cards.add(new SetCardInfo("Alaborn Zealot", 126, Rarity.UNCOMMON, mage.cards.a.AlabornZealot.class)); cards.add(new SetCardInfo("Alluring Scent", 61, Rarity.RARE, mage.cards.a.AlluringScent.class)); cards.add(new SetCardInfo("Ancient Craving", 2, Rarity.RARE, mage.cards.a.AncientCraving.class)); cards.add(new SetCardInfo("Angelic Blessing", 129, Rarity.COMMON, mage.cards.a.AngelicBlessing.class));