1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-09 09:11:05 -09:00

[MH2] fixed Garth One-Eye permanent spells not becoming tokens

This commit is contained in:
Evan Kranzler 2021-06-10 18:42:02 -04:00
parent c8154bf018
commit bd92ced539
2 changed files with 12 additions and 6 deletions
Mage/src/main/java/mage
game/stack
players

View file

@ -257,19 +257,22 @@ public class Spell extends StackObjectImpl implements Card {
card.addSubType(game, SubType.AURA);
}
}
UUID permId = null;
boolean flag = false;
if (!isCopy()) {
permId = card.getId();
flag = controller.moveCards(card, Zone.BATTLEFIELD, ability, game, false, faceDown, false, null);
} else {
UUID permId;
boolean flag;
if (isCopy()) {
EmptyToken token = new EmptyToken();
CardUtil.copyTo(token).from(card, game, this);
// The token that a resolving copy of a spell becomes isnt said to have been created. (2020-09-25)
if (token.putOntoBattlefield(1, game, ability, getControllerId(), false, false, null, false)) {
permId = token.getLastAddedToken();
flag = true;
} else {
permId = null;
flag = false;
}
} else {
permId = card.getId();
flag = controller.moveCards(card, Zone.BATTLEFIELD, ability, game, false, faceDown, false, null);
}
if (flag) {
if (bestow) {

View file

@ -1177,6 +1177,9 @@ public abstract class PlayerImpl implements Player, Serializable {
logger.error("Got no spell from stack. ability: " + ability.getRule());
return false;
}
if (card.isCopy()) {
spell.setCopy(true, null);
}
// Update the zcc to the stack
ability.setSourceObjectZoneChangeCounter(game.getState().getZoneChangeCounter(ability.getSourceId()));