[SNC] Implemented Paragon of Modernity

This commit is contained in:
Evan Kranzler 2022-04-17 21:09:36 -04:00
parent 15943485e6
commit 371874b7e3
3 changed files with 73 additions and 2 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.AddContinuousEffectToGame;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ParagonOfModernity extends CardImpl {
public ParagonOfModernity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
this.subtype.add(SubType.ANGEL);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// {3}: Paragon of Modernity gets +1/+1 until end of turn. If exactly three colors of mana were spent to activate this ability, put a +1/+1 counter on it instead.
this.addAbility(new SimpleActivatedAbility(new ConditionalOneShotEffect(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new AddContinuousEffectToGame(new BoostSourceEffect(1, 1, Duration.EndOfTurn)),
ParagonOfModernityCondition.instance, "{this} gets +1/+1 until end of turn. If exactly three " +
"colors of mana were spent to activate this ability, put a +1/+1 counter on it instead"
), new GenericManaCost(3)));
}
private ParagonOfModernity(final ParagonOfModernity card) {
super(card);
}
@Override
public ParagonOfModernity copy() {
return new ParagonOfModernity(this);
}
}
enum ParagonOfModernityCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
return source.getManaCosts().getUsedManaToPay().getDifferentColors() == 3;
}
}

View file

@ -170,6 +170,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
cards.add(new SetCardInfo("Ognis, the Dragon's Lash", 210, Rarity.RARE, mage.cards.o.OgnisTheDragonsLash.class));
cards.add(new SetCardInfo("Ominous Parcel", 241, Rarity.COMMON, mage.cards.o.OminousParcel.class));
cards.add(new SetCardInfo("Out of the Way", 52, Rarity.UNCOMMON, mage.cards.o.OutOfTheWay.class));
cards.add(new SetCardInfo("Paragon of Modernity", 242, Rarity.COMMON, mage.cards.p.ParagonOfModernity.class));
cards.add(new SetCardInfo("Park Heights Pegasus", 211, Rarity.RARE, mage.cards.p.ParkHeightsPegasus.class));
cards.add(new SetCardInfo("Patch Up", 23, Rarity.UNCOMMON, mage.cards.p.PatchUp.class));
cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));

View file

@ -2,10 +2,11 @@
package mage.abilities.effects.common;
import mage.constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
/**
@ -18,7 +19,6 @@ public class AddContinuousEffectToGame extends OneShotEffect {
public AddContinuousEffectToGame(ContinuousEffect effect) {
super(Outcome.Benefit);
this.effect = effect;
this.staticText = effect.getText(null);
}
public AddContinuousEffectToGame(final AddContinuousEffectToGame effect) {
@ -36,4 +36,9 @@ public class AddContinuousEffectToGame extends OneShotEffect {
game.addEffect(effect, source);
return true;
}
@Override
public String getText(Mode mode) {
return effect.getText(mode);
}
}