mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Implemented Alaborn Zealot, fixed text on several cards with block triggers
This commit is contained in:
parent
6725c50b4a
commit
ee5bd655c6
9 changed files with 96 additions and 48 deletions
|
|
@ -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);
|
||||
|
|
|
|||
69
Mage.Sets/src/mage/cards/a/AlabornZealot.java
Normal file
69
Mage.Sets/src/mage/cards/a/AlabornZealot.java
Normal file
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue