mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Update the fix to SFilterUtil to make the colorless card filter work correctly.
This commit is contained in:
@@ -157,9 +157,6 @@ public class SFilterUtil {
|
|||||||
if (buttonMap.get(StatTypes.GREEN).isSelected()) {
|
if (buttonMap.get(StatTypes.GREEN).isSelected()) {
|
||||||
colors0 |= MagicColor.GREEN;
|
colors0 |= MagicColor.GREEN;
|
||||||
}
|
}
|
||||||
if (buttonMap.get(StatTypes.COLORLESS).isSelected()) {
|
|
||||||
colors0 |= MagicColor.COLORLESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
final byte colors = colors0;
|
final byte colors = colors0;
|
||||||
final boolean wantColorless = buttonMap.get(StatTypes.COLORLESS).isSelected();
|
final boolean wantColorless = buttonMap.get(StatTypes.COLORLESS).isSelected();
|
||||||
@@ -195,7 +192,7 @@ public class SFilterUtil {
|
|||||||
if (useColorIdentity && !allColorsFilteredOut) {
|
if (useColorIdentity && !allColorsFilteredOut) {
|
||||||
result = result && (color.hasAnyColor(colors) || (wantColorless && color.isColorless()));
|
result = result && (color.hasAnyColor(colors) || (wantColorless && color.isColorless()));
|
||||||
} else {
|
} else {
|
||||||
result = result && rules.canCastWithAvailable(colors);
|
result = result && (color.isColorless() || rules.canCastWithAvailable(colors));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user