forked from External/mage
[CMR] Implemeneted Promise of Tomorrow
This commit is contained in:
parent
8b96c1d945
commit
f0800ad629
2 changed files with 61 additions and 0 deletions
60
Mage.Sets/src/mage/cards/p/PromiseOfTomorrow.java
Normal file
60
Mage.Sets/src/mage/cards/p/PromiseOfTomorrow.java
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PromiseOfTomorrow extends CardImpl {
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE,
|
||||
ComparisonType.EQUAL_TO, 0, true
|
||||
);
|
||||
|
||||
public PromiseOfTomorrow(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
|
||||
// Whenever a creature you control dies, exile it.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new ExileTargetForSourceEffect(), false,
|
||||
StaticFilters.FILTER_CONTROLLED_A_CREATURE, true
|
||||
));
|
||||
|
||||
// At the beginning of each end step, if you control no creatures, sacrifice Promise of Tomorrow and return all cards exiled with it to the battlefield under your control.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(
|
||||
new SacrificeSourceEffect(), TargetController.ANY, false
|
||||
), condition, "At the beginning of each end step, if you control no creatures, " +
|
||||
"sacrifice {this} and return all cards exiled with it to the battlefield under your control."
|
||||
);
|
||||
ability.addEffect(new ReturnFromExileForSourceEffect(Zone.EXILED));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private PromiseOfTomorrow(final PromiseOfTomorrow card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PromiseOfTomorrow copy() {
|
||||
return new PromiseOfTomorrow(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -184,6 +184,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Prava of the Steel Legion", 38, Rarity.UNCOMMON, mage.cards.p.PravaOfTheSteelLegion.class));
|
||||
cards.add(new SetCardInfo("Preordain", 84, Rarity.COMMON, mage.cards.p.Preordain.class));
|
||||
cards.add(new SetCardInfo("Profane Transfusion", 145, Rarity.MYTHIC, mage.cards.p.ProfaneTransfusion.class));
|
||||
cards.add(new SetCardInfo("Promise of Tomorrow", 39, Rarity.RARE, mage.cards.p.PromiseOfTomorrow.class));
|
||||
cards.add(new SetCardInfo("Prophetic Prism", 334, Rarity.COMMON, mage.cards.p.PropheticPrism.class));
|
||||
cards.add(new SetCardInfo("Prossh, Skyraider of Kher", 530, Rarity.MYTHIC, mage.cards.p.ProsshSkyraiderOfKher.class));
|
||||
cards.add(new SetCardInfo("Prying Eyes", 86, Rarity.COMMON, mage.cards.p.PryingEyes.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue