From 31edc76871066c630789cd2625da484fb4b6ce24 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 18 Jun 2018 21:06:09 -0400 Subject: [PATCH] Implemented Resplendent Angel --- .../src/mage/cards/r/ResplendentAngel.java | 73 +++++++++++++++++++ Mage.Sets/src/mage/sets/CoreSet2019.java | 1 + .../game/permanent/token/AngelToken2.java | 29 ++++++++ 3 files changed, 103 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/ResplendentAngel.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/AngelToken2.java diff --git a/Mage.Sets/src/mage/cards/r/ResplendentAngel.java b/Mage.Sets/src/mage/cards/r/ResplendentAngel.java new file mode 100644 index 00000000000..ef40284b699 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ResplendentAngel.java @@ -0,0 +1,73 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.YouGainedLifeCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.permanent.token.AngelToken2; +import mage.watchers.common.PlayerGainedLifeWatcher; + +/** + * + * @author TheElk801 + */ +public final class ResplendentAngel extends CardImpl { + + public ResplendentAngel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // At the beginning of each end step, if you gained 5 or more life this turn, create a 4/4 white Angel creature token with flying and vigilance. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + Zone.BATTLEFIELD, + new CreateTokenEffect(new AngelToken2()), + TargetController.ANY, + new YouGainedLifeCondition(ComparisonType.MORE_THAN, 4), + false + ), new PlayerGainedLifeWatcher()); + + // {3}{W}{W}{W}: Until end of turn, Resplendent Angel gets +2/+2 and gains lifelink. + Ability ability = new SimpleActivatedAbility( + new BoostSourceEffect( + 2, 2, Duration.EndOfTurn + ).setText("until end of turn, {this} gets +2/+2"), + new ManaCostsImpl("{3}{W}{W}{W}") + ); + ability.addEffect(new GainAbilitySourceEffect( + LifelinkAbility.getInstance(), + Duration.EndOfTurn + ).setText("and gains lifelink")); + this.addAbility(ability); + } + + public ResplendentAngel(final ResplendentAngel card) { + super(card); + } + + @Override + public ResplendentAngel copy() { + return new ResplendentAngel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index 754aaecef90..1552e1494fa 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -130,6 +130,7 @@ public final class CoreSet2019 extends ExpansionSet { cards.add(new SetCardInfo("Reclamation Sage", 196, Rarity.UNCOMMON, mage.cards.r.ReclamationSage.class)); cards.add(new SetCardInfo("Recollect", 197, Rarity.UNCOMMON, mage.cards.r.Recollect.class)); cards.add(new SetCardInfo("Reliquary Tower", 254, Rarity.UNCOMMON, mage.cards.r.ReliquaryTower.class)); + cards.add(new SetCardInfo("Resplendent Angel", 34, Rarity.MYTHIC, mage.cards.r.ResplendentAngel.class)); cards.add(new SetCardInfo("Revitalize", 35, Rarity.COMMON, mage.cards.r.Revitalize.class)); cards.add(new SetCardInfo("Riddlemaster Sphinx", 287, Rarity.RARE, mage.cards.r.RiddlemasterSphinx.class)); cards.add(new SetCardInfo("Rogue's Gloves", 243, Rarity.UNCOMMON, mage.cards.r.RoguesGloves.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/AngelToken2.java b/Mage/src/main/java/mage/game/permanent/token/AngelToken2.java new file mode 100644 index 00000000000..9369b05c36f --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/AngelToken2.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +public final class AngelToken2 extends TokenImpl { + + public AngelToken2() { + super("Angel", "4/4 white Angel creature token with flying and vigilance"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.ANGEL); + power = new MageInt(4); + toughness = new MageInt(4); + addAbility(FlyingAbility.getInstance()); + addAbility(VigilanceAbility.getInstance()); + } + + public AngelToken2(final AngelToken2 token) { + super(token); + } + + public AngelToken2 copy() { + return new AngelToken2(this); + } +}