From d7936a890cb8c97ebf89d8ef25228f7c1390a231 Mon Sep 17 00:00:00 2001 From: Daniel Eberhard Date: Sat, 17 Dec 2022 04:01:59 +0100 Subject: [PATCH] Added card "Rey Skywalker" and its abilities and effects --- Mage.Sets/src/mage/cards/r/ReySkywalker.java | 55 ++++++++++++++++++- .../src/main/java/mage/constants/SubType.java | 1 + 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/r/ReySkywalker.java b/Mage.Sets/src/mage/cards/r/ReySkywalker.java index 0e2b1bad6d..4cbf932aff 100644 --- a/Mage.Sets/src/mage/cards/r/ReySkywalker.java +++ b/Mage.Sets/src/mage/cards/r/ReySkywalker.java @@ -1,4 +1,57 @@ package mage.cards.r; -public class ReySkywalker { +import mage.abilities.LoyaltyAbility; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author Merlingilb + */ +public class ReySkywalker extends CardImpl { + public ReySkywalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{U}{U}"); + this.addSuperType(SuperType.LEGENDARY); + this.addSubType(SubType.REY); + + this.setStartingLoyalty(2); + + //+2: Untap target permanent. Scry 1. + LoyaltyAbility loyaltyAbilityP2 = new LoyaltyAbility(new UntapTargetEffect(), +2); + loyaltyAbilityP2.addTarget(new TargetPermanent()); + loyaltyAbilityP2.addEffect(new ScryEffect(1)); + this.addAbility(loyaltyAbilityP2); + + //+1: Tap target creature. That creature doesn't untap during controller's next untap step. Scry 1. + LoyaltyAbility loyaltyAbilityP1 = new LoyaltyAbility(new TapTargetEffect(), +1); + loyaltyAbilityP1.addEffect(new DontUntapInControllersNextUntapStepTargetEffect()); + loyaltyAbilityP1.addTarget(new TargetCreaturePermanent()); + loyaltyAbilityP1.addEffect(new ScryEffect(1)); + this.addAbility(loyaltyAbilityP1); + + //0: Draw a card. Scry 1. + LoyaltyAbility loyaltyAbility0 = new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 0); + loyaltyAbility0.addEffect(new ScryEffect(1)); + this.addAbility(loyaltyAbility0); + } + + public ReySkywalker(final ReySkywalker card) { + super(card); + } + + @Override + public ReySkywalker copy() { + return new ReySkywalker(this); + } } diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 38fcb31d77..c5563265ca 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -464,6 +464,7 @@ public enum SubType { OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars OKO("Oko", SubTypeSet.PlaneswalkerType), RAL("Ral", SubTypeSet.PlaneswalkerType), + REY("Rey", SubTypeSet.PlaneswalkerType, true), // Star Wars, ROWAN("Rowan", SubTypeSet.PlaneswalkerType), SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType), SAMUT("Samut", SubTypeSet.PlaneswalkerType),