mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[NCC] Implemented Life Insurance
This commit is contained in:
parent
7f1ec579d1
commit
0a22478087
2 changed files with 52 additions and 0 deletions
51
Mage.Sets/src/mage/cards/l/LifeInsurance.java
Normal file
51
Mage.Sets/src/mage/cards/l/LifeInsurance.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.keyword.ExtortAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LifeInsurance extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("nontoken creature");
|
||||
|
||||
static {
|
||||
filter.add(TokenPredicate.FALSE);
|
||||
}
|
||||
|
||||
public LifeInsurance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{B}");
|
||||
|
||||
// Extort
|
||||
this.addAbility(new ExtortAbility());
|
||||
|
||||
// Whenever a nontoken creature dies, you lose 1 life and create a Treasure token.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(
|
||||
new LoseLifeSourceControllerEffect(1), false, filter
|
||||
);
|
||||
ability.addEffect(new CreateTokenEffect(new TreasureToken()).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private LifeInsurance(final LifeInsurance card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LifeInsurance copy() {
|
||||
return new LifeInsurance(this);
|
||||
}
|
||||
}
|
|
@ -166,6 +166,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kodama's Reach", 298, Rarity.COMMON, mage.cards.k.KodamasReach.class));
|
||||
cards.add(new SetCardInfo("Kresh the Bloodbraided", 345, Rarity.MYTHIC, mage.cards.k.KreshTheBloodbraided.class));
|
||||
cards.add(new SetCardInfo("Leafkin Druid", 299, Rarity.COMMON, mage.cards.l.LeafkinDruid.class));
|
||||
cards.add(new SetCardInfo("Life Insurance", 74, Rarity.RARE, mage.cards.l.LifeInsurance.class));
|
||||
cards.add(new SetCardInfo("Life's Legacy", 300, Rarity.RARE, mage.cards.l.LifesLegacy.class));
|
||||
cards.add(new SetCardInfo("Lifecrafter's Bestiary", 370, Rarity.RARE, mage.cards.l.LifecraftersBestiary.class));
|
||||
cards.add(new SetCardInfo("Lightning Greaves", 371, Rarity.UNCOMMON, mage.cards.l.LightningGreaves.class));
|
||||
|
|
Loading…
Reference in a new issue