mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Implemented Infernal Judgment
This commit is contained in:
parent
161f3c0391
commit
403b17b334
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/i/InfernalJudgment.java
Normal file
76
Mage.Sets/src/mage/cards/i/InfernalJudgment.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class InfernalJudgment extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("colorless creature");
|
||||
|
||||
static {
|
||||
filter.add(new ColorlessPredicate());
|
||||
}
|
||||
|
||||
public InfernalJudgment(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
||||
// Exile target colorless creature. You gain life equal to its power.
|
||||
this.getSpellAbility().addEffect(new InfernalJudgmentEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
}
|
||||
|
||||
public InfernalJudgment(final InfernalJudgment card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernalJudgment copy() {
|
||||
return new InfernalJudgment(this);
|
||||
}
|
||||
}
|
||||
|
||||
class InfernalJudgmentEffect extends OneShotEffect {
|
||||
|
||||
public InfernalJudgmentEffect() {
|
||||
super(Outcome.GainLife);
|
||||
staticText = "exile target colorless creature. You gain life equal to its power";
|
||||
}
|
||||
|
||||
public InfernalJudgmentEffect(final InfernalJudgmentEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernalJudgmentEffect copy() {
|
||||
return new InfernalJudgmentEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (permanent == null || player == null) {
|
||||
return false;
|
||||
}
|
||||
int creaturePower = permanent.getPower().getValue();
|
||||
permanent.moveToExile(null, null, source.getSourceId(), game);
|
||||
game.applyEffects();
|
||||
player.gainLife(creaturePower, game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -63,6 +63,7 @@ public final class CoreSet2019 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Herald of Faith", 13, Rarity.UNCOMMON, mage.cards.h.HeraldOfFaith.class));
|
||||
cards.add(new SetCardInfo("Highland Game", 188, Rarity.COMMON, mage.cards.h.HighlandGame.class));
|
||||
cards.add(new SetCardInfo("Hostile Minotaur", 147, Rarity.COMMON, mage.cards.h.HostileMinotaur.class));
|
||||
cards.add(new SetCardInfo("Infernal Judgment", 102, Rarity.RARE, mage.cards.i.InfernalJudgment.class));
|
||||
cards.add(new SetCardInfo("Infernal Scarring", 103, Rarity.COMMON, mage.cards.i.InfernalScarring.class));
|
||||
cards.add(new SetCardInfo("Inspired Charge", 15, Rarity.COMMON, mage.cards.i.InspiredCharge.class));
|
||||
cards.add(new SetCardInfo("Kargan Dragonrider", 297, Rarity.COMMON, mage.cards.k.KarganDragonrider.class));
|
||||
|
|
Loading…
Reference in a new issue