mirror of
https://github.com/correl/mage.git
synced 2024-12-29 11:09:17 +00:00
[MOM] Implement Volcanic Spite
This commit is contained in:
parent
7eaeeef676
commit
203765ec00
2 changed files with 94 additions and 0 deletions
93
Mage.Sets/src/mage/cards/v/VolcanicSpite.java
Normal file
93
Mage.Sets/src/mage/cards/v/VolcanicSpite.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VolcanicSpite extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("creature, planeswalker, or battle");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.PLANESWALKER.getPredicate(),
|
||||
CardType.BATTLE.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public VolcanicSpite(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
|
||||
// Volcanic Spite deals 3 damage to target creature, planeswalker, or battle. You may put a card from your hand on the bottom of your library. If you do, draw a card.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addEffect(new VolcanicSpiteEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private VolcanicSpite(final VolcanicSpite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolcanicSpite copy() {
|
||||
return new VolcanicSpite(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VolcanicSpiteEffect extends OneShotEffect {
|
||||
|
||||
VolcanicSpiteEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may put a card from your hand on the bottom of your library. If you do, draw a card";
|
||||
}
|
||||
|
||||
private VolcanicSpiteEffect(final VolcanicSpiteEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolcanicSpiteEffect copy() {
|
||||
return new VolcanicSpiteEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null
|
||||
|| player.getHand().isEmpty()
|
||||
|| !player.chooseUse(
|
||||
outcome, "Put a card from your hand " +
|
||||
"on the bottom of your library?", source, game
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInHand();
|
||||
player.choose(outcome, player.getHand(), target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.putCardsOnBottomOfLibrary(card, game, source, false)) {
|
||||
player.drawCards(1, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -204,6 +204,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Transcendent Message", 83, Rarity.RARE, mage.cards.t.TranscendentMessage.class));
|
||||
cards.add(new SetCardInfo("Urn of Godfire", 266, Rarity.COMMON, mage.cards.u.UrnOfGodfire.class));
|
||||
cards.add(new SetCardInfo("Vanquish the Weak", 129, Rarity.COMMON, mage.cards.v.VanquishTheWeak.class));
|
||||
cards.add(new SetCardInfo("Volcanic Spite", 170, Rarity.COMMON, mage.cards.v.VolcanicSpite.class));
|
||||
cards.add(new SetCardInfo("Voldaren Thrillseeker", 171, Rarity.RARE, mage.cards.v.VoldarenThrillseeker.class));
|
||||
cards.add(new SetCardInfo("War Historian", 214, Rarity.COMMON, mage.cards.w.WarHistorian.class));
|
||||
cards.add(new SetCardInfo("War-Trained Slasher", 172, Rarity.COMMON, mage.cards.w.WarTrainedSlasher.class));
|
||||
|
|
Loading…
Reference in a new issue