mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
implement [MH3] Flare of Malice
This commit is contained in:
parent
a0d57d44a2
commit
833ecff409
5 changed files with 64 additions and 5 deletions
58
Mage.Sets/src/mage/cards/f/FlareOfMalice.java
Normal file
58
Mage.Sets/src/mage/cards/f/FlareOfMalice.java
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.AlternativeCostSourceAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.SacrificeOpponentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.MaxManaValueControlledCreatureOrPlaneswalkerPredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class FlareOfMalice extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("nontoken black creature");
|
||||
|
||||
static {
|
||||
filter.add(TokenPredicate.FALSE);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
private static final FilterPermanent filterCreatureOrPlaneswalker = new FilterCreatureOrPlaneswalkerPermanent(
|
||||
"creature or planeswalker with the greatest mana value " +
|
||||
"among creatures and planeswalkers they control"
|
||||
);
|
||||
|
||||
static {
|
||||
filterCreatureOrPlaneswalker.add(MaxManaValueControlledCreatureOrPlaneswalkerPredicate.instance);
|
||||
}
|
||||
|
||||
public FlareOfMalice(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}");
|
||||
|
||||
// You may sacrifice a nontoken black creature rather than pay this spell's mana cost.
|
||||
this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(filter)).setRuleAtTheTop(true));
|
||||
|
||||
// Each opponent sacrifices a creature or planeswalker with the greatest converted mana value among creatures and planeswalkers they control.
|
||||
this.getSpellAbility().addEffect(new SacrificeOpponentsEffect(filter));
|
||||
}
|
||||
|
||||
private FlareOfMalice(final FlareOfMalice card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlareOfMalice copy() {
|
||||
return new FlareOfMalice(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.permanent.MaxManaValueControlledPermanentPredicate;
|
||||
import mage.filter.predicate.permanent.MaxManaValueControlledCreatureOrPlaneswalkerPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ public final class RiveteersCharm extends CardImpl {
|
|||
);
|
||||
|
||||
static {
|
||||
filter.add(MaxManaValueControlledPermanentPredicate.instance);
|
||||
filter.add(MaxManaValueControlledCreatureOrPlaneswalkerPredicate.instance);
|
||||
}
|
||||
|
||||
public RiveteersCharm(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.filter.predicate.permanent.MaxManaValueControlledPermanentPredicate;
|
||||
import mage.filter.predicate.permanent.MaxManaValueControlledCreatureOrPlaneswalkerPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ public final class SoulShatter extends CardImpl {
|
|||
);
|
||||
|
||||
static {
|
||||
filter.add(MaxManaValueControlledPermanentPredicate.instance);
|
||||
filter.add(MaxManaValueControlledCreatureOrPlaneswalkerPredicate.instance);
|
||||
}
|
||||
|
||||
public SoulShatter(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public final class ModernHorizons3 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Flare of Denial", 62, Rarity.RARE, mage.cards.f.FlareOfDenial.class));
|
||||
cards.add(new SetCardInfo("Flare of Duplication", 119, Rarity.RARE, mage.cards.f.FlareOfDuplication.class));
|
||||
cards.add(new SetCardInfo("Flare of Fortitude", 26, Rarity.RARE, mage.cards.f.FlareOfFortitude.class));
|
||||
cards.add(new SetCardInfo("Flare of Malice", 95, Rarity.RARE, mage.cards.f.FlareOfMalice.class));
|
||||
cards.add(new SetCardInfo("Flooded Strand", 220, Rarity.RARE, mage.cards.f.FloodedStrand.class));
|
||||
cards.add(new SetCardInfo("Flusterstorm", 496, Rarity.RARE, mage.cards.f.Flusterstorm.class));
|
||||
cards.add(new SetCardInfo("Forest", 308, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum MaxManaValueControlledPermanentPredicate implements ObjectSourcePlayerPredicate<Permanent> {
|
||||
public enum MaxManaValueControlledCreatureOrPlaneswalkerPredicate implements ObjectSourcePlayerPredicate<Permanent> {
|
||||
instance;
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent();
|
||||
Loading…
Add table
Add a link
Reference in a new issue