mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
[ZNR] Implemented Zagras, Thief of Heartbeats
This commit is contained in:
parent
d9ba91bcf8
commit
de092a7ea7
2 changed files with 115 additions and 0 deletions
114
Mage.Sets/src/mage/cards/z/ZagrasThiefOfHeartbeats.java
Normal file
114
Mage.Sets/src/mage/cards/z/ZagrasThiefOfHeartbeats.java
Normal file
|
@ -0,0 +1,114 @@
|
|||
package mage.cards.z;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.PartyCount;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
import mage.abilities.hint.common.PartyCountHint;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedCreatureEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ZagrasThiefOfHeartbeats extends CardImpl {
|
||||
|
||||
public ZagrasThiefOfHeartbeats(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// This spell costs {1} less to cast for each creature in your party.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionForEachSourceEffect(1, PartyCount.instance)
|
||||
).addHint(PartyCountHint.instance));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Other creatures you control have deathtouch.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_PERMANENT_CREATURES, true
|
||||
)));
|
||||
|
||||
// Whenever a creature you control deals combat damage to a planeswalker, destroy that planeswalker.
|
||||
this.addAbility(new ZagrasThiefOfHeartbeatsTriggeredAbility());
|
||||
}
|
||||
|
||||
private ZagrasThiefOfHeartbeats(final ZagrasThiefOfHeartbeats card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZagrasThiefOfHeartbeats copy() {
|
||||
return new ZagrasThiefOfHeartbeats(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ZagrasThiefOfHeartbeatsTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
ZagrasThiefOfHeartbeatsTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, null, false);
|
||||
}
|
||||
|
||||
private ZagrasThiefOfHeartbeatsTriggeredAbility(final ZagrasThiefOfHeartbeatsTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZagrasThiefOfHeartbeatsTriggeredAbility copy() {
|
||||
return new ZagrasThiefOfHeartbeatsTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!((DamagedCreatureEvent) event).isCombatDamage()) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||
if (permanent == null
|
||||
|| !permanent.isCreature()
|
||||
|| !permanent.isControlledBy(getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new DestroyTargetEffect().setTargetPointer(new FixedTarget(event.getTargetId(), game)));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature you control deals combat damage to a planeswalker, destroy that planeswalker.";
|
||||
}
|
||||
}
|
|
@ -388,6 +388,7 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Wayward Guide-Beast", 176, Rarity.RARE, mage.cards.w.WaywardGuideBeast.class));
|
||||
cards.add(new SetCardInfo("Windrider Wizard", 87, Rarity.UNCOMMON, mage.cards.w.WindriderWizard.class));
|
||||
cards.add(new SetCardInfo("Yasharn, Implacable Earth", 240, Rarity.RARE, mage.cards.y.YasharnImplacableEarth.class));
|
||||
cards.add(new SetCardInfo("Zagras, Thief of Heartbeats", 241, Rarity.RARE, mage.cards.z.ZagrasThiefOfHeartbeats.class));
|
||||
cards.add(new SetCardInfo("Zareth San, the Trickster", 242, Rarity.RARE, mage.cards.z.ZarethSanTheTrickster.class));
|
||||
cards.add(new SetCardInfo("Zof Bloodbog", 132, Rarity.UNCOMMON, mage.cards.z.ZofBloodbog.class));
|
||||
cards.add(new SetCardInfo("Zof Consumption", 132, Rarity.UNCOMMON, mage.cards.z.ZofConsumption.class));
|
||||
|
|
Loading…
Reference in a new issue