forked from External/mage
[40K] Implemented Grey Knight Paragon
This commit is contained in:
parent
f21c2a6b2b
commit
78d323d994
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/g/GreyKnightParagon.java
Normal file
78
Mage.Sets/src/mage/cards/g/GreyKnightParagon.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GreyKnightParagon extends CardImpl {
|
||||
|
||||
public GreyKnightParagon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||
|
||||
this.subtype.add(SubType.ASTARTES);
|
||||
this.subtype.add(SubType.KNIGHT);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Rites of Banishment -- When Grey Knight Paragon enters the battlefield, destroy target attacking creature. If that creature is a Demon, exile it instead.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GreyKnightParagonEffect());
|
||||
ability.addTarget(new TargetAttackingCreature());
|
||||
this.addAbility(ability.withFlavorWord("Rites of Banishment"));
|
||||
}
|
||||
|
||||
private GreyKnightParagon(final GreyKnightParagon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GreyKnightParagon copy() {
|
||||
return new GreyKnightParagon(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GreyKnightParagonEffect extends OneShotEffect {
|
||||
|
||||
GreyKnightParagonEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "destroy target attacking creature. If that creature is a Demon, exile it instead";
|
||||
}
|
||||
|
||||
private GreyKnightParagonEffect(final GreyKnightParagonEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GreyKnightParagonEffect copy() {
|
||||
return new GreyKnightParagonEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
return player != null && permanent != null
|
||||
&& (permanent.hasSubtype(SubType.DEMON, game)
|
||||
? player.moveCards(permanent, Zone.EXILED, source, game)
|
||||
: permanent.destroy(source, game));
|
||||
}
|
||||
}
|
||||
|
|
@ -103,6 +103,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Go for the Throat", 201, Rarity.COMMON, mage.cards.g.GoForTheThroat.class));
|
||||
cards.add(new SetCardInfo("Goliath Truck", 158, Rarity.UNCOMMON, mage.cards.g.GoliathTruck.class));
|
||||
cards.add(new SetCardInfo("Great Unclean One", 35, Rarity.RARE, mage.cards.g.GreatUncleanOne.class));
|
||||
cards.add(new SetCardInfo("Grey Knight Paragon", 13, Rarity.UNCOMMON, mage.cards.g.GreyKnightParagon.class));
|
||||
cards.add(new SetCardInfo("Hardened Scales", 215, Rarity.RARE, mage.cards.h.HardenedScales.class));
|
||||
cards.add(new SetCardInfo("Harrow", 216, Rarity.COMMON, mage.cards.h.Harrow.class));
|
||||
cards.add(new SetCardInfo("Hedron Archive", 240, Rarity.UNCOMMON, mage.cards.h.HedronArchive.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue