mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Merge pull request #5513 from FateRevoked/master
Implemented Final Payment
This commit is contained in:
commit
3d1676f954
2 changed files with 61 additions and 0 deletions
60
Mage.Sets/src/mage/cards/f/FinalPayment.java
Normal file
60
Mage.Sets/src/mage/cards/f/FinalPayment.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.costs.AlternativeCostSourceAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.OptionalAdditionalCost;
|
||||
import mage.abilities.costs.OrCost;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesToughness;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FateRevoked
|
||||
*/
|
||||
public final class FinalPayment extends CardImpl {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a creature or enchantment");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public FinalPayment(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}{B}");
|
||||
|
||||
// As an additional cost to cast this spell, pay 5 life or sacrifice a creature or enchantment.
|
||||
final Cost lifeCost = new PayLifeCost(5);
|
||||
final Cost sacrificeCost = new SacrificeTargetCost(new TargetControlledPermanent(filter));
|
||||
|
||||
this.getSpellAbility().addCost(new OrCost(lifeCost, sacrificeCost,
|
||||
"pay 5 life or sacrifice a creature or enchantment"));
|
||||
|
||||
// Destroy target creature
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public FinalPayment(final FinalPayment card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FinalPayment copy() {
|
||||
return new FinalPayment(this);
|
||||
}
|
||||
}
|
|
@ -112,6 +112,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Eyes Everywhere", 38, Rarity.UNCOMMON, mage.cards.e.EyesEverywhere.class));
|
||||
cards.add(new SetCardInfo("Faerie Duelist", 39, Rarity.COMMON, mage.cards.f.FaerieDuelist.class));
|
||||
cards.add(new SetCardInfo("Feral Maaka", 100, Rarity.COMMON, mage.cards.f.FeralMaaka.class));
|
||||
cards.add(new SetCardInfo("Final Payment", 171, Rarity.COMMON, mage.cards.f.FinalPayment.class));
|
||||
cards.add(new SetCardInfo("Fireblade Artist", 172, Rarity.UNCOMMON, mage.cards.f.FirebladeArtist.class));
|
||||
cards.add(new SetCardInfo("Font of Agonies", 74, Rarity.RARE, mage.cards.f.FontOfAgonies.class));
|
||||
cards.add(new SetCardInfo("Footlight Fiend", 216, Rarity.COMMON, mage.cards.f.FootlightFiend.class));
|
||||
|
|
Loading…
Reference in a new issue