mirror of
https://github.com/correl/mage.git
synced 2025-04-03 17:00:16 -09:00
[STX] Implemented Mage Hunter
This commit is contained in:
parent
1adde04352
commit
c5feb3ba23
2 changed files with 82 additions and 0 deletions
Mage.Sets/src/mage
81
Mage.Sets/src/mage/cards/m/MageHunter.java
Normal file
81
Mage.Sets/src/mage/cards/m/MageHunter.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MageHunter extends CardImpl {
|
||||
|
||||
public MageHunter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever an opponent casts or copies an instant or sorcery spell, they lose 1 life.
|
||||
this.addAbility(new MageHunterTriggeredAbility());
|
||||
}
|
||||
|
||||
private MageHunter(final MageHunter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MageHunter copy() {
|
||||
return new MageHunter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MageHunterTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
MageHunterTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), false);
|
||||
}
|
||||
|
||||
private MageHunterTriggeredAbility(final MageHunterTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.COPIED_STACKOBJECT
|
||||
|| event.getType() == GameEvent.EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getSpell(event.getTargetId());
|
||||
if (spell == null
|
||||
|| !game.getOpponents(getControllerId()).contains(spell.getControllerId())
|
||||
|| !spell.isInstantOrSorcery()) {
|
||||
return false;
|
||||
}
|
||||
getEffects().setTargetPointer(new FixedTarget(spell.getControllerId()));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent casts or copies an instant or sorcery spell, they lose 1 life.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public MageHunterTriggeredAbility copy() {
|
||||
return new MageHunterTriggeredAbility(this);
|
||||
}
|
||||
}
|
|
@ -64,6 +64,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lorehold Command", 199, Rarity.RARE, mage.cards.l.LoreholdCommand.class));
|
||||
cards.add(new SetCardInfo("Lorehold Excavation", 200, Rarity.UNCOMMON, mage.cards.l.LoreholdExcavation.class));
|
||||
cards.add(new SetCardInfo("Lorehold Pledgemage", 201, Rarity.COMMON, mage.cards.l.LoreholdPledgemage.class));
|
||||
cards.add(new SetCardInfo("Mage Hunter", 76, Rarity.UNCOMMON, mage.cards.m.MageHunter.class));
|
||||
cards.add(new SetCardInfo("Magma Opus", 203, Rarity.MYTHIC, mage.cards.m.MagmaOpus.class));
|
||||
cards.add(new SetCardInfo("Mountain", 372, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Necroblossom Snarl", 269, Rarity.RARE, mage.cards.n.NecroblossomSnarl.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue