[ONE] Implement Unctus, Grand Metatect

This commit is contained in:
theelk801 2023-01-15 17:37:33 -05:00
parent 220fd75ef8
commit 880383004b
3 changed files with 130 additions and 1 deletions

View file

@ -0,0 +1,128 @@
package mage.cards.u;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.BecomesTappedSourceTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.constants.*;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent;
/**
* @author TheElk801
*/
public final class UnctusGrandMetatect extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("blue creatures");
static {
filter.add(new ColorPredicate(ObjectColor.BLUE));
}
public UnctusGrandMetatect(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.VEDALKEN);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Other blue creatures you control have "Whenever this creature becomes tapped, draw a card, then discard a card."
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new BecomesTappedSourceTriggeredAbility(
new DrawDiscardControllerEffect(1, 1)
), Duration.WhileOnBattlefield, filter, true
)));
// Other artifact creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE, true
)));
// {U/P}: Until end of turn, target creature you control becomes a blue artifact in addition to its other colors and types. Activate only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(
new UnctusGrandMetatectEffect(), new ManaCostsImpl<>("{U/P}")
);
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}
private UnctusGrandMetatect(final UnctusGrandMetatect card) {
super(card);
}
@Override
public UnctusGrandMetatect copy() {
return new UnctusGrandMetatect(this);
}
}
class UnctusGrandMetatectEffect extends ContinuousEffectImpl {
UnctusGrandMetatectEffect() {
super(Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, target creature you control " +
"becomes a blue artifact in addition to its other colors and types";
}
private UnctusGrandMetatectEffect(final UnctusGrandMetatectEffect effect) {
super(effect);
}
@Override
public UnctusGrandMetatectEffect copy() {
return new UnctusGrandMetatectEffect(this);
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null) {
discard();
return false;
}
switch (layer) {
case TypeChangingEffects_4:
permanent.addCardType(game, CardType.ARTIFACT);
return true;
case ColorChangingEffects_5:
permanent.getColor(game).setBlue(true);
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 ColorChangingEffects_5:
return true;
}
return false;
}
}

View file

@ -52,6 +52,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Tablet of Compleation", 245, Rarity.RARE, mage.cards.t.TabletOfCompleation.class));
cards.add(new SetCardInfo("The Monumental Facade", 255, Rarity.RARE, mage.cards.t.TheMonumentalFacade.class));
cards.add(new SetCardInfo("Unctus, Grand Metatect", 75, Rarity.RARE, mage.cards.u.UnctusGrandMetatect.class));
cards.add(new SetCardInfo("Urabrask's Forge", 153, Rarity.RARE, mage.cards.u.UrabrasksForge.class));
cards.add(new SetCardInfo("Venser, Corpse Puppet", 218, Rarity.RARE, mage.cards.v.VenserCorpsePuppet.class));
cards.add(new SetCardInfo("Vindictive Flamestoker", 154, Rarity.RARE, mage.cards.v.VindictiveFlamestoker.class));

View file

@ -47665,7 +47665,7 @@ Blue Sun's Twilight|Phyrexia: All Will Be One|43|R|{X}{U}{U}|Sorcery|||Gain cont
Encroaching Mycosynth|Phyrexia: All Will Be One|47|R|{3}{U}|Artifact|||Nonland permanents you control are artifacts in addition to their other types. The same is true for permanent spells you control and nonland permament cards you own that aren't on the battlefield.|
Mercurial Spelldancer|Phyrexia: All Will Be One|61|R|{1}{U}|Creature - Phyrexian Rogue|2|1|Mercurial Spelldancer can't be blocked.$Whenever you cast a noncreature spell, put an oil counter on Mercurial Spelldancer.$Whenever Mercurial Spelldancer deals combat damage to a player, you may remove two oil counters from it. If you do, when you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.|
Mindsplice Apparatus|Phyrexia: All Will Be One|63|R|{3}{U}|Artifact|||Flash$At the beginning of your upkeep, put an oil counter on Mindsplice Apparatus.$Instant and sorcery spells you cast cost 1 less to cast for each oil counter on Mindsplice Apparatus.|
Unctus Grand Metatect|Phyrexia: All Will Be One|75|R|{1}{U}{U}|Legendary Creature - Phyrexian Vedalken|2|4|Other blue creatures you control have "Whenever this creature becomes tapped, draw a card, then discard a card."$Other artifact creatures you control get +1/+1.${U/P}: Until end of turn, target creature you control becomes a blue artifact in addition to its other colors and types. Activate only as a sorcery.|
Unctus, Grand Metatect|Phyrexia: All Will Be One|75|R|{1}{U}{U}|Legendary Creature - Phyrexian Vedalken|2|4|Other blue creatures you control have "Whenever this creature becomes tapped, draw a card, then discard a card."$Other artifact creatures you control get +1/+1.${U/P}: Until end of turn, target creature you control becomes a blue artifact in addition to its other colors and types. Activate only as a sorcery.|
Archfiend of the Dross|Phyrexia: All Will Be One|82|R|{2}{B}{B}|Creature - Phyrexian Demon|6|6|Flying$Archfiend of the Dross enters the battlefield with four oil counters on it.$At the beginning of your upkeep, remove an oil counter from Archfiend of the Dross. Then if it has no oil counters on it, you lose the game.$Whenever a creature an opponent controls dies, its controller loses 2 life.|
Black Sun's Twilight|Phyrexia: All Will Be One|84|R|{X}{B}|Instant|||Up to one target creature gets -X/-X until end of turn. If X is 5 or more, return a creature card with mana value X or less from your graveyard to the battlefield tapped.|
Geth, Thane of Contracts|Phyrexia: All Will Be One|95|R|{1}{B}{B}|Legendary Creature - Phyrexian Zombie|3|4|Other creatures you control get -1/-1.${1}{B}{B}, {T}: Return target creature card from your graveyard to the battlefield. It gains "If this creature would leave the battlefield, exile it instead of putting it anywhere else." Activate only as a sorcery.|