From e57d5d02c92f583acb399da26ea436e6022afe7e Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Sat, 29 Jul 2023 01:33:48 +0200 Subject: [PATCH] [CMM] Implement Regal Sliver (#10691) --- Mage.Sets/src/mage/cards/r/RegalSliver.java | 63 +++++++++++++++++++ Mage.Sets/src/mage/sets/CommanderMasters.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RegalSliver.java diff --git a/Mage.Sets/src/mage/cards/r/RegalSliver.java b/Mage.Sets/src/mage/cards/r/RegalSliver.java new file mode 100644 index 00000000000..e1e76ae21f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RegalSliver.java @@ -0,0 +1,63 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MonarchIsSourceControllerCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.AddContinuousEffectToGame; +import mage.abilities.effects.common.BecomesMonarchSourceEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class RegalSliver extends CardImpl { + + public RegalSliver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.SLIVER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Sliver creatures you control have "When this creature enters the battlefield, Slivers you control get +1/+1 until end of turn if you're the monarch. Otherwise, you become the monarch." + TriggeredAbility trigger = + new EntersBattlefieldTriggeredAbility( + new ConditionalOneShotEffect( + new AddContinuousEffectToGame( + new BoostControlledEffect(1, 1, Duration.EndOfTurn, + StaticFilters.FILTER_PERMANENT_SLIVERS + )), + new BecomesMonarchSourceEffect(), + MonarchIsSourceControllerCondition.instance, + "Slivers you control get +1/+1 until end of turn if you're the monarch. Otherwise, you become the monarch." + ) + ); + + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + trigger, Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS + ).setText("Sliver creatures you control have \"When this creature enters the battlefield, " + + "Slivers you control get +1/+1 until end of turn if you're the monarch. Otherwise, you become the monarch.\""))); + } + + private RegalSliver(final RegalSliver card) { + super(card); + } + + @Override + public RegalSliver copy() { + return new RegalSliver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderMasters.java b/Mage.Sets/src/mage/sets/CommanderMasters.java index c11528c2d4d..fdfb7af7d95 100644 --- a/Mage.Sets/src/mage/sets/CommanderMasters.java +++ b/Mage.Sets/src/mage/sets/CommanderMasters.java @@ -502,6 +502,7 @@ public final class CommanderMasters extends ExpansionSet { cards.add(new SetCardInfo("Realmwalker", 909, Rarity.RARE, mage.cards.r.Realmwalker.class)); cards.add(new SetCardInfo("Reassembling Skeleton", 183, Rarity.UNCOMMON, mage.cards.r.ReassemblingSkeleton.class)); cards.add(new SetCardInfo("Regal Behemoth", 316, Rarity.RARE, mage.cards.r.RegalBehemoth.class)); + cards.add(new SetCardInfo("Regal Sliver", 724, Rarity.RARE, mage.cards.r.RegalSliver.class)); cards.add(new SetCardInfo("Rejuvenating Springs", 424, Rarity.RARE, mage.cards.r.RejuvenatingSprings.class)); cards.add(new SetCardInfo("Reliquary Tower", 425, Rarity.UNCOMMON, mage.cards.r.ReliquaryTower.class)); cards.add(new SetCardInfo("Renowned Weaponsmith", 114, Rarity.COMMON, mage.cards.r.RenownedWeaponsmith.class));