diff --git a/forge-gui-mobile/src/forge/adventure/data/RewardData.java b/forge-gui-mobile/src/forge/adventure/data/RewardData.java index 7e13490f741..07419adb8a2 100644 --- a/forge-gui-mobile/src/forge/adventure/data/RewardData.java +++ b/forge-gui-mobile/src/forge/adventure/data/RewardData.java @@ -117,20 +117,6 @@ public class RewardData { type="randomCard"; int maxCount=Math.round(addMaxCount*Current.player().getDifficulty().rewardMaxFactor); int addedCount = (maxCount > 0 ? WorldSave.getCurrentSave().getWorld().getRandom().nextInt(maxCount) : 0); - if( colors != null && colors.length > 0 ) { //Filter special "colorID" case. - String C = Current.player().getColorIdentityLong(); - for(int i = 0; i < colors.length; i++){ - if(colors[i].equals("colorID")){ - if(C.equals("colorless")) { //Colorless nullifies all other possible colors. - //A quirk of the filter, but flavorful. - colorType = "Colorless"; - colors = null; - break; - } - else colors[i] = C; - } - } - } switch(type) { case "card": diff --git a/forge-gui-mobile/src/forge/adventure/util/CardUtil.java b/forge-gui-mobile/src/forge/adventure/util/CardUtil.java index 432e2af860d..50dc8999baf 100644 --- a/forge-gui-mobile/src/forge/adventure/util/CardUtil.java +++ b/forge-gui-mobile/src/forge/adventure/util/CardUtil.java @@ -65,7 +65,7 @@ public class CardUtil { if(this.colors!= MagicColor.ALL_COLORS) { - if(!card.getRules().getColor().hasNoColorsExcept(this.colors)||card.getRules().getColor().isColorless()) + if(!card.getRules().getColor().hasNoColorsExcept(this.colors)||(this.colors != MagicColor.COLORLESS && card.getRules().getColor().isColorless())) return !this.shouldBeEqual; } if(colorType!=ColorType.Any) @@ -182,7 +182,11 @@ public class CardUtil { this.colors=0; for(String color:type.colors) { - colors|=MagicColor.fromName(color.toLowerCase()); + if("colorID".equals(color)) + for (byte c : Current.player().getColorIdentity()) + colors |= c; + else + colors |= MagicColor.fromName(color.toLowerCase()); } } if(type.keyWords!=null&&type.keyWords.length!=0)