mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented Vraska's Stoneglare
This commit is contained in:
parent
84cff64b70
commit
e6dc705226
3 changed files with 84 additions and 1 deletions
|
@ -19,7 +19,7 @@ public final class RalsDispersal extends CardImpl {
|
|||
private final static FilterCard filter = new FilterCard("Ral, Caller of Storms");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Ral, Caller of Stormss"));
|
||||
filter.add(new NamePredicate("Ral, Caller of Storms"));
|
||||
}
|
||||
|
||||
public RalsDispersal(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
82
Mage.Sets/src/mage/cards/v/VraskasStoneglare.java
Normal file
82
Mage.Sets/src/mage/cards/v/VraskasStoneglare.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VraskasStoneglare extends CardImpl {
|
||||
|
||||
private final static FilterCard filter = new FilterCard("Vraska, Regal Gordon");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Vraska, Regal Gordon"));
|
||||
}
|
||||
|
||||
public VraskasStoneglare(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{G}");
|
||||
|
||||
// Destroy target creature. You gain life equal to its toughness. You may search your library and/or graveyard from a card named Vraska, Regal Gordon, reveal it, and put it in to your hand. If you search your library this way, shuffle it.
|
||||
this.getSpellAbility().addEffect(new VraskasStoneglareEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(
|
||||
new SearchLibraryGraveyardPutInHandEffect(filter, false, false)
|
||||
);
|
||||
}
|
||||
|
||||
public VraskasStoneglare(final VraskasStoneglare card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VraskasStoneglare copy() {
|
||||
return new VraskasStoneglare(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VraskasStoneglareEffect extends OneShotEffect {
|
||||
|
||||
public VraskasStoneglareEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Destroy target creature. "
|
||||
+ "You gain life equal to its toughness.";
|
||||
}
|
||||
|
||||
public VraskasStoneglareEffect(final VraskasStoneglareEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VraskasStoneglareEffect copy() {
|
||||
return new VraskasStoneglareEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
int toughness = permanent.getToughness().getValue();
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
if (player != null) {
|
||||
player.gainLife(toughness, game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -61,6 +61,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Thought Erasure", 206, Rarity.UNCOMMON, mage.cards.t.ThoughtErasure.class));
|
||||
cards.add(new SetCardInfo("Underrealm Lich", 211, Rarity.MYTHIC, mage.cards.u.UnderrealmLich.class));
|
||||
cards.add(new SetCardInfo("Unexplained Disappearance", 56, Rarity.COMMON, mage.cards.u.UnexplainedDisappearance.class));
|
||||
cards.add(new SetCardInfo("Vraska's Stoneglare", 272, Rarity.RARE, mage.cards.v.VraskasStoneglare.class));
|
||||
cards.add(new SetCardInfo("Wary Okapi", 149, Rarity.COMMON, mage.cards.w.WaryOkapi.class));
|
||||
cards.add(new SetCardInfo("Watery Grave", 259, Rarity.RARE, mage.cards.w.WateryGrave.class));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue