- More changes related to supporting negative power and toughness, please test to see this doesn't break anything.

- Fixed some visualization issues in the deck editor related to supporting negative P/T (e.g. non-creatures showing up as P/T 2 billion+ / 2 billion+).
This commit is contained in:
Agetian
2016-10-09 12:05:55 +00:00
parent 401dba1596
commit 2cd7016703
7 changed files with 18 additions and 16 deletions

View File

@@ -428,15 +428,17 @@ public enum ColumnDef {
int result = -1;
if (i instanceof PaperCard) {
result = ((IPaperCard) i).getRules().getIntPower();
if (result == -1) {
result = ((IPaperCard) i).getRules().getInitialLoyalty();
if (result == Integer.MAX_VALUE) {
if (((IPaperCard)i).getRules().getType().isPlaneswalker()) {
result = ((IPaperCard) i).getRules().getInitialLoyalty();
}
}
}
return result;
}
private static Integer toToughness(final InventoryItem i) {
return i instanceof PaperCard ? ((IPaperCard) i).getRules().getIntToughness() : -1;
return i instanceof PaperCard ? ((IPaperCard) i).getRules().getIntToughness() : Integer.MAX_VALUE;
}
private static Integer toCMC(final InventoryItem i) {