mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
- Fixed #7672
This commit is contained in:
parent
f06f4ab252
commit
5dcbb49ba6
1 changed files with 11 additions and 7 deletions
|
@ -20,6 +20,7 @@ import mage.target.common.TargetCardInGraveyard;
|
|||
import mage.target.targetpointer.EachTargetPointer;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
|
||||
/**
|
||||
* @author Plopman
|
||||
|
@ -54,11 +55,11 @@ public final class GoblinWelder extends CardImpl {
|
|||
|
||||
public GoblinWelderEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
staticText = "Choose target artifact a player controls " +
|
||||
"and target artifact card in that player's graveyard. " +
|
||||
"If both targets are still legal as this ability resolves, " +
|
||||
"that player simultaneously sacrifices the artifact " +
|
||||
"and returns the artifact card to the battlefield";
|
||||
staticText = "Choose target artifact a player controls "
|
||||
+ "and target artifact card in that player's graveyard. "
|
||||
+ "If both targets are still legal as this ability resolves, "
|
||||
+ "that player simultaneously sacrifices the artifact "
|
||||
+ "and returns the artifact card to the battlefield";
|
||||
this.setTargetPointer(new EachTargetPointer());
|
||||
}
|
||||
|
||||
|
@ -74,7 +75,9 @@ public final class GoblinWelder extends CardImpl {
|
|||
Permanent artifact = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
Card card = game.getCard(getTargetPointer().getTargets(game, source).get(1));
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (artifact == null || card == null || controller == null) {
|
||||
if (artifact == null
|
||||
|| card == null
|
||||
|| controller == null) {
|
||||
return false;
|
||||
}
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
|
@ -82,6 +85,7 @@ public final class GoblinWelder extends CardImpl {
|
|||
return false;
|
||||
}
|
||||
boolean sacrifice = artifact.sacrifice(source, game);
|
||||
game.getState().processAction(game); // bug #7672
|
||||
boolean putOnBF = owner.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
if (sacrifice || putOnBF) {
|
||||
return true;
|
||||
|
@ -99,7 +103,7 @@ public final class GoblinWelder extends CardImpl {
|
|||
private static class GoblinWelderTarget extends TargetCardInGraveyard {
|
||||
|
||||
public GoblinWelderTarget() {
|
||||
super();
|
||||
super(new FilterArtifactCard());
|
||||
targetName = "target artifact card in that player's graveyard";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue