mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Hate Mirage
This commit is contained in:
parent
33276eb55e
commit
311e35e3a4
2 changed files with 86 additions and 0 deletions
85
Mage.Sets/src/mage/cards/h/HateMirage.java
Normal file
85
Mage.Sets/src/mage/cards/h/HateMirage.java
Normal file
|
@ -0,0 +1,85 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HateMirage extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("creatures you don't control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||
}
|
||||
|
||||
public HateMirage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
|
||||
// Choose up to two target creatures you don't control. For each of those creatures, create a token that's a copy of that creature. Those tokens gain haste. Exile them at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new HateMirageEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(0, 2, filter, false));
|
||||
}
|
||||
|
||||
private HateMirage(final HateMirage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HateMirage copy() {
|
||||
return new HateMirage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HateMirageEffect extends OneShotEffect {
|
||||
|
||||
HateMirageEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Choose up to two target creatures you don't control. " +
|
||||
"For each of those creatures, create a token that's a copy of that creature. " +
|
||||
"Those tokens gain haste. Exile them at the beginning of the next end step.";
|
||||
}
|
||||
|
||||
private HateMirageEffect(final HateMirageEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HateMirageEffect copy() {
|
||||
return new HateMirageEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
source.getTargets()
|
||||
.stream()
|
||||
.map(Target::getTargets)
|
||||
.flatMap(Collection::stream)
|
||||
.forEach(uuid -> {
|
||||
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(
|
||||
source.getId(), null, true
|
||||
);
|
||||
effect.setTargetPointer(new FixedTarget(uuid, game));
|
||||
effect.apply(game, source);
|
||||
effect.exileTokensCreatedAtNextEndStep(game, source);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -134,6 +134,7 @@ public final class Commander2019Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Gruul Turf", 250, Rarity.UNCOMMON, mage.cards.g.GruulTurf.class));
|
||||
cards.add(new SetCardInfo("Guttersnipe", 145, Rarity.UNCOMMON, mage.cards.g.Guttersnipe.class));
|
||||
cards.add(new SetCardInfo("Harmonize", 171, Rarity.UNCOMMON, mage.cards.h.Harmonize.class));
|
||||
cards.add(new SetCardInfo("Hate Mirage", 26, Rarity.UNCOMMON, mage.cards.h.HateMirage.class));
|
||||
cards.add(new SetCardInfo("Heart-Piercer Manticore", 146, Rarity.RARE, mage.cards.h.HeartPiercerManticore.class));
|
||||
cards.add(new SetCardInfo("Hedonist's Trove", 119, Rarity.RARE, mage.cards.h.HedonistsTrove.class));
|
||||
cards.add(new SetCardInfo("Hedron Archive", 214, Rarity.UNCOMMON, mage.cards.h.HedronArchive.class));
|
||||
|
|
Loading…
Reference in a new issue