forked from External/mage
[MH3] Implement Horrid Shadowspinner
This commit is contained in:
parent
4608606dd0
commit
ac9519f6a2
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/h/HorridShadowspinner.java
Normal file
76
Mage.Sets/src/mage/cards/h/HorridShadowspinner.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HorridShadowspinner extends CardImpl {
|
||||
|
||||
public HorridShadowspinner(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}");
|
||||
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// Whenever Horrid Shadowspinner attacks, you may draw cards equal to its power. If you do, discard that many cards.
|
||||
this.addAbility(new AttacksTriggeredAbility(new HorridShadowspinnerEffect(), false));
|
||||
}
|
||||
|
||||
private HorridShadowspinner(final HorridShadowspinner card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HorridShadowspinner copy() {
|
||||
return new HorridShadowspinner(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HorridShadowspinnerEffect extends OneShotEffect {
|
||||
|
||||
HorridShadowspinnerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "draw cards equal to its power. If you do, discard that many cards";
|
||||
}
|
||||
|
||||
private HorridShadowspinnerEffect(final HorridShadowspinnerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HorridShadowspinnerEffect copy() {
|
||||
return new HorridShadowspinnerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = source.getSourcePermanentOrLKI(game);
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
int power = Math.max(permanent.getPower().getValue(), 0);
|
||||
player.drawCards(power, source, game);
|
||||
player.discard(power, false, false, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -76,6 +76,7 @@ public final class ModernHorizons3 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Guardian of the Forgotten", 28, Rarity.UNCOMMON, mage.cards.g.GuardianOfTheForgotten.class));
|
||||
cards.add(new SetCardInfo("Guide of Souls", 29, Rarity.RARE, mage.cards.g.GuideOfSouls.class));
|
||||
cards.add(new SetCardInfo("Harbinger of the Seas", 63, Rarity.RARE, mage.cards.h.HarbingerOfTheSeas.class));
|
||||
cards.add(new SetCardInfo("Horrid Shadowspinner", 188, Rarity.UNCOMMON, mage.cards.h.HorridShadowspinner.class));
|
||||
cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("It That Heralds the End", 9, Rarity.UNCOMMON, mage.cards.i.ItThatHeraldsTheEnd.class));
|
||||
cards.add(new SetCardInfo("Jet Medallion", 292, Rarity.RARE, mage.cards.j.JetMedallion.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue