mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Implement [WHO] Flesh Duplicate; Zygon Infiltrator (#12053)
--------- Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
This commit is contained in:
parent
bb783a318e
commit
3ea0e88268
3 changed files with 172 additions and 0 deletions
63
Mage.Sets/src/mage/cards/f/FleshDuplicate.java
Normal file
63
Mage.Sets/src/mage/cards/f/FleshDuplicate.java
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.common.CopyPermanentEffect;
|
||||
import mage.abilities.keyword.VanishingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.util.functions.CopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Skiwkr
|
||||
*/
|
||||
public final class FleshDuplicate extends CardImpl {
|
||||
|
||||
public FleshDuplicate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}");
|
||||
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
this.subtype.add(SubType.REBEL);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// You may have Flesh Duplicate enter the battlefield as a copy of any creature on the battlefield, except it has vanishing 3 if that creature doesn't have vanishing.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new FleshDuplicateCopyApplier()),
|
||||
true
|
||||
));
|
||||
}
|
||||
|
||||
private FleshDuplicate(final FleshDuplicate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FleshDuplicate copy() {
|
||||
return new FleshDuplicate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FleshDuplicateCopyApplier extends CopyApplier {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) {
|
||||
if (!blueprint.getAbilities().containsClass(VanishingAbility.class)) {
|
||||
blueprint.getAbilities().add(new VanishingAbility(3));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String getText() {
|
||||
return ", except it has vanishing 3 if that creature doesn't have vanishing.";
|
||||
}
|
||||
}
|
||||
107
Mage.Sets/src/mage/cards/z/ZygonInfiltrator.java
Normal file
107
Mage.Sets/src/mage/cards/z/ZygonInfiltrator.java
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
package mage.cards.z;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
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.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Skiwkr
|
||||
*/
|
||||
public final class ZygonInfiltrator extends CardImpl {
|
||||
|
||||
public ZygonInfiltrator(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
this.subtype.add(SubType.ALIEN);
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Body-print -- {2}{U}: Tap another target creature and put a stun counter on it. Zygon Infiltrator becomes a copy of that creature for as long as that creature remains tapped. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl<>("{2}{U}"));
|
||||
ability.addEffect(new AddCountersTargetEffect(CounterType.STUN.createInstance(1)).setText("and put a stun counter on it"));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||
ability.addEffect(new ZygonInfiltratorEffect());
|
||||
this.addAbility(ability.withFlavorWord("Body-print"));
|
||||
}
|
||||
|
||||
private ZygonInfiltrator(final ZygonInfiltrator card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZygonInfiltrator copy() {
|
||||
return new ZygonInfiltrator(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ZygonInfiltratorEffect extends OneShotEffect {
|
||||
|
||||
ZygonInfiltratorEffect() {
|
||||
super(Outcome.Copy);
|
||||
staticText = "{this} becomes a copy of that creature for as long as " +
|
||||
"that creature remains tapped.";
|
||||
}
|
||||
|
||||
private ZygonInfiltratorEffect(final ZygonInfiltratorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZygonInfiltratorEffect copy() {
|
||||
return new ZygonInfiltratorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent tappedCreature = game.getPermanent(source.getFirstTarget());
|
||||
Permanent sourceCreature = source.getSourcePermanentIfItStillExists(game);
|
||||
if (tappedCreature == null || sourceCreature == null) {
|
||||
return false;
|
||||
}
|
||||
game.addEffect(new ZygonInfiltratorCopyEffect(sourceCreature, tappedCreature), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class ZygonInfiltratorCopyEffect extends CopyEffect {
|
||||
|
||||
ZygonInfiltratorCopyEffect(Permanent sourceCreature, Permanent tappedCreature) {
|
||||
super(Duration.Custom, tappedCreature, sourceCreature.getId());
|
||||
}
|
||||
|
||||
private ZygonInfiltratorCopyEffect(final ZygonInfiltratorCopyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZygonInfiltratorCopyEffect copy() {
|
||||
return new ZygonInfiltratorCopyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInactive(Ability source, Game game) {
|
||||
if (super.isInactive(source, game)) {
|
||||
return true;
|
||||
}
|
||||
Permanent targetPermanent = game.getPermanent(source.getFirstTarget());
|
||||
return targetPermanent == null || !targetPermanent.isTapped();
|
||||
}
|
||||
}
|
||||
|
|
@ -96,6 +96,7 @@ public final class DoctorWho extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Five Hundred Year Diary", 42, Rarity.RARE, mage.cards.f.FiveHundredYearDiary.class));
|
||||
cards.add(new SetCardInfo("Flaming Tyrannosaurus", 85, Rarity.RARE, mage.cards.f.FlamingTyrannosaurus.class));
|
||||
cards.add(new SetCardInfo("Flatline", 43, Rarity.RARE, mage.cards.f.Flatline.class));
|
||||
cards.add(new SetCardInfo("Flesh Duplicate", 44, Rarity.RARE, mage.cards.f.FleshDuplicate.class));
|
||||
cards.add(new SetCardInfo("Foreboding Ruins", 279, Rarity.RARE, mage.cards.f.ForebodingRuins.class));
|
||||
cards.add(new SetCardInfo("Forest", 204, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Fortified Village", 280, Rarity.RARE, mage.cards.f.FortifiedVillage.class));
|
||||
|
|
@ -287,5 +288,6 @@ public final class DoctorWho extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Wound Reflection", 223, Rarity.RARE, mage.cards.w.WoundReflection.class));
|
||||
cards.add(new SetCardInfo("Wreck and Rebuild", 169, Rarity.UNCOMMON, mage.cards.w.WreckAndRebuild.class));
|
||||
cards.add(new SetCardInfo("Yasmin Khan", 7, Rarity.RARE, mage.cards.y.YasminKhan.class));
|
||||
cards.add(new SetCardInfo("Zygon Infiltrator", 63, Rarity.UNCOMMON, mage.cards.z.ZygonInfiltrator.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue