diff --git a/Mage.Sets/src/mage/cards/s/SpeakerOfTheHeavens.java b/Mage.Sets/src/mage/cards/s/SpeakerOfTheHeavens.java new file mode 100644 index 0000000000..b269c73a90 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpeakerOfTheHeavens.java @@ -0,0 +1,79 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.MainPhaseStackEmptyCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.token.AngelToken; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SpeakerOfTheHeavens extends CardImpl { + + public SpeakerOfTheHeavens(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // {T}: Create a 4/4 white Angel creature token with flying. Activate this ability only if you have at least 7 more life than your starting life total and only any time you could cast a sorcery. + this.addAbility(new ConditionalActivatedAbility( + Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()), + new TapSourceCost(), SpeakerOfTheHeavensCondition.instance + )); + } + + private SpeakerOfTheHeavens(final SpeakerOfTheHeavens card) { + super(card); + } + + @Override + public SpeakerOfTheHeavens copy() { + return new SpeakerOfTheHeavens(this); + } +} + +enum SpeakerOfTheHeavensCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + if (!MainPhaseStackEmptyCondition.instance.apply(game, source) + || !game.isActivePlayer(source.getControllerId())) { + return false; + } + Player player = game.getPlayer(source.getControllerId()); + if (player == null || player.getLife() < game.getLife() + 7) { + return false; + } + return true; + } + + @Override + public String toString() { + return "if you have at least 7 more life than your starting life total and only any time you could cast a sorcery"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/CoreSet2021.java b/Mage.Sets/src/mage/sets/CoreSet2021.java index ee2e75ad05..af62a6c5dd 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2021.java +++ b/Mage.Sets/src/mage/sets/CoreSet2021.java @@ -152,6 +152,7 @@ public final class CoreSet2021 extends ExpansionSet { cards.add(new SetCardInfo("Solemn Simulacrum", 239, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); cards.add(new SetCardInfo("Soul Sear", 160, Rarity.UNCOMMON, mage.cards.s.SoulSear.class)); cards.add(new SetCardInfo("Sparkhunter Masticore", 240, Rarity.RARE, mage.cards.s.SparkhunterMasticore.class)); + cards.add(new SetCardInfo("Speaker of the Heavens", 38, Rarity.RARE, mage.cards.s.SpeakerOfTheHeavens.class)); cards.add(new SetCardInfo("Spined Megalodon", 72, Rarity.COMMON, mage.cards.s.SpinedMegalodon.class)); cards.add(new SetCardInfo("Spirit of Malevolence", 331, Rarity.COMMON, mage.cards.s.SpiritOfMalevolence.class)); cards.add(new SetCardInfo("Sporeweb Weaver", 208, Rarity.RARE, mage.cards.s.SporewebWeaver.class));