{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "optionalfeatures.json",
	"version": "1.12.12",
	"title": "Optional Features",
	"type": "object",
	"$defs": {
		"optionalfeatureData": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"prerequisite": {
					"$ref": "util.json#/$defs/prerequisite"
				},
				"entries": {
					"type": "array",
					"items": {
						"$ref": "entry.json"
					}
				},
				"previousVersion": {
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						}
					},
					"required": [
						"name",
						"source"
					],
					"additionalProperties": false
				},
				"source": {
					"$ref": "util.json#/$defs/source"
				},
				"page": {
					"$ref": "util.json#/$defs/page"
				},
				"featureType": {
					"type": "array",
					"items": {
						"$ref": "util.json#/$defs/dataOptionalfeatureType"
					},
					"uniqueItems": true
				},
				"otherSources": {
					"$ref": "util.json#/$defs/otherSources"
				},
				"referenceSources": {
					"$ref": "util.json#/$defs/referenceSources"
				},
				"legacy": {
					"$ref": "util.json#/$defs/legacy"
				},
				"reprintedAs": {
					"$ref": "util.json#/$defs/reprintedAs"
				},
				"isClassFeatureVariant": {
					"type": "boolean"
				},
				"additionalSpells": {
					"$ref": "util-additionalspells.json#/$defs/additionalSpellsArray"
				},
				"languageProficiencies": {
					"$ref": "util.json#/$defs/languageProficiencies"
				},
				"skillProficiencies": {
					"$ref": "util.json#/$defs/skillProficiencies"
				},
				"weaponProficiencies": {
					"$ref": "util.json#/$defs/weaponProficiencies"
				},
				"itemMasteries": {
					"$ref": "util.json#/$defs/itemMasteries"
				},
				"itemMasteriesProgression": {
					"$ref": "util.json#/$defs/itemMasteriesProgression"
				},
				"armorProficiencies": {
					"$ref": "util.json#/$defs/armorProficiencies"
				},
				"toolProficiencies": {
					"$ref": "util.json#/$defs/toolProficiencies"
				},
				"skillToolLanguageProficiencies": {
					"$ref": "util.json#/$defs/skillToolLanguageProficiencies"
				},
				"consumes": {
					"$ref": "util.json#/$defs/consumesObject"
				},
				"senses": {
					"$ref": "util.json#/$defs/sensesArray"
				},
				"optionalfeatureProgression": {
					"$ref": "util.json#/$defs/optionalfeatureProgression"
				},
				"featProgression": {
					"$ref": "util.json#/$defs/featProgression"
				},
				"expertise": {
					"$ref": "util.json#/$defs/expertise"
				},
				"resist": {
					"$ref": "util.json#/$defs/damageResistArrayPlayer"
				},
				"immune": {
					"$ref": "util.json#/$defs/damageImmunityArrayPlayer"
				},
				"vulnerable": {
					"$ref": "util.json#/$defs/damageVulnerabilityArrayPlayer"
				},
				"conditionImmune": {
					"$ref": "util.json#/$defs/conditionImmunityArrayPlayer"
				},
				"hasFluff": {
					"const": true
				},
				"hasFluffImages": {
					"const": true
				},
				"fluff": {
					"$ref": "util.json#/$defs/fluffObject"
				},
				"foundrySystem": {
					"$ref": "util-foundry.json#/$defs/foundrySystemObject"
				},
				"foundryActivities": {
					"$ref": "util-foundry.json#/$defs/foundryActivitiesArray"
				},
				"foundryFlags": {
					"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
				},
				"foundryEffects": {
					"$ref": "util-foundry.json#/$defs/foundryEffectsArray"
				},
				"foundryImg": {
					"$ref": "util-foundry.json#/$defs/foundryImg"
				},
				"foundryAdvice": {
					"$ref": "entry.json"
				},
				"_foundryMerge": {
					"$ref": "util-foundry.json#/$defs/foundryMergeObject"
				}
			},
			"additionalProperties": false
		},
		"optionalfeature": {
			"anyOf": [
				{
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"prerequisite": {
							"$ref": "util.json#/$defs/prerequisite"
						},
						"entries": {
							"type": "array",
							"items": {
								"$ref": "entry.json"
							}
						},
						"previousVersion": {
							"type": "object",
							"properties": {
								"name": {
									"type": "string"
								},
								"source": {
									"$ref": "util.json#/$defs/source"
								}
							},
							"required": [
								"name",
								"source"
							],
							"additionalProperties": false
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"page": {
							"$ref": "util.json#/$defs/page"
						},
						"featureType": {
							"type": "array",
							"items": {
								"$ref": "util.json#/$defs/dataOptionalfeatureType"
							},
							"uniqueItems": true
						},
						"otherSources": {
							"$ref": "util.json#/$defs/otherSources"
						},
						"referenceSources": {
							"$ref": "util.json#/$defs/referenceSources"
						},
						"legacy": {
							"$ref": "util.json#/$defs/legacy"
						},
						"reprintedAs": {
							"$ref": "util.json#/$defs/reprintedAs"
						},
						"isClassFeatureVariant": {
							"type": "boolean"
						},
						"additionalSpells": {
							"$ref": "util-additionalspells.json#/$defs/additionalSpellsArray"
						},
						"languageProficiencies": {
							"$ref": "util.json#/$defs/languageProficiencies"
						},
						"skillProficiencies": {
							"$ref": "util.json#/$defs/skillProficiencies"
						},
						"weaponProficiencies": {
							"$ref": "util.json#/$defs/weaponProficiencies"
						},
						"itemMasteries": {
							"$ref": "util.json#/$defs/itemMasteries"
						},
						"itemMasteriesProgression": {
							"$ref": "util.json#/$defs/itemMasteriesProgression"
						},
						"armorProficiencies": {
							"$ref": "util.json#/$defs/armorProficiencies"
						},
						"toolProficiencies": {
							"$ref": "util.json#/$defs/toolProficiencies"
						},
						"skillToolLanguageProficiencies": {
							"$ref": "util.json#/$defs/skillToolLanguageProficiencies"
						},
						"consumes": {
							"$ref": "util.json#/$defs/consumesObject"
						},
						"senses": {
							"$ref": "util.json#/$defs/sensesArray"
						},
						"optionalfeatureProgression": {
							"$ref": "util.json#/$defs/optionalfeatureProgression"
						},
						"featProgression": {
							"$ref": "util.json#/$defs/featProgression"
						},
						"expertise": {
							"$ref": "util.json#/$defs/expertise"
						},
						"resist": {
							"$ref": "util.json#/$defs/damageResistArrayPlayer"
						},
						"immune": {
							"$ref": "util.json#/$defs/damageImmunityArrayPlayer"
						},
						"vulnerable": {
							"$ref": "util.json#/$defs/damageVulnerabilityArrayPlayer"
						},
						"conditionImmune": {
							"$ref": "util.json#/$defs/conditionImmunityArrayPlayer"
						},
						"hasFluff": {
							"const": true
						},
						"hasFluffImages": {
							"const": true
						},
						"fluff": {
							"$ref": "util.json#/$defs/fluffObject"
						},
						"foundrySystem": {
							"$ref": "util-foundry.json#/$defs/foundrySystemObject"
						},
						"foundryActivities": {
							"$ref": "util-foundry.json#/$defs/foundryActivitiesArray"
						},
						"foundryFlags": {
							"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
						},
						"foundryEffects": {
							"$ref": "util-foundry.json#/$defs/foundryEffectsArray"
						},
						"foundryImg": {
							"$ref": "util-foundry.json#/$defs/foundryImg"
						},
						"foundryAdvice": {
							"$ref": "entry.json"
						},
						"_foundryMerge": {
							"$ref": "util-foundry.json#/$defs/foundryMergeObject"
						}
					},
					"additionalProperties": false,
					"required": [
						"name",
						"entries",
						"source",
						"featureType"
					]
				},
				{
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"prerequisite": {
							"$ref": "util.json#/$defs/prerequisite"
						},
						"entries": {
							"type": "array",
							"items": {
								"$ref": "entry.json"
							}
						},
						"previousVersion": {
							"type": "object",
							"properties": {
								"name": {
									"type": "string"
								},
								"source": {
									"$ref": "util.json#/$defs/source"
								}
							},
							"required": [
								"name",
								"source"
							],
							"additionalProperties": false
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"page": {
							"$ref": "util.json#/$defs/page"
						},
						"featureType": {
							"type": "array",
							"items": {
								"$ref": "util.json#/$defs/dataOptionalfeatureType"
							},
							"uniqueItems": true
						},
						"otherSources": {
							"$ref": "util.json#/$defs/otherSources"
						},
						"referenceSources": {
							"$ref": "util.json#/$defs/referenceSources"
						},
						"legacy": {
							"$ref": "util.json#/$defs/legacy"
						},
						"reprintedAs": {
							"$ref": "util.json#/$defs/reprintedAs"
						},
						"isClassFeatureVariant": {
							"type": "boolean"
						},
						"additionalSpells": {
							"$ref": "util-additionalspells.json#/$defs/additionalSpellsArray"
						},
						"languageProficiencies": {
							"$ref": "util.json#/$defs/languageProficiencies"
						},
						"skillProficiencies": {
							"$ref": "util.json#/$defs/skillProficiencies"
						},
						"weaponProficiencies": {
							"$ref": "util.json#/$defs/weaponProficiencies"
						},
						"itemMasteries": {
							"$ref": "util.json#/$defs/itemMasteries"
						},
						"itemMasteriesProgression": {
							"$ref": "util.json#/$defs/itemMasteriesProgression"
						},
						"armorProficiencies": {
							"$ref": "util.json#/$defs/armorProficiencies"
						},
						"toolProficiencies": {
							"$ref": "util.json#/$defs/toolProficiencies"
						},
						"skillToolLanguageProficiencies": {
							"$ref": "util.json#/$defs/skillToolLanguageProficiencies"
						},
						"consumes": {
							"$ref": "util.json#/$defs/consumesObject"
						},
						"senses": {
							"$ref": "util.json#/$defs/sensesArray"
						},
						"optionalfeatureProgression": {
							"$ref": "util.json#/$defs/optionalfeatureProgression"
						},
						"featProgression": {
							"$ref": "util.json#/$defs/featProgression"
						},
						"expertise": {
							"$ref": "util.json#/$defs/expertise"
						},
						"resist": {
							"$ref": "util.json#/$defs/damageResistArrayPlayer"
						},
						"immune": {
							"$ref": "util.json#/$defs/damageImmunityArrayPlayer"
						},
						"vulnerable": {
							"$ref": "util.json#/$defs/damageVulnerabilityArrayPlayer"
						},
						"conditionImmune": {
							"$ref": "util.json#/$defs/conditionImmunityArrayPlayer"
						},
						"hasFluff": {
							"const": true
						},
						"hasFluffImages": {
							"const": true
						},
						"fluff": {
							"$ref": "util.json#/$defs/fluffObject"
						},
						"foundrySystem": {
							"$ref": "util-foundry.json#/$defs/foundrySystemObject"
						},
						"foundryActivities": {
							"$ref": "util-foundry.json#/$defs/foundryActivitiesArray"
						},
						"foundryFlags": {
							"$ref": "util-foundry.json#/$defs/foundryFlagsObject"
						},
						"foundryEffects": {
							"$ref": "util-foundry.json#/$defs/foundryEffectsArray"
						},
						"foundryImg": {
							"$ref": "util-foundry.json#/$defs/foundryImg"
						},
						"foundryAdvice": {
							"$ref": "entry.json"
						},
						"_foundryMerge": {
							"$ref": "util-foundry.json#/$defs/foundryMergeObject"
						},
						"_copy": {
							"$ref": "util-copy.json#/$defs/copyBlock_copy_generic"
						}
					},
					"additionalProperties": false,
					"required": [
						"_copy"
					]
				}
			]
		}
	},
	"properties": {
		"_meta": {
			"$ref": "util.json#/$defs/metaBlock"
		},
		"optionalfeature": {
			"type": "array",
			"uniqueItems": true,
			"minItems": 1,
			"items": {
				"$ref": "#/$defs/optionalfeature"
			}
		}
	},
	"required": [
		"optionalfeature"
	],
	"additionalProperties": false
}