Merge branch 'master' of https://git.cardforge.org/core-developers/forge into ui-card-translation

This commit is contained in:
Peter
2019-08-06 08:46:45 +02:00
21 changed files with 55 additions and 47 deletions

View File

@@ -35,6 +35,8 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Map.Entry;
import org.apache.commons.lang3.StringUtils;
public enum ColumnDef {
/**The column containing the inventory item name.*/
STRING("", "", 0, false, SortState.ASC,
@@ -512,7 +514,8 @@ public enum ColumnDef {
result = ((IPaperCard) i).getRules().getIntPower();
if (result == Integer.MAX_VALUE) {
if (((IPaperCard)i).getRules().getType().isPlaneswalker()) {
result = ((IPaperCard) i).getRules().getInitialLoyalty();
String loy = ((IPaperCard) i).getRules().getInitialLoyalty();
result = StringUtils.isNumeric(loy) ? Integer.valueOf(loy) : 0;
}
}
}