mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
basic lands now do have color identity, so deck format check no longer needs an exception for them
This commit is contained in:
@@ -98,20 +98,6 @@ public final class Constant {
|
||||
/** The Basic lands. */
|
||||
public static final List<String> BASIC_LANDS = Collections.unmodifiableList(Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest"));
|
||||
|
||||
public static final Map<String, String> COLOR_TO_BASIC_LAND_TYPE_MAP;
|
||||
|
||||
static
|
||||
{
|
||||
Map<String, String> colToType = new HashMap<String, String>();
|
||||
colToType.put(Color.WHITE, "Plains");
|
||||
colToType.put(Color.BLUE, "Island");
|
||||
colToType.put(Color.BLACK, "Swamp");
|
||||
colToType.put(Color.RED, "Mountain");
|
||||
colToType.put(Color.GREEN, "Forest");
|
||||
|
||||
COLOR_TO_BASIC_LAND_TYPE_MAP = Collections.unmodifiableMap(colToType);
|
||||
}
|
||||
|
||||
public static final Map<String, String> BASIC_LAND_TYPE_TO_COLOR_MAP;
|
||||
|
||||
static
|
||||
|
||||
@@ -158,40 +158,14 @@ public enum DeckFormat {
|
||||
{
|
||||
erroneousCI.add(cp.getKey());
|
||||
}
|
||||
if(cp.getKey().getRules().getType().isLand())
|
||||
{
|
||||
for(String key : Constant.Color.COLOR_TO_BASIC_LAND_TYPE_MAP.keySet())
|
||||
{
|
||||
if(!cmdCI.hasAnyColor(MagicColor.fromName(key)))
|
||||
{
|
||||
if(cp.getKey().getRules().getType().subTypeContains(Constant.Color.COLOR_TO_BASIC_LAND_TYPE_MAP.get(key)))
|
||||
{
|
||||
erroneousCI.add(cp.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(deck.get(DeckSection.Sideboard) != null)
|
||||
if(deck.has(DeckSection.Sideboard))
|
||||
{
|
||||
for(Entry<CardPrinted, Integer> cp : deck.get(DeckSection.Sideboard)) {
|
||||
if(!cp.getKey().getRules().getColorIdentity().hasNoColorsExcept(cmdCI.getColor()))
|
||||
{
|
||||
erroneousCI.add(cp.getKey());
|
||||
}
|
||||
if(cp.getKey().getRules().getType().isLand())
|
||||
{
|
||||
for(String key : Constant.Color.COLOR_TO_BASIC_LAND_TYPE_MAP.keySet())
|
||||
{
|
||||
if(!cmdCI.hasAnyColor(MagicColor.fromName(key)))
|
||||
{
|
||||
if(cp.getKey().getRules().getType().subTypeContains(Constant.Color.COLOR_TO_BASIC_LAND_TYPE_MAP.get(key)))
|
||||
{
|
||||
erroneousCI.add(cp.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user