mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
[JUD] Implemented Selfless Exorcist
This commit is contained in:
parent
a204f92bc4
commit
1cd5c631d8
2 changed files with 88 additions and 0 deletions
87
Mage.Sets/src/mage/cards/s/SelflessExorcist.java
Normal file
87
Mage.Sets/src/mage/cards/s/SelflessExorcist.java
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
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.filter.FilterCard;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SelflessExorcist extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCreatureCard("creature card from a graveyard");
|
||||||
|
|
||||||
|
public SelflessExorcist(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.CLERIC);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// {tap}: Exile target creature card from a graveyard. That card deals damage equal to its power to Selfless Exorcist.
|
||||||
|
Ability ability = new SimpleActivatedAbility(new SelflessExorcistEffect(), new TapSourceCost());
|
||||||
|
ability.addTarget(new TargetCardInGraveyard(filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SelflessExorcist(final SelflessExorcist card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SelflessExorcist copy() {
|
||||||
|
return new SelflessExorcist(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SelflessExorcistEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
SelflessExorcistEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "exile target creature card from a graveyard. That card deals damage equal to its power to {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private SelflessExorcistEffect(final SelflessExorcistEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SelflessExorcistEffect copy() {
|
||||||
|
return new SelflessExorcistEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Card card = game.getCard(source.getFirstTarget());
|
||||||
|
if (player == null || card == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
player.moveCards(card, Zone.EXILED, source, game);
|
||||||
|
game.applyEffects();
|
||||||
|
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
if (permanent == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
permanent.damage(card.getPower().getValue(), card.getId(), game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -127,6 +127,7 @@ public final class Judgment extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Riftstone Portal", 143, Rarity.UNCOMMON, mage.cards.r.RiftstonePortal.class));
|
cards.add(new SetCardInfo("Riftstone Portal", 143, Rarity.UNCOMMON, mage.cards.r.RiftstonePortal.class));
|
||||||
cards.add(new SetCardInfo("Scalpelexis", 50, Rarity.RARE, mage.cards.s.Scalpelexis.class));
|
cards.add(new SetCardInfo("Scalpelexis", 50, Rarity.RARE, mage.cards.s.Scalpelexis.class));
|
||||||
cards.add(new SetCardInfo("Seedtime", 130, Rarity.RARE, mage.cards.s.Seedtime.class));
|
cards.add(new SetCardInfo("Seedtime", 130, Rarity.RARE, mage.cards.s.Seedtime.class));
|
||||||
|
cards.add(new SetCardInfo("Selfless Exorcist", 21, Rarity.RARE, mage.cards.s.SelflessExorcist.class));
|
||||||
cards.add(new SetCardInfo("Shieldmage Advocate", 22, Rarity.COMMON, mage.cards.s.ShieldmageAdvocate.class));
|
cards.add(new SetCardInfo("Shieldmage Advocate", 22, Rarity.COMMON, mage.cards.s.ShieldmageAdvocate.class));
|
||||||
cards.add(new SetCardInfo("Silver Seraph", 23, Rarity.RARE, mage.cards.s.SilverSeraph.class));
|
cards.add(new SetCardInfo("Silver Seraph", 23, Rarity.RARE, mage.cards.s.SilverSeraph.class));
|
||||||
cards.add(new SetCardInfo("Solitary Confinement", 24, Rarity.RARE, mage.cards.s.SolitaryConfinement.class));
|
cards.add(new SetCardInfo("Solitary Confinement", 24, Rarity.RARE, mage.cards.s.SolitaryConfinement.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue