mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
* Fixed that manifested or morphed creatures did wrongly trigger "enters the battlefield" abilities with their card attributes (e.g red card manifested triggered Foundry Street Denizens boost ability).
This commit is contained in:
parent
f8439a7729
commit
ba1fb775b2
9 changed files with 113 additions and 59 deletions
|
|
@ -30,6 +30,7 @@ package mage.sets.fatereforged;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
|
|
@ -110,19 +111,19 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
Ability newSource = source.copy();
|
||||
newSource.setWorksFaceDown(true);
|
||||
for (Card card: cardsToManifest) {
|
||||
card.setFaceDown(true);
|
||||
ManaCosts manaCosts = null;
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl("{0}");
|
||||
}
|
||||
}
|
||||
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter() +1, game);
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
|
||||
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;
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl<>("{0}");
|
||||
}
|
||||
}
|
||||
ContinuousEffect effect = new BecomesFaceDownCreatureEffect(manaCosts, true, Duration.Custom, FaceDownType.MANIFESTED);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, newSource);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -130,25 +131,19 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
|
|||
Ability newSource = source.copy();
|
||||
newSource.setWorksFaceDown(true);
|
||||
for (Card card : cardsToManifest) {
|
||||
card.setFaceDown(true);
|
||||
ManaCosts manaCosts = null;
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl("{0}");
|
||||
}
|
||||
}
|
||||
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter() +1, game);
|
||||
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
|
||||
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;
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl<>("{0}");
|
||||
}
|
||||
}
|
||||
ContinuousEffect effect = new BecomesFaceDownCreatureEffect(
|
||||
manaCosts,
|
||||
true,
|
||||
Duration.Custom,
|
||||
FaceDownType.MANIFESTED
|
||||
);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, newSource);
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue