From f6b9697ddb093880a8b67bc911c018c8ce6cfc33 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 1 Feb 2022 08:08:07 -0500 Subject: [PATCH] [NEO] Implemented Upriser Renegade --- .../src/mage/cards/u/UpriserRenegade.java | 63 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/u/UpriserRenegade.java diff --git a/Mage.Sets/src/mage/cards/u/UpriserRenegade.java b/Mage.Sets/src/mage/cards/u/UpriserRenegade.java new file mode 100644 index 0000000000..a90d7e87ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UpriserRenegade.java @@ -0,0 +1,63 @@ +package mage.cards.u; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.predicate.permanent.ModifiedPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class UpriserRenegade extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("other modified creature you control"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(ModifiedPredicate.instance); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, 2); + private static final Hint hint = new ValueHint( + "Other modified creatures you control", new PermanentsOnBattlefieldCount(filter) + ); + + public UpriserRenegade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Upriser Renegade gets +2/+0 for each other modified creature you control. + this.addAbility(new SimpleStaticAbility(new BoostSourceEffect( + xValue, StaticValue.get(0), Duration.WhileOnBattlefield + )).addHint(hint)); + } + + private UpriserRenegade(final UpriserRenegade card) { + super(card); + } + + @Override + public UpriserRenegade copy() { + return new UpriserRenegade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 9650638b8a..c93918fdc2 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -97,6 +97,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Thousand-Faced Shadow", 86, Rarity.RARE, mage.cards.t.ThousandFacedShadow.class)); cards.add(new SetCardInfo("Twinshot Sniper", 168, Rarity.UNCOMMON, mage.cards.t.TwinshotSniper.class)); cards.add(new SetCardInfo("Unstoppable Ogre", 169, Rarity.COMMON, mage.cards.u.UnstoppableOgre.class)); + cards.add(new SetCardInfo("Upriser Renegade", 170, Rarity.UNCOMMON, mage.cards.u.UpriserRenegade.class)); cards.add(new SetCardInfo("Vector Glider", 66, Rarity.COMMON, mage.cards.v.VectorGlider.class)); cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented