Merge branch 'fix+gonti' into 'master'

Fixing Mana types being inappropriately referenced in relation to Matrices

See merge request core-developers/forge!883
This commit is contained in:
Jamin Collins
2018-10-12 23:13:33 +00:00
18 changed files with 143 additions and 107 deletions

View File

@@ -103,15 +103,6 @@ public final class MagicColor {
}
}
public static int getIndexOfFirstColor(final byte color){
for (int i = 0; i < NUMBER_OR_COLORS; i++) {
if ((color & WUBRG[i]) != 0) {
return i;
}
}
return -1; // colorless
}
/**
* The Interface Color.
*/

View File

@@ -14,6 +14,9 @@ public abstract class ManaAtom {
public static final byte[] MANACOLORS = new byte[] { WHITE, BLUE, BLACK, RED, GREEN };
public static final byte[] MANATYPES = new byte[] { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS };
public static final byte ALL_MANA_COLORS = WHITE | BLUE | BLACK | RED | GREEN;
public static final byte ALL_MANA_TYPES = ALL_MANA_COLORS | COLORLESS;
public static final int GENERIC = 1 << 6;
// Below here skip due to byte conversion shenanigans
@@ -62,6 +65,6 @@ public abstract class ManaAtom {
return i;
}
}
return -1; // colorless
return -1; // somehow the mana is not colored or colorless?
}
}