ForgeScript.cardStateHasProperty add "NotedType"

This commit is contained in:
Northmoc
2022-09-03 18:41:41 -04:00
parent 04e8100fe1
commit dc28a2225b

View File

@@ -116,6 +116,15 @@ public class ForgeScript {
return cardState.getTypeWithChanges().hasStringType(source.getChosenType2()); return cardState.getTypeWithChanges().hasStringType(source.getChosenType2());
} else if (property.equals("IsNotChosenType2")) { } else if (property.equals("IsNotChosenType2")) {
return !cardState.getTypeWithChanges().hasStringType(source.getChosenType2()); return !cardState.getTypeWithChanges().hasStringType(source.getChosenType2());
} else if (property.equals("NotedType")) {
boolean found = false;
for (String s : source.getNotedTypes()) {
if (cardState.getTypeWithChanges().hasStringType(s)) {
found = true;
break;
}
}
return found;
} else if (property.startsWith("HasSubtype")) { } else if (property.startsWith("HasSubtype")) {
final String subType = property.substring(11); final String subType = property.substring(11);
return cardState.getTypeWithChanges().hasSubtype(subType); return cardState.getTypeWithChanges().hasSubtype(subType);