forked from External/mage
* Fixed that permanets attached to non permanents (Enchant player and no curse / enchant card in graveyard) are shown wrongly attached to the first other permanent on the battlefield (fixes #632).
This commit is contained in:
parent
72cf165c76
commit
3d55659568
2 changed files with 32 additions and 22 deletions
|
|
@ -59,6 +59,7 @@ public class PermanentView extends CardView {
|
|||
private final UUID attachedTo;
|
||||
private final boolean morphed;
|
||||
private final boolean manifested;
|
||||
private final boolean attachedToPermanent;
|
||||
|
||||
public PermanentView(Permanent permanent, Card card, UUID createdForPlayerId, Game game) {
|
||||
super(permanent, null, permanent.getControllerId().equals(createdForPlayerId));
|
||||
|
|
@ -143,7 +144,13 @@ public class PermanentView extends CardView {
|
|||
" A face-down card can also be turned face up for its morph cost.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// determines if shown in it's own column
|
||||
if (permanent.getAttachedTo() != null) {
|
||||
attachedToPermanent = game.getPermanent(permanent.getAttachedTo()) != null;
|
||||
} else {
|
||||
attachedToPermanent = false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isTapped() {
|
||||
|
|
@ -198,6 +205,10 @@ public class PermanentView extends CardView {
|
|||
return attachedTo != null;
|
||||
}
|
||||
|
||||
public boolean isAttachedToPermanent() {
|
||||
return attachedToPermanent;
|
||||
}
|
||||
|
||||
public boolean isMorphed() {
|
||||
return morphed;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue