mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
fix the CardViewer not displaying tokens (#10789)
This commit is contained in:
parent
2b18dc432c
commit
8457ce31c5
1 changed files with 18 additions and 12 deletions
|
|
@ -92,12 +92,14 @@ public class PermanentView extends CardView {
|
|||
this.nameOwner = "";
|
||||
}
|
||||
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (controller != null) {
|
||||
nameController = controller.getName();
|
||||
} else {
|
||||
nameController = "";
|
||||
String nameController = "";
|
||||
if (game != null) {
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (controller != null) {
|
||||
nameController = controller.getName();
|
||||
}
|
||||
}
|
||||
this.nameController = nameController;
|
||||
|
||||
// add info for face down permanents
|
||||
if (permanent.isFaceDown(game) && card != null) {
|
||||
|
|
@ -125,15 +127,19 @@ public class PermanentView extends CardView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// determines if shown in it's own column
|
||||
Permanent attachment = game.getPermanent(permanent.getAttachedTo());
|
||||
if (attachment != null) {
|
||||
attachedToPermanent = true;
|
||||
attachedControllerDiffers = !attachment.getControllerId().equals(permanent.getControllerId());
|
||||
} else {
|
||||
attachedToPermanent = false;
|
||||
attachedControllerDiffers = false;
|
||||
boolean attachedToPermanent = false;
|
||||
boolean attachedControllerDiffers = false;
|
||||
if (game != null) {
|
||||
Permanent attachment = game.getPermanent(permanent.getAttachedTo());
|
||||
if (attachment != null) {
|
||||
attachedToPermanent = true;
|
||||
attachedControllerDiffers = !attachment.getControllerId().equals(permanent.getControllerId());
|
||||
}
|
||||
}
|
||||
this.attachedToPermanent = attachedToPermanent;
|
||||
this.attachedControllerDiffers = attachedControllerDiffers;
|
||||
}
|
||||
|
||||
public boolean isTapped() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue