mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
- Fixed #6817
This commit is contained in:
parent
9b803cf833
commit
90987372b7
1 changed files with 19 additions and 16 deletions
|
|
@ -11,13 +11,12 @@ 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.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
|
@ -29,31 +28,32 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class Soulshriek extends CardImpl {
|
||||
|
||||
protected static final FilterCard filterCard = new FilterCard("creature cards");
|
||||
|
||||
static {
|
||||
filterCard.add(CardType.CREATURE.getPredicate());
|
||||
}
|
||||
|
||||
public Soulshriek(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}");
|
||||
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.
|
||||
// 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());
|
||||
}
|
||||
|
||||
public Soulshriek(final Soulshriek card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card copy() {
|
||||
return null;
|
||||
public Soulshriek copy() {
|
||||
return new Soulshriek(this);
|
||||
}
|
||||
}
|
||||
|
||||
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";
|
||||
super(Outcome.Detriment);
|
||||
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) {
|
||||
|
|
@ -69,10 +69,13 @@ class SoulshriekEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
ContinuousEffect boost = new BoostTargetEffect(new CardsInControllerGraveyardCount(Soulshriek.filterCard), StaticValue.get(0), Duration.EndOfTurn);
|
||||
ContinuousEffect boost = new BoostTargetEffect(
|
||||
new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE),
|
||||
StaticValue.get(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());
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue