mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Merge pull request #5717 from ketsuban/mirage
Implement two Mirage cards
This commit is contained in:
commit
46894890d7
3 changed files with 166 additions and 0 deletions
83
Mage.Sets/src/mage/cards/s/Soulshriek.java
Normal file
83
Mage.Sets/src/mage/cards/s/Soulshriek.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/*
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public class Soulshriek extends CardImpl {
|
||||
|
||||
protected static final FilterCard filterCard = new FilterCard("creature cards");
|
||||
|
||||
static {
|
||||
filterCard.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public Soulshriek(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}");
|
||||
|
||||
// Target creature you control gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard. Sacrifice that creature at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new SoulshriekEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card copy() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class SoulshriekEffect extends OneShotEffect {
|
||||
|
||||
public SoulshriekEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "Target creature you control gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard. Sacrifice that creature at the beginning of the next end step";
|
||||
}
|
||||
|
||||
public SoulshriekEffect(final SoulshriekEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoulshriekEffect copy() {
|
||||
return new SoulshriekEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
ContinuousEffect boost = new BoostTargetEffect(new CardsInControllerGraveyardCount(Soulshriek.filterCard), new StaticValue(0), Duration.EndOfTurn);
|
||||
boost.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(boost, source);
|
||||
Effect sacrifice = new SacrificeTargetEffect("Sacrifice that creature at the beginning of the next end step", source.getControllerId());
|
||||
sacrifice.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrifice), source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
81
Mage.Sets/src/mage/cards/u/UrborgPanther.java
Normal file
81
Mage.Sets/src/mage/cards/u/UrborgPanther.java
Normal file
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.permanent.BlockingAttackerIdPredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public class UrborgPanther extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("creature named Feral Shadow");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("creature named Breathstealer");
|
||||
|
||||
private static final FilterCard filterCard = new FilterCreatureCard("card named Spirit of the Night");
|
||||
|
||||
static {
|
||||
filter1.add(new NamePredicate("Feral Shadow"));
|
||||
filter2.add(new NamePredicate("Breathstealer"));
|
||||
filterCard.add(new NamePredicate("Spirit of the Night"));
|
||||
}
|
||||
|
||||
public UrborgPanther(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.CREATURE }, "{2}{B}");
|
||||
this.subtype.add(SubType.NIGHTSTALKER);
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// B, Sacrifice Urborg Panther: Destroy target creature blocking Urborg Panther.
|
||||
Ability ability1 = new SimpleActivatedAbility(new DestroyTargetEffect(),
|
||||
new ColoredManaCost(ColoredManaSymbol.B));
|
||||
ability1.addCost(new SacrificeSourceCost());
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking {this}");
|
||||
filter.add(new BlockingAttackerIdPredicate(this.getId()));
|
||||
ability1.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability1);
|
||||
|
||||
// Sacrifice a creature named Feral Shadow, a creature named Breathstealer, and
|
||||
// Urborg Panther: Search your library for a card named Spirit of the Night and
|
||||
// put that card onto the battlefield. Then shuffle your library.
|
||||
Ability ability2 = new SimpleActivatedAbility(
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(1, 1, new FilterCard(filterCard))),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter1, true)));
|
||||
ability2.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter2, true)));
|
||||
ability2.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
||||
public UrborgPanther(final UrborgPanther card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrborgPanther copy() {
|
||||
return new UrborgPanther(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -279,6 +279,7 @@ public final class Mirage extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Soar", 93, Rarity.COMMON, mage.cards.s.Soar.class));
|
||||
cards.add(new SetCardInfo("Soul Echo", 40, Rarity.RARE, mage.cards.s.SoulEcho.class));
|
||||
cards.add(new SetCardInfo("Soul Rend", 144, Rarity.UNCOMMON, mage.cards.s.SoulRend.class));
|
||||
cards.add(new SetCardInfo("Soulshriek", 145, Rarity.COMMON, mage.cards.s.Soulshriek.class));
|
||||
cards.add(new SetCardInfo("Spectral Guardian", 41, Rarity.RARE, mage.cards.s.SpectralGuardian.class));
|
||||
cards.add(new SetCardInfo("Spirit of the Night", 146, Rarity.RARE, mage.cards.s.SpiritOfTheNight.class));
|
||||
cards.add(new SetCardInfo("Spitting Earth", 193, Rarity.COMMON, mage.cards.s.SpittingEarth.class));
|
||||
|
@ -314,6 +315,7 @@ public final class Mirage extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Unseen Walker", 249, Rarity.UNCOMMON, mage.cards.u.UnseenWalker.class));
|
||||
cards.add(new SetCardInfo("Unyaro Bee Sting", 250, Rarity.UNCOMMON, mage.cards.u.UnyaroBeeSting.class));
|
||||
cards.add(new SetCardInfo("Unyaro Griffin", 44, Rarity.UNCOMMON, mage.cards.u.UnyaroGriffin.class));
|
||||
cards.add(new SetCardInfo("Urborg Panther", 150, Rarity.COMMON, mage.cards.u.UrborgPanther.class));
|
||||
cards.add(new SetCardInfo("Vaporous Djinn", 101, Rarity.UNCOMMON, mage.cards.v.VaporousDjinn.class));
|
||||
cards.add(new SetCardInfo("Ventifact Bottle", 323, Rarity.RARE, mage.cards.v.VentifactBottle.class));
|
||||
cards.add(new SetCardInfo("Viashino Warrior", 200, Rarity.COMMON, mage.cards.v.ViashinoWarrior.class));
|
||||
|
|
Loading…
Reference in a new issue