mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Fixed zone handling of meld cards that left the battlefield (fixes that coninuous effects of meld cards didn't stop to be applied after the meld card left the battlefield) fixes #2140.
This commit is contained in:
parent
a2a540c2b4
commit
c563d6f701
2 changed files with 53 additions and 11 deletions
|
|
@ -51,8 +51,7 @@ public class PermanentMeld extends PermanentCard {
|
|||
public int getConvertedManaCost() {
|
||||
if (this.isCopy()) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return this.getCard().getConvertedManaCost();
|
||||
}
|
||||
}
|
||||
|
|
@ -87,8 +86,7 @@ public class PermanentMeld extends PermanentCard {
|
|||
cardsToMove.add(bottomHalfCard);
|
||||
if (flag) {
|
||||
controller.putCardsOnTopOfLibrary(cardsToMove, game, null, true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
controller.putCardsOnBottomOfLibrary(cardsToMove, game, null, true);
|
||||
}
|
||||
break;
|
||||
|
|
@ -131,8 +129,7 @@ public class PermanentMeld extends PermanentCard {
|
|||
if (exileId == null) {
|
||||
game.getExile().getPermanentExile().add(topHalfCard);
|
||||
game.getExile().getPermanentExile().add(bottomHalfCard);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
game.getExile().createZone(exileId, name).add(topHalfCard);
|
||||
game.getExile().getExileZone(exileId).add(bottomHalfCard);
|
||||
}
|
||||
|
|
@ -143,8 +140,7 @@ public class PermanentMeld extends PermanentCard {
|
|||
cardsToMove.add(bottomHalfCard);
|
||||
if (event.getFlag()) {
|
||||
controller.putCardsOnTopOfLibrary(cardsToMove, game, null, true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
controller.putCardsOnBottomOfLibrary(cardsToMove, game, null, true);
|
||||
}
|
||||
break;
|
||||
|
|
@ -152,6 +148,7 @@ public class PermanentMeld extends PermanentCard {
|
|||
return false;
|
||||
}
|
||||
meldCard.setMelded(false);
|
||||
game.setZone(meldCard.getId(), Zone.OUTSIDE);
|
||||
game.setZone(topHalfCard.getId(), event.getToZone());
|
||||
game.setZone(bottomHalfCard.getId(), event.getToZone());
|
||||
meldCard.setTopLastZoneChangeCounter(topHalfCard.getZoneChangeCounter(game));
|
||||
|
|
@ -168,8 +165,7 @@ public class PermanentMeld extends PermanentCard {
|
|||
MeldCard meldCard = (MeldCard) this.getCard();
|
||||
if (meldCard.isMelded()) {
|
||||
super.addCounters(name, amount, game, appliedEffects);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
meldCard.getTopHalfCard().addCounters(name, amount, game, appliedEffects);
|
||||
meldCard.getBottomHalfCard().addCounters(name, amount, game, appliedEffects);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue