From 338ae94560ed62fd3a7f2cee2e6920eb5fbc4021 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 2 Feb 2022 08:57:07 -0500 Subject: [PATCH] [NEO] Implemented Futurist Operative --- .../src/mage/cards/f/FuturistOperative.java | 106 ++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 107 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FuturistOperative.java diff --git a/Mage.Sets/src/mage/cards/f/FuturistOperative.java b/Mage.Sets/src/mage/cards/f/FuturistOperative.java new file mode 100644 index 0000000000..1bffde419d --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FuturistOperative.java @@ -0,0 +1,106 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalRestrictionEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FuturistOperative extends CardImpl { + + public FuturistOperative(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NINJA); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // As long as Futurist Operative is tapped, it's a Human Citizen with base power and toughness 1/1 and can't be blocked. + Ability ability = new SimpleStaticAbility(new FuturistOperativeEffect()); + ability.addEffect(new ConditionalRestrictionEffect( + new CantBeBlockedSourceEffect(), SourceTappedCondition.instance, "and can't be blocked" + )); + this.addAbility(ability); + + // {2}{U}: Untap Futurist Operative. + this.addAbility(new SimpleActivatedAbility(new UntapSourceEffect(), new ManaCostsImpl<>("{2}{U}"))); + } + + private FuturistOperative(final FuturistOperative card) { + super(card); + } + + @Override + public FuturistOperative copy() { + return new FuturistOperative(this); + } +} + +class FuturistOperativeEffect extends ContinuousEffectImpl { + + FuturistOperativeEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "as long as {this} is tapped, it's a Human Citizen with base power and toughness 1/1"; + } + + private FuturistOperativeEffect(final FuturistOperativeEffect effect) { + super(effect); + } + + @Override + public FuturistOperativeEffect copy() { + return new FuturistOperativeEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent permanent = source.getSourcePermanentIfItStillExists(game); + if (permanent == null || !permanent.isTapped()) { + return false; + } + switch (layer) { + case TypeChangingEffects_4: + permanent.removeAllSubTypes(game); + permanent.addSubType(game, SubType.HUMAN, SubType.CITIZEN); + return true; + case PTChangingEffects_7: + if (sublayer == SubLayer.SetPT_7b) { + permanent.getPower().setValue(1); + permanent.getToughness().setValue(1); + return true; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + switch (layer) { + case TypeChangingEffects_4: + case PTChangingEffects_7: + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index b25e0dffc5..7dde184947 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -53,6 +53,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Essence Capture", 52, Rarity.UNCOMMON, mage.cards.e.EssenceCapture.class)); cards.add(new SetCardInfo("Fang of Shigeki", 183, Rarity.COMMON, mage.cards.f.FangOfShigeki.class)); cards.add(new SetCardInfo("Forest", 291, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Futurist Operative", 53, Rarity.UNCOMMON, mage.cards.f.FuturistOperative.class)); cards.add(new SetCardInfo("Generous Visitor", 185, Rarity.UNCOMMON, mage.cards.g.GenerousVisitor.class)); cards.add(new SetCardInfo("Geothermal Kami", 186, Rarity.COMMON, mage.cards.g.GeothermalKami.class)); cards.add(new SetCardInfo("Gloomshrieker", 219, Rarity.UNCOMMON, mage.cards.g.Gloomshrieker.class));