mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TDM] Implement Naga Fleshcrafter
This commit is contained in:
parent
325b4a0461
commit
c9148aa2d3
2 changed files with 103 additions and 0 deletions
102
Mage.Sets/src/mage/cards/n/NagaFleshcrafter.java
Normal file
102
Mage.Sets/src/mage/cards/n/NagaFleshcrafter.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.costs.common.ExileSourceFromGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyPermanentEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NagaFleshcrafter extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("nonlegendary creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
|
||||
}
|
||||
|
||||
public NagaFleshcrafter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
|
||||
this.subtype.add(SubType.SNAKE);
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// You may have this creature enter as a copy of any creature on the battlefield.
|
||||
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(), true));
|
||||
|
||||
// Renew -- {2}{U}, Exile this card from your graveyard: Put a +1/+1 counter on target nonlegendary creature you control. Each other creature you control becomes a copy of that creature until end of turn. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
new ManaCostsImpl<>("{2}{U}")
|
||||
);
|
||||
ability.addCost(new ExileSourceFromGraveCost());
|
||||
ability.addEffect(new NagaFleshcrafterEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability.setAbilityWord(AbilityWord.RENEW));
|
||||
}
|
||||
|
||||
private NagaFleshcrafter(final NagaFleshcrafter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NagaFleshcrafter copy() {
|
||||
return new NagaFleshcrafter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NagaFleshcrafterEffect extends OneShotEffect {
|
||||
|
||||
NagaFleshcrafterEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each other creature you control becomes a copy of that creature until end of turn";
|
||||
}
|
||||
|
||||
private NagaFleshcrafterEffect(final NagaFleshcrafterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NagaFleshcrafterEffect copy() {
|
||||
return new NagaFleshcrafterEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE,
|
||||
source.getControllerId(), source, game
|
||||
)) {
|
||||
if (!permanent.getId().equals(creature.getId())) {
|
||||
game.copyPermanent(Duration.EndOfTurn, permanent, creature.getId(), source, null);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -149,6 +149,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mountain", 283, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mox Jasper", 246, Rarity.MYTHIC, mage.cards.m.MoxJasper.class));
|
||||
cards.add(new SetCardInfo("Mystic Monastery", 262, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class));
|
||||
cards.add(new SetCardInfo("Naga Fleshcrafter", 52, Rarity.RARE, mage.cards.n.NagaFleshcrafter.class));
|
||||
cards.add(new SetCardInfo("Narset's Rebuke", 114, Rarity.COMMON, mage.cards.n.NarsetsRebuke.class));
|
||||
cards.add(new SetCardInfo("Narset, Jeskai Waymaster", 209, Rarity.RARE, mage.cards.n.NarsetJeskaiWaymaster.class));
|
||||
cards.add(new SetCardInfo("Nature's Rhythm", 150, Rarity.RARE, mage.cards.n.NaturesRhythm.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue