mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Implemented Speaker of the Heavens
This commit is contained in:
parent
4ac562a29e
commit
40c508afcf
2 changed files with 80 additions and 0 deletions
79
Mage.Sets/src/mage/cards/s/SpeakerOfTheHeavens.java
Normal file
79
Mage.Sets/src/mage/cards/s/SpeakerOfTheHeavens.java
Normal file
|
@ -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";
|
||||||
|
}
|
||||||
|
}
|
|
@ -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("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("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("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("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("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));
|
cards.add(new SetCardInfo("Sporeweb Weaver", 208, Rarity.RARE, mage.cards.s.SporewebWeaver.class));
|
||||||
|
|
Loading…
Reference in a new issue