mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Malevolent Noble
This commit is contained in:
parent
16ab270da5
commit
6d81d91f52
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/m/MalevolentNoble.java
Normal file
73
Mage.Sets/src/mage/cards/m/MalevolentNoble.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MalevolentNoble extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledPermanent("an artifact or another creature");
|
||||
|
||||
static {
|
||||
filter.add(MalevolentNoblePredicate.instance);
|
||||
}
|
||||
|
||||
public MalevolentNoble(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.NOBLE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {2}, Sacrifice an artifact or another creature: Put a +1/+1 counter on Malevolent Noble.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private MalevolentNoble(final MalevolentNoble card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MalevolentNoble copy() {
|
||||
return new MalevolentNoble(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum MalevolentNoblePredicate implements ObjectSourcePlayerPredicate<ObjectSourcePlayer<MageObject>> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) {
|
||||
MageObject obj = input.getObject();
|
||||
if (obj.getId().equals(input.getSourceId())) {
|
||||
return obj.isArtifact();
|
||||
}
|
||||
return obj.isArtifact()
|
||||
|| obj.isCreature();
|
||||
}
|
||||
}
|
|
@ -164,6 +164,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lucky Clover", 226, Rarity.UNCOMMON, mage.cards.l.LuckyClover.class));
|
||||
cards.add(new SetCardInfo("Mace of the Valiant", 314, Rarity.RARE, mage.cards.m.MaceOfTheValiant.class));
|
||||
cards.add(new SetCardInfo("Mad Ratter", 130, Rarity.UNCOMMON, mage.cards.m.MadRatter.class));
|
||||
cards.add(new SetCardInfo("Malevolent Noble", 95, Rarity.COMMON, mage.cards.m.MalevolentNoble.class));
|
||||
cards.add(new SetCardInfo("Mantle of Tides", 52, Rarity.COMMON, mage.cards.m.MantleOfTides.class));
|
||||
cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class));
|
||||
cards.add(new SetCardInfo("Maraleaf Rider", 166, Rarity.COMMON, mage.cards.m.MaraleafRider.class));
|
||||
|
|
Loading…
Reference in a new issue