forked from External/mage
update a few more cards
This commit is contained in:
parent
c83eb0ca9a
commit
ee2656fae4
4 changed files with 45 additions and 41 deletions
|
|
@ -15,9 +15,11 @@ import mage.constants.*;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -90,17 +92,18 @@ class AyaraFurnaceQueenEffect extends OneShotEffect {
|
|||
if (player == null || card == null) {
|
||||
return false;
|
||||
}
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
if (game.getPermanent(card.getId()) == null) {
|
||||
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
game.addEffect(new GainAbilityTargetEffect(
|
||||
HasteAbility.getInstance(), Duration.Custom
|
||||
).setTargetPointer(new FixedTarget(card.getId(), game)), source);
|
||||
).setTargetPointer(new FixedTarget(permanent.getId(), game)), source);
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||
new ExileTargetEffect().setText("exile it")
|
||||
.setTargetPointer(new FixedTarget(card.getId(), game)),
|
||||
.setTargetPointer(new FixedTarget(permanent.getId(), game)),
|
||||
TargetController.ANY
|
||||
), source);
|
||||
return true;}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,11 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -78,7 +80,7 @@ class CultivatorColossusEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
while (player.getHand().count(StaticFilters.FILTER_CARD_LAND, game) > 0) {
|
||||
while (player.canRespond() && player.getHand().count(StaticFilters.FILTER_CARD_LAND, game) > 0) {
|
||||
TargetCard target = new TargetCardInHand(
|
||||
0, 1, StaticFilters.FILTER_CARD_LAND
|
||||
);
|
||||
|
|
@ -91,10 +93,10 @@ class CultivatorColossusEffect extends OneShotEffect {
|
|||
card, Zone.BATTLEFIELD, source, game, true,
|
||||
false, false, null
|
||||
);
|
||||
if (game.getPermanent(card.getId()) == null) {
|
||||
break;
|
||||
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
|
||||
if (permanent != null) {
|
||||
player.drawCards(1, source, game);
|
||||
}
|
||||
player.drawCards(1, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
|
@ -63,7 +64,7 @@ class ItDoesntAddUpEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Optional.ofNullable(game.getPermanent(card.getId()))
|
||||
Optional.ofNullable(CardUtil.getPermanentFromCardPutToBattlefield(card, game))
|
||||
.ifPresent(permanent -> permanent.setSuspected(true, game, source));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,51 +1,47 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.VehiclesBecomeArtifactCreatureEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.*;
|
||||
import mage.abilities.effects.common.continuous.BecomesSubtypeAllEffect;
|
||||
import mage.abilities.effects.common.continuous.CreaturesBecomeOtherTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.VehiclesBecomeArtifactCreatureEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.MageObjectReferencePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jmlundeen
|
||||
*/
|
||||
public final class PushTheLimit extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filterCreatures = new FilterControlledPermanent("Creatures you control");
|
||||
|
||||
public PushTheLimit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}");
|
||||
|
||||
|
||||
// Return all Mount and Vehicle cards from your graveyard to the battlefield. Sacrifice them at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new PushTheLimitEffect());
|
||||
|
||||
// Vehicles you control become artifact creatures until end of turn. Creatures you control gain haste until end of turn.
|
||||
this.getSpellAbility().addEffect(new VehiclesBecomeArtifactCreatureEffect(Duration.EndOfTurn)
|
||||
.concatBy("<br>"));
|
||||
|
|
@ -63,6 +59,7 @@ public final class PushTheLimit extends CardImpl {
|
|||
}
|
||||
|
||||
class PushTheLimitEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Mount and Vehicle cards");
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
|
|
@ -70,13 +67,14 @@ class PushTheLimitEffect extends OneShotEffect {
|
|||
SubType.VEHICLE.getPredicate()
|
||||
));
|
||||
}
|
||||
public PushTheLimitEffect() {
|
||||
|
||||
PushTheLimitEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "return all " + filter.getMessage() + " from your graveyard to the battlefield. " +
|
||||
"Sacrifice them at the beginning of the next end step.";
|
||||
}
|
||||
|
||||
public PushTheLimitEffect(final PushTheLimitEffect effect) {
|
||||
private PushTheLimitEffect(final PushTheLimitEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
|
@ -96,7 +94,7 @@ class PushTheLimitEffect extends OneShotEffect {
|
|||
false, false, false, null);
|
||||
if (result) {
|
||||
List<Permanent> permanentsToSac = cards.stream()
|
||||
.map(card -> game.getPermanent(card.getId()))
|
||||
.map(card -> CardUtil.getPermanentFromCardPutToBattlefield(card, game))
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
Effect sacrificeEffect = new SacrificeTargetEffect("sacrifice them", source.getControllerId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue