mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
* Rally the Ancestors - Fixed that creatures cards were moved to exile also if already in the graveyard. Problem was that the zoneChangeCounter was not raised as a permanent card left the battlefield. So some more fixes were neccessary for implementations that are based on this fixed zoneChangeCounter of permanents leaving the battlefield. I guess there will be some more bugs caused by this change but I guess this is the correct way to go.
This commit is contained in:
parent
dbbbbc0279
commit
faa2b0a0bf
18 changed files with 77 additions and 37 deletions
|
|
@ -107,8 +107,10 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
}
|
||||
Collections.shuffle(cardsToManifest);
|
||||
game.informPlayers(controller.getName() + " shuffles the face-down pile");
|
||||
Ability newSource = source.copy();
|
||||
newSource.setWorksFaceDown(true);
|
||||
for (Card card: cardsToManifest) {
|
||||
if (card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false)) {
|
||||
if (card.moveToZone(Zone.BATTLEFIELD, newSource.getSourceId(), game, false)) {
|
||||
game.informPlayers(new StringBuilder(controller.getName())
|
||||
.append(" puts facedown card from exile onto the battlefield").toString());
|
||||
ManaCosts<ManaCost> manaCosts = null;
|
||||
|
|
@ -120,7 +122,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
}
|
||||
ContinuousEffect effect = new BecomesFaceDownCreatureEffect(manaCosts, true, Duration.Custom, FaceDownType.MANIFESTED);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, source);
|
||||
game.addEffect(effect, newSource);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class HungeringYeti extends CardImpl {
|
|||
|
||||
// As long as you control a green or blue permanent, you may cast Hungering Yeti as though it had flash.
|
||||
AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame);
|
||||
effect.setText("As long as you control a green or blue permanent, you may cast Hungering Yeti as though it had flash");
|
||||
effect.setText("As long as you control a green or blue permanent, you may cast {this} as though it had flash");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalAsThoughEffect(effect,
|
||||
new PermanentsOnTheBattlefieldCondition(filter))));
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
|
|||
sourceCard.setFaceDown(true);
|
||||
cardsToManifest.add(sourceCard);
|
||||
}
|
||||
if (player.getLibrary().size() > 0) {
|
||||
if (sourcePermanent!= null && player.getLibrary().size() > 0) {
|
||||
Card cardFromLibrary = player.getLibrary().removeFromTop(game);
|
||||
cardFromLibrary.setFaceDown(true);
|
||||
player.moveCardToExileWithInfo(cardFromLibrary, sourcePermanent.getId(), sourcePermanent.getName(), source.getSourceId(), game, Zone.LIBRARY);
|
||||
|
|
@ -127,8 +127,10 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
|
|||
}
|
||||
Collections.shuffle(cardsToManifest);
|
||||
game.fireUpdatePlayersEvent(); // removes Jeskai from Battlefield, so he returns as a fresh permanent to the battlefield with new position
|
||||
Ability newSource = source.copy();
|
||||
newSource.setWorksFaceDown(true);
|
||||
for (Card card : cardsToManifest) {
|
||||
if (card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false)) {
|
||||
if (card.moveToZone(Zone.BATTLEFIELD, newSource.getSourceId(), game, false)) {
|
||||
game.informPlayers(new StringBuilder(player.getName())
|
||||
.append(" puts facedown card from exile onto the battlefield").toString());
|
||||
ManaCosts<ManaCost> manaCosts = null;
|
||||
|
|
@ -145,7 +147,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
|
|||
FaceDownType.MANIFESTED
|
||||
);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, source);
|
||||
game.addEffect(effect, newSource);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ public class RallyTheAncestors extends CardImpl {
|
|||
super(ownerId, 22, "Rally the Ancestors", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{X}{W}{W}");
|
||||
this.expansionSetCode = "FRF";
|
||||
|
||||
// Return each creature card with converted mana cost X or less from your graveyard to the battlefield. Exile those creatures at the beginning of your next upkeep. Exile Rally the Ancestors.
|
||||
// Return each creature card with converted mana cost X or less from your graveyard to the battlefield.
|
||||
// Exile those creatures at the beginning of your next upkeep. Exile Rally the Ancestors.
|
||||
this.getSpellAbility().addEffect(new RallyTheAncestorsEffect());
|
||||
this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
|
||||
}
|
||||
|
|
@ -101,7 +102,7 @@ class RallyTheAncestorsEffect extends OneShotEffect {
|
|||
for (Card card : cards) {
|
||||
if (card != null) {
|
||||
player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId());
|
||||
Effect exileEffect = new ExileTargetEffect();
|
||||
Effect exileEffect = new ExileTargetEffect("Exile those creatures at the beginning of your next upkeep");
|
||||
exileEffect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(exileEffect);
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
package mage.sets.theros;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
|
@ -121,11 +122,12 @@ class AshiokNightmareWeaverExileEffect extends OneShotEffect {
|
|||
UUID exileId = CardUtil.getCardExileZoneId(game, source);
|
||||
Player opponent = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (opponent != null && controller != null) {
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (sourceObject != null && opponent != null && controller != null) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Card card = opponent.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCardToExileWithInfo(card, exileId, "Ashiok, Nightmare Weaver", source.getSourceId(), game, Zone.LIBRARY);
|
||||
controller.moveCardToExileWithInfo(card, exileId, sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
@ -166,7 +168,8 @@ class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect {
|
|||
|
||||
FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card with converted mana cost {").append(cmc).append("} exiled with Ashiok, Nightmare Weaver").toString());
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));
|
||||
Target target = new TargetCardInExile(filter, CardUtil.getCardExileZoneId(game, source));
|
||||
|
||||
Target target = new TargetCardInExile(filter, CardUtil.getCardExileZoneId(game, source.getSourceId(), game.getPermanent(source.getSourceId()) == null));
|
||||
|
||||
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
if (player.chooseTarget(Outcome.PutCreatureInPlay, target, source, game)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue