From 5702a02af012ba791c74e82f7b957063bd0b9efa Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 9 Apr 2020 21:03:31 -0400 Subject: [PATCH] Implemented Skycat Sovereign --- .../src/mage/cards/s/SkycatSovereign.java | 67 +++++++++++++++++++ .../src/mage/sets/IkoriaLairOfBehemoths.java | 1 + .../game/permanent/token/CatBirdToken.java | 32 +++++++++ 3 files changed, 100 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SkycatSovereign.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/CatBirdToken.java diff --git a/Mage.Sets/src/mage/cards/s/SkycatSovereign.java b/Mage.Sets/src/mage/cards/s/SkycatSovereign.java new file mode 100644 index 00000000000..9991c2032b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SkycatSovereign.java @@ -0,0 +1,67 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +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.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.permanent.token.CatBirdToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SkycatSovereign extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("other creature you control with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + filter.add(AnotherPredicate.instance); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + + public SkycatSovereign(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}"); + + this.subtype.add(SubType.ELEMENTAL); + this.subtype.add(SubType.CAT); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Skycat Sovereign gets +1/+1 for each other creature you control with flying. + this.addAbility(new SimpleStaticAbility(new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield))); + + // {2}{W}{U}: Create a 1/1 white Cat Bird creature token with flying. + this.addAbility(new SimpleActivatedAbility( + new CreateTokenEffect(new CatBirdToken()), new ManaCostsImpl("{2}{W}{U}") + )); + } + + private SkycatSovereign(final SkycatSovereign card) { + super(card); + } + + @Override + public SkycatSovereign copy() { + return new SkycatSovereign(this); + } +} diff --git a/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java b/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java index e772875181b..6de416a68d5 100644 --- a/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java +++ b/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java @@ -158,6 +158,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet { cards.add(new SetCardInfo("Sea-Dasher Octopus", 66, Rarity.RARE, mage.cards.s.SeaDasherOctopus.class)); cards.add(new SetCardInfo("Shredded Sails", 136, Rarity.COMMON, mage.cards.s.ShreddedSails.class)); cards.add(new SetCardInfo("Skull Prophet", 206, Rarity.UNCOMMON, mage.cards.s.SkullProphet.class)); + cards.add(new SetCardInfo("Skycat Sovereign", 207, Rarity.RARE, mage.cards.s.SkycatSovereign.class)); cards.add(new SetCardInfo("Snapdax, Apex of the Hunt", 209, Rarity.MYTHIC, mage.cards.s.SnapdaxApexOfTheHunt.class)); cards.add(new SetCardInfo("Song of Creation", 210, Rarity.RARE, mage.cards.s.SongOfCreation.class)); cards.add(new SetCardInfo("Splendor Mare", 32, Rarity.UNCOMMON, mage.cards.s.SplendorMare.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/CatBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/CatBirdToken.java new file mode 100644 index 00000000000..1df3ac4e950 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/CatBirdToken.java @@ -0,0 +1,32 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class CatBirdToken extends TokenImpl { + + public CatBirdToken() { + super("Bird", "1/1 white Cat Bird creature token with flying"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.CAT); + subtype.add(SubType.BIRD); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(FlyingAbility.getInstance()); + } + + private CatBirdToken(final CatBirdToken token) { + super(token); + } + + @Override + public CatBirdToken copy() { + return new CatBirdToken(this); + } +}