* Fixed null pointer exception problems in client.

This commit is contained in:
LevelX2 2017-04-30 00:07:37 +02:00
parent 4d60685c05
commit 3cc157bc2c
2 changed files with 25 additions and 27 deletions

View file

@ -29,7 +29,6 @@ package mage.view;
import java.util.*;
import java.util.stream.Collectors;
import mage.MageObject;
import mage.ObjectColor;
import mage.abilities.Abilities;
@ -66,7 +65,7 @@ public class CardView extends SimpleCardView {
protected List<String> rules;
protected String power;
protected String toughness;
protected String loyalty;
protected String loyalty = "";
protected String startingLoyalty;
protected EnumSet<CardType> cardTypes;
protected List<String> subTypes;
@ -220,8 +219,8 @@ public class CardView extends SimpleCardView {
* @param card
* @param game
* @param controlled is the card view created for the card controller - used
* for morph / face down cards to know which player may see information for
* the card
* for morph / face down cards to know which player may see information for
* the card
*/
public CardView(Card card, Game game, boolean controlled) {
this(card, game, controlled, false, false);
@ -247,12 +246,12 @@ public class CardView extends SimpleCardView {
/**
* @param card
* @param game
* @param controlled is the card view created for the card controller - used
* for morph / face down cards to know which player may see information for
* the card
* @param controlled is the card view created for the card controller - used
* for morph / face down cards to know which player may see information for
* the card
* @param showFaceDownCard if true and the card is not on the battlefield,
* also a face down card is shown in the view, face down cards will be shown
* @param storeZone if true the card zone will be set in the zone attribute.
* also a face down card is shown in the view, face down cards will be shown
* @param storeZone if true the card zone will be set in the zone attribute.
*/
public CardView(Card card, Game game, boolean controlled, boolean showFaceDownCard, boolean storeZone) {
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode(), game != null, card.getTokenDescriptor());
@ -967,7 +966,7 @@ public class CardView extends SimpleCardView {
public String getColorText() {
String color = getColor().getDescription();
return color.substring(0,1).toUpperCase() + color.substring(1);
return color.substring(0, 1).toUpperCase() + color.substring(1);
}
public String getTypeText() {