forked from External/mage
[OTJ] Implement Fleeting Reflection
This commit is contained in:
parent
1b88e1eaac
commit
9d0490a6a9
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/f/FleetingReflection.java
Normal file
81
Mage.Sets/src/mage/cards/f/FleetingReflection.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.other.AnotherTargetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.functions.EmptyCopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class FleetingReflection extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other target creature");
|
||||
|
||||
static {
|
||||
filter.add(new AnotherTargetPredicate(2));
|
||||
}
|
||||
|
||||
public FleetingReflection(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Target creature you control gains hexproof until end of turn. Untap that creature. Until end of turn, it becomes a copy of up to one other target creature.
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent().setTargetTag(1));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, filter, false).setTargetTag(2));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new UntapTargetEffect());
|
||||
this.getSpellAbility().addEffect(new FleetingReflectionEffect());
|
||||
}
|
||||
|
||||
private FleetingReflection(final FleetingReflection card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FleetingReflection copy() {
|
||||
return new FleetingReflection(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FleetingReflectionEffect extends OneShotEffect {
|
||||
|
||||
FleetingReflectionEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "Until end of turn, it becomes a copy of up to one other target creature";
|
||||
}
|
||||
|
||||
private FleetingReflectionEffect(final FleetingReflectionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FleetingReflectionEffect copy() {
|
||||
return new FleetingReflectionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent copyTo = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
Permanent copyFrom = game.getPermanentOrLKIBattlefield(source.getTargets().get(1).getFirstTarget());
|
||||
if (copyTo == null || copyFrom == null) {
|
||||
return false;
|
||||
}
|
||||
game.copyPermanent(Duration.EndOfTurn, copyFrom, copyTo.getId(), source, new EmptyCopyApplier());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -81,6 +81,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fake Your Own Death", 87, Rarity.COMMON, mage.cards.f.FakeYourOwnDeath.class));
|
||||
cards.add(new SetCardInfo("Ferocification", 123, Rarity.UNCOMMON, mage.cards.f.Ferocification.class));
|
||||
cards.add(new SetCardInfo("Festering Gulch", 257, Rarity.COMMON, mage.cards.f.FesteringGulch.class));
|
||||
cards.add(new SetCardInfo("Fleeting Reflection", 49, Rarity.UNCOMMON, mage.cards.f.FleetingReflection.class));
|
||||
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forlorn Flats", 258, Rarity.COMMON, mage.cards.f.ForlornFlats.class));
|
||||
cards.add(new SetCardInfo("Form a Posse", 204, Rarity.UNCOMMON, mage.cards.f.FormAPosse.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue