mirror of
https://github.com/correl/mage.git
synced 2025-01-13 03:00:10 +00:00
[MH2] Implemented Ghost-Lit Drifter
This commit is contained in:
parent
65b34ac6b4
commit
d1f31fb1d0
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/g/GhostLitDrifter.java
Normal file
81
Mage.Sets/src/mage/cards/g/GhostLitDrifter.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.ChannelAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GhostLitDrifter extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("another creature");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public GhostLitDrifter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {2}{U}: Another target creature gains flying until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new GainAbilityTargetEffect(
|
||||
FlyingAbility.getInstance(), Duration.EndOfTurn,
|
||||
"another target creature gains flying until end of turn"
|
||||
), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Channel — {X}{U}, Discard Ghost-Lit Drifter: X target creatures gain flying until end of turn.
|
||||
ability = new ChannelAbility("{X}{U}", new GainAbilityTargetEffect(
|
||||
FlyingAbility.getInstance(), Duration.EndOfTurn,
|
||||
"X target creatures gain flying until end of turn"
|
||||
));
|
||||
ability.setTargetAdjuster(GhostLitDrifterAdjuster.instance);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private GhostLitDrifter(final GhostLitDrifter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GhostLitDrifter copy() {
|
||||
return new GhostLitDrifter(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum GhostLitDrifterAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetCreaturePermanent(ability.getManaCostsToPay().getX()));
|
||||
}
|
||||
}
|
|
@ -78,6 +78,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Forest", 489, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fractured Sanity", 44, Rarity.RARE, mage.cards.f.FracturedSanity.class));
|
||||
cards.add(new SetCardInfo("Gaea's Will", 162, Rarity.RARE, mage.cards.g.GaeasWill.class));
|
||||
cards.add(new SetCardInfo("Ghost-Lit Drifter", 45, Rarity.UNCOMMON, mage.cards.g.GhostLitDrifter.class));
|
||||
cards.add(new SetCardInfo("Glinting Creeper", 164, Rarity.UNCOMMON, mage.cards.g.GlintingCreeper.class));
|
||||
cards.add(new SetCardInfo("Glorious Enforcer", 14, Rarity.UNCOMMON, mage.cards.g.GloriousEnforcer.class));
|
||||
cards.add(new SetCardInfo("Goblin Bombardment", 279, Rarity.RARE, mage.cards.g.GoblinBombardment.class));
|
||||
|
|
Loading…
Reference in a new issue