mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Merge branch 'oath-of-nissa-fix' into 'master'
Conversion matrices weren't setup properly. See merge request core-developers/forge!3298
This commit is contained in:
@@ -139,16 +139,22 @@ public final class MagicColor {
|
|||||||
public static final ImmutableList<String> SNOW_LANDS = ImmutableList.of("Snow-Covered Plains", "Snow-Covered Island", "Snow-Covered Swamp", "Snow-Covered Mountain", "Snow-Covered Forest");
|
public static final ImmutableList<String> SNOW_LANDS = ImmutableList.of("Snow-Covered Plains", "Snow-Covered Island", "Snow-Covered Swamp", "Snow-Covered Mountain", "Snow-Covered Forest");
|
||||||
public static final ImmutableMap<String, String> ANY_COLOR_CONVERSION = new ImmutableMap.Builder<String, String>()
|
public static final ImmutableMap<String, String> ANY_COLOR_CONVERSION = new ImmutableMap.Builder<String, String>()
|
||||||
.put("ManaColorConversion", "Additive")
|
.put("ManaColorConversion", "Additive")
|
||||||
.put("WhiteConversion", "All")
|
.put("WhiteConversion", "Color")
|
||||||
.put("BlueConversion", "All")
|
.put("BlueConversion", "Color")
|
||||||
.put("BlackConversion", "All")
|
.put("BlackConversion", "Color")
|
||||||
.put("RedConversion", "All")
|
.put("RedConversion", "Color")
|
||||||
.put("GreenConversion", "All")
|
.put("GreenConversion", "Color")
|
||||||
|
.put("ColorlessConversion", "Color")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
public static final ImmutableMap<String, String> ANY_TYPE_CONVERSION = new ImmutableMap.Builder<String, String>()
|
public static final ImmutableMap<String, String> ANY_TYPE_CONVERSION = new ImmutableMap.Builder<String, String>()
|
||||||
.putAll(ANY_COLOR_CONVERSION)
|
.put("ManaColorConversion", "Additive")
|
||||||
.put("ColorlessConversion", "All")
|
.put("WhiteConversion", "Type")
|
||||||
|
.put("BlueConversion", "Type")
|
||||||
|
.put("BlackConversion", "Type")
|
||||||
|
.put("RedConversion", "Type")
|
||||||
|
.put("GreenConversion", "Type")
|
||||||
|
.put("ColorlessConversion", "Type")
|
||||||
.build();
|
.build();
|
||||||
/**
|
/**
|
||||||
* Private constructor to prevent instantiation.
|
* Private constructor to prevent instantiation.
|
||||||
|
|||||||
@@ -1802,9 +1802,12 @@ public class AbilityUtils {
|
|||||||
if (params.containsKey(key)) {
|
if (params.containsKey(key)) {
|
||||||
String convertTo = params.get(key);
|
String convertTo = params.get(key);
|
||||||
byte convertByte = 0;
|
byte convertByte = 0;
|
||||||
if ("All".equals(convertTo)) {
|
if ("Type".equals(convertTo)) {
|
||||||
// IMPORTANT! We need to use Mana Color here not Card Color.
|
// IMPORTANT! We need to use Mana Color here not Card Color.
|
||||||
convertByte = ManaAtom.ALL_MANA_TYPES;
|
convertByte = ManaAtom.ALL_MANA_TYPES;
|
||||||
|
} else if ("Color".equals(convertTo)) {
|
||||||
|
// IMPORTANT! We need to use Mana Color here not Card Color.
|
||||||
|
convertByte = ManaAtom.ALL_MANA_COLORS;
|
||||||
} else {
|
} else {
|
||||||
for (final String convertColor : convertTo.split(",")) {
|
for (final String convertColor : convertTo.split(",")) {
|
||||||
convertByte |= ManaAtom.fromName(convertColor);
|
convertByte |= ManaAtom.fromName(convertColor);
|
||||||
|
|||||||
Reference in New Issue
Block a user