This commit is contained in:
BetaSteward 2010-11-03 04:06:47 +00:00
parent 2b1d3f6b37
commit ff33253646
37 changed files with 240 additions and 84 deletions

View file

@ -80,8 +80,13 @@ public class PlayerView implements Serializable {
//show permanents controlled by player or attachments to permanents controlled by player
if (permanent.getAttachedTo() == null)
return permanent.getControllerId().equals(playerId);
else
return game.getPermanent(permanent.getAttachedTo()).getControllerId().equals(playerId);
else {
Permanent attachedTo = game.getPermanent(permanent.getAttachedTo());
if (attachedTo != null)
return attachedTo.getControllerId().equals(playerId);
else
return permanent.getControllerId().equals(playerId);
}
}
public int getLife() {