ForgeScript.cardStateHasProperty "AssociatedWithChosenColor"

This commit is contained in:
Northmoc
2022-08-17 15:27:07 -04:00
parent 2155fa0f2e
commit 09208ba1be

View File

@@ -80,6 +80,22 @@ public class ForgeScript {
return source.hasChosenColor() return source.hasChosenColor()
&& colors.hasAnyColor(ColorSet.fromNames(source.getChosenColors()).getColor()); && colors.hasAnyColor(ColorSet.fromNames(source.getChosenColors()).getColor());
} else if (property.equals("AssociatedWithChosenColor")) {
final String color = source.getChosenColor();
switch (color) {
case "white":
return cardState.getTypeWithChanges().getLandTypes().contains("Plains");
case "blue":
return cardState.getTypeWithChanges().getLandTypes().contains("Island");
case "black":
return cardState.getTypeWithChanges().getLandTypes().contains("Swamp");
case "red":
return cardState.getTypeWithChanges().getLandTypes().contains("Mountain");
case "green":
return cardState.getTypeWithChanges().getLandTypes().contains("Forest");
default:
return false;
}
} else if (property.startsWith("non")) { } else if (property.startsWith("non")) {
// ... Other Card types // ... Other Card types
return !cardState.getTypeWithChanges().hasStringType(property.substring(3)); return !cardState.getTypeWithChanges().hasStringType(property.substring(3));