mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
[ZNR] Implemented Merfolk Windrobber
This commit is contained in:
parent
b629454709
commit
b33dd8c5fe
2 changed files with 97 additions and 0 deletions
96
Mage.Sets/src/mage/cards/m/MerfolkWindrobber.java
Normal file
96
Mage.Sets/src/mage/cards/m/MerfolkWindrobber.java
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
import mage.abilities.condition.common.CardsInOpponentGraveCondition;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.DamagedPlayerEvent;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class MerfolkWindrobber extends CardImpl {
|
||||||
|
|
||||||
|
public MerfolkWindrobber(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.MERFOLK);
|
||||||
|
this.subtype.add(SubType.ROGUE);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Merfolk Windrobber deals combat damage to a player, that player mills a card.
|
||||||
|
this.addAbility(new MerfolkWindrobberTriggeredAbility());
|
||||||
|
|
||||||
|
// Sacrifice Merfolk Windrobber: Draw a card. Activate this ability only if an opponent has eight or more cards in their graveyard.
|
||||||
|
this.addAbility(new ActivateIfConditionActivatedAbility(
|
||||||
|
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||||
|
new SacrificeSourceCost(), CardsInOpponentGraveCondition.EIGHT
|
||||||
|
).addHint(CardsInOpponentGraveCondition.EIGHT.getHint()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private MerfolkWindrobber(final MerfolkWindrobber card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MerfolkWindrobber copy() {
|
||||||
|
return new MerfolkWindrobber(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MerfolkWindrobberTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public MerfolkWindrobberTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MerfolkWindrobberTriggeredAbility(final MerfolkWindrobberTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MerfolkWindrobberTriggeredAbility copy() {
|
||||||
|
return new MerfolkWindrobberTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event;
|
||||||
|
if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) {
|
||||||
|
for (Effect effect : this.getEffects()) {
|
||||||
|
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever {this} deals combat damage to a player, that player mills a card.";
|
||||||
|
}
|
||||||
|
}
|
|
@ -113,6 +113,7 @@ public final class ZendikarRising extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Legion Angel", 23, Rarity.RARE, mage.cards.l.LegionAngel.class));
|
cards.add(new SetCardInfo("Legion Angel", 23, Rarity.RARE, mage.cards.l.LegionAngel.class));
|
||||||
cards.add(new SetCardInfo("Linvala, Shield of Sea Gate", 226, Rarity.RARE, mage.cards.l.LinvalaShieldOfSeaGate.class));
|
cards.add(new SetCardInfo("Linvala, Shield of Sea Gate", 226, Rarity.RARE, mage.cards.l.LinvalaShieldOfSeaGate.class));
|
||||||
cards.add(new SetCardInfo("Lotus Cobra", 193, Rarity.RARE, mage.cards.l.LotusCobra.class));
|
cards.add(new SetCardInfo("Lotus Cobra", 193, Rarity.RARE, mage.cards.l.LotusCobra.class));
|
||||||
|
cards.add(new SetCardInfo("Merfolk Windrobber", 70, Rarity.UNCOMMON, mage.cards.m.MerfolkWindrobber.class));
|
||||||
cards.add(new SetCardInfo("Might of Murasa", 194, Rarity.COMMON, mage.cards.m.MightOfMurasa.class));
|
cards.add(new SetCardInfo("Might of Murasa", 194, Rarity.COMMON, mage.cards.m.MightOfMurasa.class));
|
||||||
cards.add(new SetCardInfo("Mind Carver", 113, Rarity.UNCOMMON, mage.cards.m.MindCarver.class));
|
cards.add(new SetCardInfo("Mind Carver", 113, Rarity.UNCOMMON, mage.cards.m.MindCarver.class));
|
||||||
cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||||
|
|
Loading…
Reference in a new issue