mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Elite Headhunter
This commit is contained in:
parent
77f1fd0df2
commit
93c0156c90
3 changed files with 101 additions and 13 deletions
77
Mage.Sets/src/mage/cards/e/EliteHeadhunter.java
Normal file
77
Mage.Sets/src/mage/cards/e/EliteHeadhunter.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.e;
|
||||
|
||||
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.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
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 mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EliteHeadhunter extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledPermanent("another creature or an artifact");
|
||||
|
||||
static {
|
||||
filter.add(EliteHeadhunterPredicate.instance);
|
||||
}
|
||||
|
||||
public EliteHeadhunter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/R}{B/R}{B/R}{B/R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.KNIGHT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility());
|
||||
|
||||
// {B/R}{B/R}{B/R}, Sacrifice another creature or an artifact: Elite Headhunter deals 2 damage to target creature or planeswalker.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DamageTargetEffect(2), new ManaCostsImpl("{B/R}{B/R}{B/R}")
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private EliteHeadhunter(final EliteHeadhunter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EliteHeadhunter copy() {
|
||||
return new EliteHeadhunter(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum EliteHeadhunterPredicate 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.isCreature() || obj.isArtifact();
|
||||
}
|
||||
}
|
|
@ -1,22 +1,21 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KumenasSpeaker extends CardImpl {
|
||||
|
@ -24,10 +23,7 @@ public final class KumenasSpeaker extends CardImpl {
|
|||
private static final FilterPermanent filter = new FilterPermanent("another Merfolk or an Island");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(Predicates.or(
|
||||
new SubtypePredicate(SubType.ISLAND),
|
||||
new SubtypePredicate(SubType.MERFOLK)));
|
||||
filter.add(KumenasSpeakerPredicate.instance);
|
||||
}
|
||||
|
||||
public KumenasSpeaker(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -39,10 +35,10 @@ public final class KumenasSpeaker extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Kumena's Omenspeaker gets +1/+1 as long as you control another Merfolk or Island.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 1, 1)));
|
||||
this.addAbility(new SimpleStaticAbility(new BoostSourceWhileControlsEffect(filter, 1, 1)));
|
||||
}
|
||||
|
||||
public KumenasSpeaker(final KumenasSpeaker card) {
|
||||
private KumenasSpeaker(final KumenasSpeaker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -51,3 +47,17 @@ public final class KumenasSpeaker extends CardImpl {
|
|||
return new KumenasSpeaker(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum KumenasSpeakerPredicate 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.hasSubtype(SubType.ISLAND, game);
|
||||
}
|
||||
return obj.hasSubtype(SubType.ISLAND, game)
|
||||
|| obj.hasSubtype(SubType.MERFOLK, game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Crystal Slipper", 119, Rarity.COMMON, mage.cards.c.CrystalSlipper.class));
|
||||
cards.add(new SetCardInfo("Curious Pair", 150, Rarity.COMMON, mage.cards.c.CuriousPair.class));
|
||||
cards.add(new SetCardInfo("Doom Foretold", 187, Rarity.RARE, mage.cards.d.DoomForetold.class));
|
||||
cards.add(new SetCardInfo("Elite Headhunter", 209, Rarity.UNCOMMON, mage.cards.e.EliteHeadhunter.class));
|
||||
cards.add(new SetCardInfo("Embercleave", 120, Rarity.MYTHIC, mage.cards.e.Embercleave.class));
|
||||
cards.add(new SetCardInfo("Embereth Paladin", 121, Rarity.COMMON, mage.cards.e.EmberethPaladin.class));
|
||||
cards.add(new SetCardInfo("Embereth Shieldbreaker", 122, Rarity.UNCOMMON, mage.cards.e.EmberethShieldbreaker.class));
|
||||
|
|
Loading…
Reference in a new issue