feat!: adjust naming for compiles languages that dont create namespaces per file
This includes a Proof of Concept in form of a Swift Package. Only one file had to be replaced, because I couldnt make sense of how else to do it. But it compiles.
This commit is contained in:
+10
@@ -1,2 +1,12 @@
|
||||
node_modules
|
||||
lib
|
||||
|
||||
# Swift
|
||||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
.swiftpm/configuration/registries.json
|
||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||
.netrc
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"originHash" : "8136f4350c7b746f8a6bfb9ad7b6473b656e39e2c5bf8fed118646234dbac7b0",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "discriminatedenum",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/elyukai/DiscriminatedEnum.git",
|
||||
"state" : {
|
||||
"branch" : "main",
|
||||
"revision" : "0043d48d48f9880cb18198e173c479f27040b901"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-syntax",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/swiftlang/swift-syntax.git",
|
||||
"state" : {
|
||||
"revision" : "0687f71944021d616d34d922343dcef086855920",
|
||||
"version" : "600.0.1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// swift-tools-version: 6.0
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
import CompilerPluginSupport
|
||||
|
||||
let package = Package(
|
||||
name: "OptolithDatabaseSchema",
|
||||
platforms: [
|
||||
.macOS(.v13), .iOS(.v16), .tvOS(.v16), .watchOS(.v9), .macCatalyst(.v16)
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, making them visible to other packages.
|
||||
.library(
|
||||
name: "OptolithDatabaseSchema",
|
||||
targets: ["OptolithDatabaseSchema"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/elyukai/DiscriminatedEnum.git", branch: "main"),
|
||||
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.0-latest"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package, defining a module or a test suite.
|
||||
// Targets can depend on other targets in this package and products from dependencies.
|
||||
.target(
|
||||
name: "OptolithDatabaseSchema",
|
||||
dependencies: ["DiscriminatedEnum", "OptolithDatabaseSchemaMacros"]),
|
||||
|
||||
.macro(
|
||||
name: "OptolithDatabaseSchemaMacros",
|
||||
dependencies: [
|
||||
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
|
||||
.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Entity.swift
|
||||
// OptolithDatabaseSchema
|
||||
//
|
||||
// Created by Lukas Obermann on 15.11.24.
|
||||
//
|
||||
|
||||
public protocol Entity: Decodable, Hashable, Sendable { }
|
||||
|
||||
public protocol LocalizableEntity: Entity {
|
||||
associatedtype Translation: EntitySubtype
|
||||
|
||||
var translations: LocaleMap<Translation> { get }
|
||||
}
|
||||
|
||||
public protocol EntitySubtype: Decodable, Hashable, Sendable { }
|
||||
|
||||
extension String: EntitySubtype { }
|
||||
extension Double: EntitySubtype { }
|
||||
extension Int: EntitySubtype { }
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// Advantage.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Advantage: LocalizableEntity {
|
||||
public let id: Id
|
||||
|
||||
public let levels: Levels?
|
||||
|
||||
public let selectOptions: SelectOptions?
|
||||
|
||||
public let skillApplications: SkillApplications?
|
||||
|
||||
public let skillUses: SkillUses?
|
||||
|
||||
public let maximum: Maximum?
|
||||
|
||||
public let prerequisites: AdvantageDisadvantagePrerequisites?
|
||||
|
||||
public let apValue: AdventurePointsValue
|
||||
|
||||
/// Does this advantage count towards the maximum of AP to be spent on
|
||||
/// advantages?
|
||||
public let hasMaximumSpentInfluence: Bool
|
||||
|
||||
/// Does this advantage exclusively applies to arcane spellworks and not
|
||||
/// to magical actions and magical applications?
|
||||
public let isExclusiveToArcaneSpellworks: Bool
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<AdvantageTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case levels = "levels"
|
||||
case selectOptions = "select_options"
|
||||
case skillApplications = "skill_applications"
|
||||
case skillUses = "skill_uses"
|
||||
case maximum = "maximum"
|
||||
case prerequisites = "prerequisites"
|
||||
case apValue = "ap_value"
|
||||
case hasMaximumSpentInfluence = "has_maximum_spent_influence"
|
||||
case isExclusiveToArcaneSpellworks = "is_exclusive_to_arcane_spellworks"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct AdvantageTranslation: EntitySubtype {
|
||||
public let name: Name
|
||||
|
||||
public let nameInLibrary: NameInLibrary?
|
||||
|
||||
/// A string that is used as a label for an input field.
|
||||
public let input: Input?
|
||||
|
||||
public let rules: Rules
|
||||
|
||||
/// The range.
|
||||
public let range: String?
|
||||
|
||||
public let apValue: AdventurePointsValueReplacement?
|
||||
|
||||
/// A string that gets appended to the default AP Value text with a preceding
|
||||
/// space. This always happens if present, even if the generated AP Value text
|
||||
/// is replaced.
|
||||
public let apValueAppend: AdventurePointsValueAppend?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case nameInLibrary = "name_in_library"
|
||||
case input = "input"
|
||||
case rules = "rules"
|
||||
case range = "range"
|
||||
case apValue = "ap_value"
|
||||
case apValueAppend = "ap_value_append"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// AnimalDisease.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct AnimalDisease: LocalizableEntity {
|
||||
/// The animal disease's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The animal disease's level.
|
||||
public let level: Int
|
||||
|
||||
/// Depending on the disease, apply Spirit or Toughness as a penalty to the
|
||||
/// disease roll. It may also happen that the lower of both is applied as a
|
||||
/// penalty.
|
||||
public let resistance: Resistance
|
||||
|
||||
/// What causes the disease? The GM rolls 1D20 to see if a character gets
|
||||
/// infected. If the infection check succeeds, the GM makes a disease check to
|
||||
/// determine the severity of the infection.
|
||||
public let cause: [Cause]
|
||||
|
||||
/// The animal types this disease applies to.
|
||||
///
|
||||
/// If no animal types are given, the animal disease applies to all animal
|
||||
/// types.
|
||||
public let animalTypes: [AnimalTypeReference]
|
||||
|
||||
/// If and at which chance the disease can be communicated to intelligent
|
||||
/// creatures.
|
||||
///
|
||||
/// If no causes are given, the disease is not communicable to intelligent
|
||||
/// creatures.
|
||||
public let communicabilityToIntelligentCreatures: [Cause]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DiseaseTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case level = "level"
|
||||
case resistance = "resistance"
|
||||
case cause = "cause"
|
||||
case animalTypes = "animal_types"
|
||||
case communicabilityToIntelligentCreatures = "communicability_to_intelligent_creatures"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// AnimalType.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct AnimalType: LocalizableEntity {
|
||||
/// The animal type's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<AnimalTypeTranslation>
|
||||
}
|
||||
|
||||
public struct AnimalTypeTranslation: EntitySubtype {
|
||||
/// The animal type name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// ArcaneBardTradition.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias ArcaneBardTradition = ArcaneTradition
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// ArcaneDancerTradition.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias ArcaneDancerTradition = ArcaneTradition
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Aspect.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Aspect: LocalizableEntity {
|
||||
/// The aspect's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<AspectTranslation>
|
||||
}
|
||||
|
||||
public struct AspectTranslation: EntitySubtype {
|
||||
/// The aspect name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The aspect's name appended to the simple name (not `name_in_library`)
|
||||
/// of the special ability *Master of (Aspect)*.
|
||||
public let masterOfAspectSuffix: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case masterOfAspectSuffix = "master_of_aspect_suffix"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Attribute.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Attribute: LocalizableEntity {
|
||||
/// The attribute's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<AttributeTranslation>
|
||||
}
|
||||
|
||||
public struct AttributeTranslation: EntitySubtype {
|
||||
/// The attribute's name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The abbreviation of the attribute's name.
|
||||
public let abbreviation: NonEmptyString
|
||||
|
||||
/// The description of the attribute.
|
||||
public let description: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// Blessing.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Blessing: LocalizableEntity {
|
||||
/// The blessing's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Measurable parameters of a blessing.
|
||||
public let parameters: BlessingPerformanceParameters
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
public let target: AffectedTargetCategories
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<BlessingTranslation>
|
||||
}
|
||||
|
||||
public struct BlessingTranslation: EntitySubtype {
|
||||
/// The name of the blessing.
|
||||
public let name: String
|
||||
|
||||
/// The effect description.
|
||||
public let effect: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let range: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let target: String
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
/// Measurable parameters of a blessing.
|
||||
public struct BlessingPerformanceParameters: EntitySubtype {
|
||||
public let range: BlessingRange
|
||||
|
||||
public let duration: BlessingDuration
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum BlessingRange: EntitySubtype {
|
||||
case `self`
|
||||
case touch
|
||||
case fixed(FixedRange)
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum BlessingDuration: EntitySubtype {
|
||||
case immediate
|
||||
case fixed(FixedBlessingDuration)
|
||||
case indefinite(IndefiniteBlessingDuration)
|
||||
}
|
||||
|
||||
public struct FixedBlessingDuration: EntitySubtype {
|
||||
/// The (unitless) duration.
|
||||
public let value: Int
|
||||
|
||||
/// The duration unit.
|
||||
public let unit: DurationUnit
|
||||
}
|
||||
|
||||
public struct IndefiniteBlessingDuration: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<IndefiniteBlessingDurationTranslation>
|
||||
}
|
||||
|
||||
public struct IndefiniteBlessingDurationTranslation: EntitySubtype {
|
||||
/// A description of the duration.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// Cantrip.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Cantrip: LocalizableEntity {
|
||||
/// The cantrip's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Measurable parameters of a cantrip.
|
||||
public let parameters: CantripPerformanceParameters
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
public let target: AffectedTargetCategories
|
||||
|
||||
/// The associated property.
|
||||
public let property: PropertyReference
|
||||
|
||||
/// A note specifying the dissemination of the cantrip in different traditions.
|
||||
/// Sometimes a cantrip is exclusively available to one or more specific
|
||||
/// traditions, but usually one the academies and traditions are listed the
|
||||
/// cantrip is most commonly teached in.
|
||||
public let note: CantripNote?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CantripTranslation>
|
||||
|
||||
public let enhancements: Enhancements?
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum CantripNote: EntitySubtype {
|
||||
case exclusive(ExclusiveCantripNote)
|
||||
case common(CommonCantripNotes)
|
||||
}
|
||||
|
||||
public struct ExclusiveCantripNote: EntitySubtype {
|
||||
/// The traditions the cantrip is exclusively available to.
|
||||
public let traditions: [MagicalTraditionReference]
|
||||
}
|
||||
|
||||
public struct CommonCantripNotes: EntitySubtype {
|
||||
/// The academies and traditions the cantrip is commonly teached in.
|
||||
public let list: [CommonCantripNote]
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum CommonCantripNote: EntitySubtype {
|
||||
case academy(CurriculumReference)
|
||||
case tradition(CommonCantripTraditionNote)
|
||||
}
|
||||
|
||||
public struct CommonCantripTraditionNote: EntitySubtype {
|
||||
/// The magical tradition's identifier.
|
||||
public let id: MagicalTraditionIdentifier
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CommonCantripTraditionNoteTranslation>?
|
||||
}
|
||||
|
||||
public struct CommonCantripTraditionNoteTranslation: EntitySubtype {
|
||||
/// A note, appended to the generated string in parenthesis.
|
||||
public let note: String
|
||||
}
|
||||
|
||||
public struct CantripTranslation: EntitySubtype {
|
||||
/// The name of the spell.
|
||||
public let name: String
|
||||
|
||||
/// The effect description.
|
||||
public let effect: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let range: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let target: String
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
/// Measurable parameters of a blessing.
|
||||
public struct CantripPerformanceParameters: EntitySubtype {
|
||||
public let range: CantripRange
|
||||
|
||||
public let duration: CantripDuration
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum CantripRange: EntitySubtype {
|
||||
case `self`
|
||||
case touch
|
||||
case fixed(FixedRange)
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum CantripDuration: EntitySubtype {
|
||||
case immediate
|
||||
case fixed(FixedCantripDuration)
|
||||
case duringLovemaking(CastingTimeDuringLovemaking)
|
||||
case indefinite(IndefiniteCantripDuration)
|
||||
}
|
||||
|
||||
public struct FixedCantripDuration: EntitySubtype {
|
||||
/// If `true`, the duration is a maximum duration.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The (unitless) duration.
|
||||
public let value: Int
|
||||
|
||||
/// The duration unit.
|
||||
public let unit: DurationUnit
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case value = "value"
|
||||
case unit = "unit"
|
||||
}
|
||||
}
|
||||
|
||||
public struct IndefiniteCantripDuration: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<IndefiniteCantripDurationTranslation>
|
||||
}
|
||||
|
||||
public struct IndefiniteCantripDurationTranslation: EntitySubtype {
|
||||
/// A description of the duration.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// Ceremony.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Ceremony: LocalizableEntity {
|
||||
/// The ceremony's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Lists the linked three attributes used to make a skill check.
|
||||
public let check: SkillCheck
|
||||
|
||||
/// In some cases, the target's Spirit or Toughness is applied as a penalty.
|
||||
public let checkPenalty: SkillCheckPenalty?
|
||||
|
||||
/// Measurable parameters of a ceremony.
|
||||
public let parameters: SlowPerformanceParameters
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
public let target: AffectedTargetCategories
|
||||
|
||||
/// The tradition(s) the ceremony is available for. Note that general aspects
|
||||
/// do not have an associated tradition and thus need to be defined in a
|
||||
/// special way.
|
||||
public let traditions: [SkillTradition]
|
||||
|
||||
/// States which column is used to improve the skill.
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
public let prerequisites: LiturgyPrerequisites?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CeremonyTranslation>
|
||||
|
||||
public let enhancements: Enhancements?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case check = "check"
|
||||
case checkPenalty = "check_penalty"
|
||||
case parameters = "parameters"
|
||||
case target = "target"
|
||||
case traditions = "traditions"
|
||||
case improvementCost = "improvement_cost"
|
||||
case prerequisites = "prerequisites"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
case enhancements = "enhancements"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CeremonyTranslation: EntitySubtype {
|
||||
/// The name of the ceremony.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// A compressed name of the ceremony for use in small areas (e.g. on
|
||||
/// character sheet). Should only be defined if the `name` does not fit on
|
||||
/// character sheet.
|
||||
public let nameCompressed: NonEmptyString?
|
||||
|
||||
/// The effect description may be either a plain text or a text that is
|
||||
/// divided by a list of effects for each quality level. It may also be a
|
||||
/// list for each two quality levels.
|
||||
public let effect: ActivatableSkillEffect
|
||||
|
||||
@available(*, deprecated)
|
||||
public let castingTime: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let cost: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let range: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let target: String
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case nameCompressed = "name_compressed"
|
||||
case effect = "effect"
|
||||
case castingTime = "casting_time"
|
||||
case cost = "cost"
|
||||
case range = "range"
|
||||
case duration = "duration"
|
||||
case target = "target"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// CombatTechnique_Close.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct CloseCombatTechnique: LocalizableEntity {
|
||||
/// The close combat technique's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Special rules for the combat technique that apply to all weapons in this
|
||||
/// category.
|
||||
public let special: CloseCombatTechniqueSpecialRules
|
||||
|
||||
/// The primary attribute(s).
|
||||
public let primaryAttribute: [AttributeReference]
|
||||
|
||||
/// The *Breaking Point Rating* of the respective combat technique.
|
||||
public let breakingPointRating: Int
|
||||
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CloseCombatTechniqueTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case special = "special"
|
||||
case primaryAttribute = "primary_attribute"
|
||||
case breakingPointRating = "breaking_point_rating"
|
||||
case improvementCost = "improvement_cost"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
/// Special rules for the combat technique that apply to all weapons in this
|
||||
/// category.
|
||||
public struct CloseCombatTechniqueSpecialRules: EntitySubtype {
|
||||
/// Is parrying possible with this combat technique?
|
||||
public let canParry: Bool
|
||||
|
||||
public let hasDamageThreshold: Bool
|
||||
|
||||
public let hasReach: Bool
|
||||
|
||||
public let hasLength: Bool
|
||||
|
||||
public let hasShieldSize: Bool
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case canParry = "can_parry"
|
||||
case hasDamageThreshold = "has_damage_threshold"
|
||||
case hasReach = "has_reach"
|
||||
case hasLength = "has_length"
|
||||
case hasShieldSize = "has_shield_size"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CloseCombatTechniqueTranslation: EntitySubtype {
|
||||
/// The name of the condition.
|
||||
public let name: String
|
||||
|
||||
/// Additional rules for the condition, if applicable.
|
||||
public let special: String?
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// CombatTechnique_Ranged.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct RangedCombatTechnique: LocalizableEntity {
|
||||
/// The ranged combat technique's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Special rules for the combat technique that apply to all weapons in this
|
||||
/// category.
|
||||
public let special: RangedCombatTechniqueSpecialRules
|
||||
|
||||
/// The primary attribute(s).
|
||||
public let primaryAttribute: [AttributeReference]
|
||||
|
||||
/// The *Breaking Point Rating* of the respective combat technique.
|
||||
public let breakingPointRating: Int
|
||||
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<RangedCombatTechniqueTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case special = "special"
|
||||
case primaryAttribute = "primary_attribute"
|
||||
case breakingPointRating = "breaking_point_rating"
|
||||
case improvementCost = "improvement_cost"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
/// Special rules for the combat technique that apply to all weapons in this
|
||||
/// category.
|
||||
public struct RangedCombatTechniqueSpecialRules: EntitySubtype {
|
||||
public let hasAmmunition: Bool
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case hasAmmunition = "has_ammunition"
|
||||
}
|
||||
}
|
||||
|
||||
public struct RangedCombatTechniqueTranslation: EntitySubtype {
|
||||
/// The name of the condition.
|
||||
public let name: String
|
||||
|
||||
/// Additional rules for the condition, if applicable.
|
||||
public let special: String?
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Condition.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Condition: LocalizableEntity {
|
||||
/// The condition's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ConditionTranslation>
|
||||
}
|
||||
|
||||
public struct ConditionTranslation: EntitySubtype {
|
||||
/// The condition's name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// Additional rules for the condition, if applicable.
|
||||
public let rules: NonEmptyMarkdown?
|
||||
|
||||
/// The effects for level 1 to 4.
|
||||
public let effects: [NonEmptyMarkdown]
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Continent.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// Continents are mostly referenced to in languages and scripts that occur on a
|
||||
/// specific continent.
|
||||
public struct Continent: LocalizableEntity {
|
||||
/// The continent's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ContinentTranslation>
|
||||
}
|
||||
|
||||
public struct ContinentTranslation: EntitySubtype {
|
||||
/// The continent name.
|
||||
public let name: String
|
||||
}
|
||||
@@ -0,0 +1,339 @@
|
||||
//
|
||||
// Culture.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Culture: LocalizableEntity {
|
||||
/// An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// A list of native languages (usually it is only one).
|
||||
public let language: [LanguageReference]
|
||||
|
||||
/// A list of native scripts (usually it is only one). If the culture does not
|
||||
/// use any script, leave this field empty.
|
||||
public let script: [ScriptReference]?
|
||||
|
||||
/// If the area knowledge has a fixed value or can be adjusted.
|
||||
public let areaKnowledge: AreaKnowledge
|
||||
|
||||
/// A list of possible social status in the respective culture.
|
||||
public let socialStatus: [SocialStatusReference]
|
||||
|
||||
/// A list of professions that are typical for the culture, as well as
|
||||
/// professions that are rarely practiced or encountered in the culture. The
|
||||
/// list is either defined by group (as multiple lists) or plain (as a single
|
||||
/// list).
|
||||
public let commonProfessions: CommonProfessions
|
||||
|
||||
/// A list of common advantages.
|
||||
public let commonAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// A list of common disadvantages.
|
||||
public let commonDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// A list of uncommon advantages.
|
||||
public let uncommonAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// A list of uncommon disadvantages.
|
||||
public let uncommonDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// A list of common skills.
|
||||
public let commonSkills: [CommonnessRatedSkill]
|
||||
|
||||
/// A list of uncommon skills.
|
||||
public let uncommonSkills: [CommonnessRatedSkill]?
|
||||
|
||||
/// The skill points you get for buying the culture package.
|
||||
public let culturalPackage: [CulturalPackageItem]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CultureTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case language = "language"
|
||||
case script = "script"
|
||||
case areaKnowledge = "area_knowledge"
|
||||
case socialStatus = "social_status"
|
||||
case commonProfessions = "common_professions"
|
||||
case commonAdvantages = "common_advantages"
|
||||
case commonDisadvantages = "common_disadvantages"
|
||||
case uncommonAdvantages = "uncommon_advantages"
|
||||
case uncommonDisadvantages = "uncommon_disadvantages"
|
||||
case commonSkills = "common_skills"
|
||||
case uncommonSkills = "uncommon_skills"
|
||||
case culturalPackage = "cultural_package"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
/// If the area knowledge has a fixed value or can be adjusted.
|
||||
public struct AreaKnowledge: EntitySubtype {
|
||||
/// `true` if the area knowledge has a fixed value, `false` if it can be
|
||||
/// adjusted.
|
||||
public let isFixed: Bool
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isFixed = "is_fixed"
|
||||
}
|
||||
}
|
||||
|
||||
/// The "weight" difference compared to other professions or profession variants.
|
||||
/// Some professions or profession variants are simply more common (Mostly), but
|
||||
/// sometimes only specific elements are used (Only).
|
||||
public enum CommonnessWeight: String, EntitySubtype {
|
||||
case mostly = "Mostly"
|
||||
case only = "Only"
|
||||
}
|
||||
|
||||
/// Some professions or profession variants are more common than others. There
|
||||
/// may be cultures where some professions or profession variants are not
|
||||
/// represented at all.
|
||||
public struct Weighted<ProfessionOrVariant: EntitySubtype>: EntitySubtype {
|
||||
/// The list of more common professions or profession variants.
|
||||
public let elements: [ProfessionOrVariant]
|
||||
|
||||
/// The "weight" difference compared to other professions or profession
|
||||
/// variants. Some professions or profession variants are simply more common
|
||||
/// (Mostly), but sometimes only specific elements are used (Only).
|
||||
public let weight: CommonnessWeight
|
||||
}
|
||||
|
||||
/// This defines how the list of constraints should be offset against the
|
||||
/// list of all mundane professions: Either only the professions are kept
|
||||
/// that intersect with the constraints (include) or only the professions
|
||||
/// are kept that are different from the constraints (exclude).
|
||||
public enum CommonProfessionConstraintsOperation: String, EntitySubtype {
|
||||
case intersection = "Intersection"
|
||||
case difference = "Difference"
|
||||
}
|
||||
|
||||
/// A list of professions. The filter specifies how the list is applied to
|
||||
/// all mundane professions.
|
||||
public struct CommonProfessionConstraints<Constraint: EntitySubtype>: EntitySubtype {
|
||||
/// The list of constraints.
|
||||
public let constraints: [Constraint]
|
||||
|
||||
/// This defines how the list of constraints should be offset against the
|
||||
/// list of all mundane professions: Either only the professions are kept
|
||||
/// that intersect with the constraints (include) or only the professions
|
||||
/// are kept that are different from the constraints (exclude).
|
||||
public let operation: CommonProfessionConstraintsOperation
|
||||
}
|
||||
|
||||
/// Some professions may be found in a culture, but are not that common.
|
||||
public enum Rarity: String, EntitySubtype {
|
||||
case rare = "Rare"
|
||||
case veryRare = "VeryRare"
|
||||
}
|
||||
|
||||
public struct ProfessionConstraint: EntitySubtype {
|
||||
/// The profession's identifier.
|
||||
public let id: ProfessionIdentifier
|
||||
|
||||
/// Some profession variants are more common than others. There may be
|
||||
/// cultures where some variants are not represented at all.
|
||||
public let weightedVariants: Weighted<ProfessionVariantReference>?
|
||||
|
||||
/// Some professions may be found in a culture, but are not that
|
||||
/// common.
|
||||
public let rarity: Rarity?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case weightedVariants = "weighted_variants"
|
||||
case rarity = "rarity"
|
||||
}
|
||||
}
|
||||
|
||||
/// Some professions may be found in a culture, but are not that common.
|
||||
public enum MundaneProfessionSubgroupConstraint: String, EntitySubtype {
|
||||
case profane = "Profane"
|
||||
case fighter = "Fighter"
|
||||
case religious = "Religious"
|
||||
}
|
||||
|
||||
public struct MagicalTraditionConstraint: EntitySubtype {
|
||||
/// The magical tradition's identifier.
|
||||
public let id: MagicalTraditionIdentifier
|
||||
|
||||
/// Some professions are more common than others. There may be cultures
|
||||
/// where some professions are not represented at all.
|
||||
public let weightedProfessions: Weighted<ProfessionReference>?
|
||||
|
||||
/// Some traditions may be found in a culture, but are not that common.
|
||||
public let rarity: Rarity?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case weightedProfessions = "weighted_professions"
|
||||
case rarity = "rarity"
|
||||
}
|
||||
}
|
||||
|
||||
public struct BlessedTraditionConstraint: EntitySubtype {
|
||||
/// The magical tradition's identifier.
|
||||
public let id: BlessedTraditionIdentifier
|
||||
|
||||
/// Some professions are more common than others. There may be cultures
|
||||
/// where some professions are not represented at all.
|
||||
public let weightedProfessions: Weighted<ProfessionReference>?
|
||||
|
||||
/// Some traditions may be found in a culture, but are not that common.
|
||||
public let rarity: Rarity?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case weightedProfessions = "weighted_professions"
|
||||
case rarity = "rarity"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum MundaneCommonProfessionConstraint: EntitySubtype {
|
||||
case profession(ProfessionConstraint)
|
||||
case professionSubgroup(MundaneProfessionSubgroupConstraint)
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum MagicCommonProfessionConstraint: EntitySubtype {
|
||||
case tradition(MagicalTraditionConstraint)
|
||||
case magicDilettante
|
||||
case profession(ProfessionConstraint)
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum BlessedCommonProfessionConstraint: EntitySubtype {
|
||||
case tradition(BlessedTraditionConstraint)
|
||||
}
|
||||
|
||||
public typealias PlainCommonProfessions = CommonProfessionConstraints<ProfessionReference>
|
||||
|
||||
/// Lists of professions by group.
|
||||
public struct GroupedCommonProfessions: EntitySubtype {
|
||||
public let mundane: CommonProfessionConstraints<MundaneCommonProfessionConstraint>?
|
||||
|
||||
public let magic: CommonProfessionConstraints<MagicCommonProfessionConstraint>?
|
||||
|
||||
public let blessed: CommonProfessionConstraints<BlessedCommonProfessionConstraint>?
|
||||
}
|
||||
|
||||
/// A list of professions that are typical for the culture, as well as
|
||||
/// professions that are rarely practiced or encountered in the culture. The
|
||||
/// list is either defined by group (as multiple lists) or plain (as a single
|
||||
/// list).
|
||||
@DiscriminatedEnum
|
||||
public enum CommonProfessions: EntitySubtype {
|
||||
case plain(PlainCommonProfessions)
|
||||
case grouped(GroupedCommonProfessions)
|
||||
}
|
||||
|
||||
public typealias CommonnessRatedSkill = SkillReference
|
||||
|
||||
public struct CulturalPackageItem: EntitySubtype {
|
||||
/// The skill's identifier.
|
||||
public let id: SkillIdentifier
|
||||
|
||||
/// The skill points for the respective skill you get for buying the cultural
|
||||
/// package.
|
||||
public let points: Int
|
||||
}
|
||||
|
||||
public struct CultureTranslation: EntitySubtype {
|
||||
/// The name of the state.
|
||||
public let name: String
|
||||
|
||||
/// The description of the area knowledge.
|
||||
public let areaKnowledge: AreaKnowledgeTranslation
|
||||
|
||||
/// The respective common advantages text from the source book.
|
||||
public let commonAdvantages: NonEmptyString?
|
||||
|
||||
/// The respective common disadvantages text from the source book.
|
||||
public let commonDisadvantages: NonEmptyString?
|
||||
|
||||
/// The respective uncommon advantages text from the source book.
|
||||
public let uncommonAdvantages: NonEmptyString?
|
||||
|
||||
/// The respective uncommon disadvantages text from the source book.
|
||||
public let uncommonDisadvantages: NonEmptyString?
|
||||
|
||||
/// Structured description of common names.
|
||||
public let commonNames: CommonNames
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case areaKnowledge = "area_knowledge"
|
||||
case commonAdvantages = "common_advantages"
|
||||
case commonDisadvantages = "common_disadvantages"
|
||||
case uncommonAdvantages = "uncommon_advantages"
|
||||
case uncommonDisadvantages = "uncommon_disadvantages"
|
||||
case commonNames = "common_names"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
|
||||
/// Description and examples of the area knowledge.
|
||||
public struct AreaKnowledgeTranslation: EntitySubtype {
|
||||
/// The full description without examples in parenthesis.
|
||||
public let description: String
|
||||
|
||||
/// A shorter version of the description, used in input fields and other UI
|
||||
/// elements where the space might be to small to use the full description.
|
||||
public let abbreviated: String
|
||||
|
||||
/// Examples of areas, if applicable.
|
||||
public let examples: [AreaKnowledgeExample]?
|
||||
}
|
||||
|
||||
public struct AreaKnowledgeExample: EntitySubtype {
|
||||
public let area: String
|
||||
}
|
||||
|
||||
/// Structured description of common names.
|
||||
public struct CommonNames: EntitySubtype {
|
||||
/// First names can be gender-neutral, but they can also be for a specific
|
||||
/// binary sex. They are sorted into groups.
|
||||
public let firstNameGroups: [CommonNameGroup]?
|
||||
|
||||
/// Last names can be gender-neutral, like family names, but they can also be
|
||||
/// for a specific binary sex. They are sorted into groups.
|
||||
public let lastNameGroups: [CommonNameGroup]?
|
||||
|
||||
/// Special naming rules.
|
||||
public let namingRules: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case firstNameGroups = "first_name_groups"
|
||||
case lastNameGroups = "last_name_groups"
|
||||
case namingRules = "naming_rules"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommonNameGroup: EntitySubtype {
|
||||
/// The group label.
|
||||
public let label: NonEmptyString
|
||||
|
||||
/// The binary sex if the group is only for a certain binary sex.
|
||||
public let sex: BinarySex?
|
||||
|
||||
/// The names from the group.
|
||||
public let names: [CommonName]
|
||||
}
|
||||
|
||||
public struct CommonName: EntitySubtype {
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// Additional information about the name, appended in parenthesis.
|
||||
public let note: NonEmptyString?
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// DerivedCharacteristic.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct DerivedCharacteristic: LocalizableEntity {
|
||||
/// An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let prerequisites: DerivedCharacteristicPrerequisites?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DerivedCharacteristicTranslation>
|
||||
}
|
||||
|
||||
public struct DerivedCharacteristicTranslation: EntitySubtype {
|
||||
/// The characteristic's name.
|
||||
public let name: String
|
||||
|
||||
/// The characteristic's abbreviation.
|
||||
public let abbreviation: String
|
||||
|
||||
/// Possible calculation strings for the final value.
|
||||
public let calculation: CalculationTranslation?
|
||||
}
|
||||
|
||||
/// Possible calculation strings for the final value.
|
||||
public struct CalculationTranslation: EntitySubtype {
|
||||
/// The default calculation string.
|
||||
public let `default`: String
|
||||
|
||||
/// The calculation string if only half of the primary attribute is used.
|
||||
public let halfPrimary: String?
|
||||
|
||||
/// The calculation string if no primary attribute is used.
|
||||
public let noPrimary: String?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case `default` = "default"
|
||||
case halfPrimary = "half_primary"
|
||||
case noPrimary = "no_primary"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// Disadvantage.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Disadvantage: LocalizableEntity {
|
||||
public let id: Id
|
||||
|
||||
public let levels: Levels?
|
||||
|
||||
public let selectOptions: SelectOptions?
|
||||
|
||||
public let maximum: Maximum?
|
||||
|
||||
public let prerequisites: AdvantageDisadvantagePrerequisites?
|
||||
|
||||
public let apValue: AdventurePointsValue
|
||||
|
||||
/// Does this disadvantage count towards the maximum of AP to be spent on
|
||||
/// disadvantages?
|
||||
public let hasMaximumSpentInfluence: Bool
|
||||
|
||||
/// Does this disadvantage exclusively applies to arcane spellworks and not
|
||||
/// to magical actions and magical applications?
|
||||
public let isExclusiveToArcaneSpellworks: Bool
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DisadvantageTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case levels = "levels"
|
||||
case selectOptions = "select_options"
|
||||
case maximum = "maximum"
|
||||
case prerequisites = "prerequisites"
|
||||
case apValue = "ap_value"
|
||||
case hasMaximumSpentInfluence = "has_maximum_spent_influence"
|
||||
case isExclusiveToArcaneSpellworks = "is_exclusive_to_arcane_spellworks"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct DisadvantageTranslation: EntitySubtype {
|
||||
public let name: Name
|
||||
|
||||
public let nameInLibrary: NameInLibrary?
|
||||
|
||||
/// A string that is used as a label for an input field.
|
||||
public let input: Input?
|
||||
|
||||
public let rules: Rules
|
||||
|
||||
/// The range.
|
||||
public let range: String?
|
||||
|
||||
/// A string that gets appended to the default AP Value text with a preceding
|
||||
/// space. This always happens if present, even if the generated AP Value text
|
||||
/// is replaced.
|
||||
public let apValueAppend: AdventurePointsValueAppend?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case nameInLibrary = "name_in_library"
|
||||
case input = "input"
|
||||
case rules = "rules"
|
||||
case range = "range"
|
||||
case apValueAppend = "ap_value_append"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Disease.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Disease: LocalizableEntity {
|
||||
/// The disease's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The disease's level.
|
||||
public let level: Int
|
||||
|
||||
/// Depending on the disease, apply Spirit or Toughness as a penalty to the
|
||||
/// disease roll. It may also happen that the lower of both is applied as a
|
||||
/// penalty.
|
||||
public let resistance: Resistance
|
||||
|
||||
/// What causes the disease? The GM rolls 1D20 to see if a character gets
|
||||
/// infected. If the infection check succeeds, the GM makes a disease check to
|
||||
/// determine the severity of the infection.
|
||||
public let cause: [Cause]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DiseaseTranslation>
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Element.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Element: LocalizableEntity {
|
||||
/// The element's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ElementTranslation>
|
||||
}
|
||||
|
||||
public struct ElementTranslation: EntitySubtype {
|
||||
/// The element's name.
|
||||
public let name: String
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ExperienceLevel.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// Adventure Points and maximum values at hero creation.
|
||||
public struct ExperienceLevel: LocalizableEntity {
|
||||
/// An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The AP value you get.
|
||||
public let adventurePoints: Int
|
||||
|
||||
/// The highest possible attribute value.
|
||||
public let maxAttributeValue: Int
|
||||
|
||||
/// The highest possible skill rating.
|
||||
public let maxSkillRating: Int
|
||||
|
||||
/// The highest possible combat technique rating.
|
||||
public let maxCombatTechniqueRating: Int
|
||||
|
||||
/// The limit for the sum of all attribute values.
|
||||
public let maxAttributeTotal: Int
|
||||
|
||||
/// The maximum of spells/chants you can activate.
|
||||
public let maxNumberOfSpellsLiturgicalChants: Int
|
||||
|
||||
/// The maximum of spells of an unfamiliar tradition you can activate.
|
||||
public let maxNumberOfUnfamiliarSpells: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ExperienceLevelTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case adventurePoints = "adventure_points"
|
||||
case maxAttributeValue = "max_attribute_value"
|
||||
case maxSkillRating = "max_skill_rating"
|
||||
case maxCombatTechniqueRating = "max_combat_technique_rating"
|
||||
case maxAttributeTotal = "max_attribute_total"
|
||||
case maxNumberOfSpellsLiturgicalChants = "max_number_of_spells_liturgical_chants"
|
||||
case maxNumberOfUnfamiliarSpells = "max_number_of_unfamiliar_spells"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ExperienceLevelTranslation: EntitySubtype {
|
||||
/// The name of the experience level.
|
||||
public let name: String
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// EyeColor.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct EyeColor: LocalizableEntity {
|
||||
/// The eye color's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<EyeColorTranslation>
|
||||
}
|
||||
|
||||
public struct EyeColorTranslation: EntitySubtype {
|
||||
/// The eye color.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
//
|
||||
// FamiliarsTrick.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct FamiliarsTrick: LocalizableEntity {
|
||||
/// The familiar's trick's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The animal types this trick is available to. Either it is available to all
|
||||
/// or only a list of specific animal types.
|
||||
///
|
||||
/// If no animal types are given, the animal disease applies to all animal
|
||||
/// types.
|
||||
public let animalTypes: [AnimalTypeReference]
|
||||
|
||||
/// Measurable parameters of a familiar's trick.
|
||||
public let parameters: FamiliarsTrickPerformanceParameters
|
||||
|
||||
/// The property of the trick.
|
||||
public let property: FamiliarsTrickProperty
|
||||
|
||||
/// The AP value the familiar has to pay for. It may also be that a specific is
|
||||
/// known by all familiar by default. In the latter case the field is not set.
|
||||
public let apValue: Int?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<FamiliarsTrickTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case animalTypes = "animal_types"
|
||||
case parameters = "parameters"
|
||||
case property = "property"
|
||||
case apValue = "ap_value"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum FamiliarsTrickProperty: EntitySubtype {
|
||||
case fixed(PropertyReference)
|
||||
case indefinite(IndefiniteFamiliarsTrickProperty)
|
||||
}
|
||||
|
||||
public struct IndefiniteFamiliarsTrickProperty: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<IndefiniteFamiliarsTrickPropertyTranslation>
|
||||
}
|
||||
|
||||
public struct IndefiniteFamiliarsTrickPropertyTranslation: EntitySubtype {
|
||||
/// A description of the property.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickTranslation: EntitySubtype {
|
||||
/// The name of the familiar's trick.
|
||||
public let name: String
|
||||
|
||||
/// The effect description.
|
||||
public let effect: String
|
||||
|
||||
@available(*, deprecated)
|
||||
public let cost: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: OldParameter
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
/// Measurable parameters of a familiar's trick.
|
||||
@DiscriminatedEnum
|
||||
public enum FamiliarsTrickPerformanceParameters: EntitySubtype {
|
||||
case oneTime(FamiliarsTrickOneTimePerformanceParameters)
|
||||
case oneTimeInterval(FamiliarsTrickOneTimeIntervalPerformanceParameters)
|
||||
case sustained(FamiliarsTrickSustainedPerformanceParameters)
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickOneTimePerformanceParameters: EntitySubtype {
|
||||
public let cost: FamiliarsTrickOneTimeCost
|
||||
|
||||
public let duration: FamiliarsTrickOneTimeDuration
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum FamiliarsTrickOneTimeCost: EntitySubtype {
|
||||
case fixed(FamiliarsTrickFixedOneTimeCost)
|
||||
case all(FamiliarsTrickAllOneTimeCost)
|
||||
case indefinite(FamiliarsTrickIndefiniteOneTimeCost)
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickFixedOneTimeCost: EntitySubtype {
|
||||
/// The AE cost value.
|
||||
public let aeValue: Int
|
||||
|
||||
/// The LP cost value.
|
||||
public let lpValue: Int?
|
||||
|
||||
/// The interval in which you have to pay the AE cost again.
|
||||
public let interval: DurationUnitValue?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag
|
||||
/// (BCP47).
|
||||
public let translations: LocaleMap<FamiliarsTrickFixedOneTimeCostTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case aeValue = "ae_value"
|
||||
case lpValue = "lp_value"
|
||||
case interval = "interval"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickFixedOneTimeCostTranslation: EntitySubtype {
|
||||
/// The cost have to be per a specific countable entity, e.g. `8 KP
|
||||
/// per person`.
|
||||
public let per: ResponsiveTextOptional?
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickAllOneTimeCost: EntitySubtype {
|
||||
/// The minimum AE the familiar has to have.
|
||||
public let minimum: Int?
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickIndefiniteOneTimeCost: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag
|
||||
/// (BCP47).
|
||||
public let translations: LocaleMap<FamiliarsTrickIndefiniteOneTimeCostTranslation>
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickIndefiniteOneTimeCostTranslation: EntitySubtype {
|
||||
/// A description of the AE cost.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum FamiliarsTrickOneTimeDuration: EntitySubtype {
|
||||
case immediate
|
||||
case fixed(FamiliarsTrickFixedOneTimeDuration)
|
||||
case indefinite(FamiliarsTrickIndefiniteOneTimeDuration)
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickFixedOneTimeDuration: EntitySubtype {
|
||||
/// If the duration is the maximum duration, so it may end earlier.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The (unitless) duration.
|
||||
public let value: Int
|
||||
|
||||
/// The duration unit.
|
||||
public let unit: DurationUnit
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<FamiliarsTrickFixedOneTimeDurationTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case value = "value"
|
||||
case unit = "unit"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickFixedOneTimeDurationTranslation: EntitySubtype {
|
||||
/// A replacement string.
|
||||
public let replacement: ResponsiveTextReplace?
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickIndefiniteOneTimeDuration: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag
|
||||
/// (BCP47).
|
||||
public let translations: LocaleMap<FamiliarsTrickIndefiniteOneTimeDurationTranslation>
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickIndefiniteOneTimeDurationTranslation: EntitySubtype {
|
||||
/// A description of the duration.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickOneTimeIntervalPerformanceParameters: EntitySubtype {
|
||||
public let cost: FamiliarsTrickOneTimeIntervalCost
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickOneTimeIntervalCost: EntitySubtype {
|
||||
/// The AE cost value.
|
||||
public let aeValue: Int
|
||||
|
||||
/// The LP cost value.
|
||||
public let lpValue: Int?
|
||||
|
||||
/// The duration granted/added by paying the given AE cost.
|
||||
public let interval: DurationUnitValue
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case aeValue = "ae_value"
|
||||
case lpValue = "lp_value"
|
||||
case interval = "interval"
|
||||
}
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickSustainedPerformanceParameters: EntitySubtype {
|
||||
public let cost: FamiliarsTrickSustainedCost
|
||||
}
|
||||
|
||||
public struct FamiliarsTrickSustainedCost: EntitySubtype {
|
||||
/// The AE cost value.
|
||||
public let aeValue: Int
|
||||
|
||||
/// The LP cost value.
|
||||
public let lpValue: Int?
|
||||
|
||||
/// The interval in which you have to pay the AE cost again, if any.
|
||||
public let interval: DurationUnitValue?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case aeValue = "ae_value"
|
||||
case lpValue = "lp_value"
|
||||
case interval = "interval"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// HairColor.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct HairColor: LocalizableEntity {
|
||||
/// The hair color's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<HairColorTranslation>
|
||||
}
|
||||
|
||||
public struct HairColorTranslation: EntitySubtype {
|
||||
/// The hair color.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Kirchenpraegung.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias Kirchenpraegung = Influence
|
||||
@@ -0,0 +1,194 @@
|
||||
//
|
||||
// Lessons_Curriculum.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// This is a curriculum of a specified academy, containing the guideline,
|
||||
/// elective and restricted spellworks as well as the lesson packages of that
|
||||
/// academy.
|
||||
public struct Curriculum: LocalizableEntity {
|
||||
/// The curriculum's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The institution's guideline.
|
||||
public let guideline: GuidelineReference
|
||||
|
||||
/// The academy's elective spellworks package.
|
||||
public let electiveSpellworks: ElectiveSpellworks?
|
||||
|
||||
/// The academy's restricted spellworks package.
|
||||
public let restrictedSpellworks: RestrictedSpellworks?
|
||||
|
||||
/// A list of available lesson packages.
|
||||
public let lessonPackages: LessonPackages
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CurriculumTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case guideline = "guideline"
|
||||
case electiveSpellworks = "elective_spellworks"
|
||||
case restrictedSpellworks = "restricted_spellworks"
|
||||
case lessonPackages = "lesson_packages"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CurriculumTranslation: EntitySubtype {
|
||||
/// The name of the academy.
|
||||
public let name: NonEmptyString
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
/// The academy's elective spellworks package.
|
||||
@DiscriminatedEnum
|
||||
public enum ElectiveSpellworks: EntitySubtype {
|
||||
case definedByGameMaster
|
||||
case specific(SpecificElectiveSpellworks)
|
||||
}
|
||||
|
||||
public struct SpecificElectiveSpellworks: EntitySubtype {
|
||||
public let list: [ElectiveSpellwork]
|
||||
}
|
||||
|
||||
public struct ElectiveSpellwork: EntitySubtype {
|
||||
public let id: SpellworkIdentifier
|
||||
|
||||
/// The elective spellwork may only take effect if a certain condition is met.
|
||||
/// The condition may be related to professions or profession variants, but it
|
||||
/// is designed so that it can work without a specific profession, as multiple
|
||||
/// may belong to an institute, but with referencing other entities instead.
|
||||
public let restriction: ElectiveSpellworkRestriction?
|
||||
}
|
||||
|
||||
/// The elective spellwork may only take effect if a certain condition is met.
|
||||
/// The condition may be related to professions or profession variants, but it is
|
||||
/// designed so that it can work without a specific profession, as multiple may
|
||||
/// belong to an institute, but with referencing other entities instead.
|
||||
@DiscriminatedEnum
|
||||
public enum ElectiveSpellworkRestriction: EntitySubtype {
|
||||
case element(ElectiveSpellworkElementRestriction)
|
||||
}
|
||||
|
||||
public struct ElectiveSpellworkElementRestriction: EntitySubtype {
|
||||
public let id: ElementIdentifier
|
||||
}
|
||||
|
||||
/// The academy's restricted spellworks package.
|
||||
public typealias RestrictedSpellworks = [RestrictedSpellwork]
|
||||
|
||||
/// The academy's restricted spellworks package.
|
||||
@DiscriminatedEnum
|
||||
public enum RestrictedSpellwork: EntitySubtype {
|
||||
case property(RestrictedProperty)
|
||||
case spellwork(SpellworkIdentifier)
|
||||
case demonSummoning
|
||||
case borbaradian
|
||||
case damageIntelligent
|
||||
}
|
||||
|
||||
public struct RestrictedProperty: EntitySubtype {
|
||||
/// The identifier of the property that spellworks are disallowed from.
|
||||
public let id: PropertyIdentifier
|
||||
|
||||
/// Exclude specific spellworks from the restriction.
|
||||
public let exclude: [SpellworkIdentifier]?
|
||||
|
||||
/// Spellworks from this property up to a certain number are allowed.
|
||||
/// Spellworks excluded from this restriction definition using `exclude` do
|
||||
/// not contribute to the maximum.
|
||||
public let maximum: Double?
|
||||
}
|
||||
|
||||
/// A list of available lesson packages.
|
||||
public typealias LessonPackages = [LessonPackage]
|
||||
|
||||
public struct LessonPackage: EntitySubtype {
|
||||
/// The lesson package's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The spell values difference of the lesson package. This field reflects the
|
||||
/// changes (difference) to the field of the same name in the profession
|
||||
/// package. If a spell gets to SR 0 because of this, it will be removed
|
||||
/// completely.
|
||||
public let spellworkChanges: [SpellworkChange]?
|
||||
|
||||
public let skills: [AbilityAdjustment]?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<LessonPackageTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case spellworkChanges = "spellwork_changes"
|
||||
case skills = "skills"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SpellworkChange: EntitySubtype {
|
||||
public let base: SpellworkAdjustment
|
||||
|
||||
public let replacement: SpellworkAdjustment
|
||||
}
|
||||
|
||||
public struct LessonPackageTranslation: EntitySubtype {
|
||||
/// The name of the lesson package.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The spell values difference of the lesson package. Use this field to
|
||||
/// specify a text that is displayed instead of the generated
|
||||
/// `spellwork_changes` list. The field is displayed even if no list is
|
||||
/// present.
|
||||
public let spellworkChanges: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case spellworkChanges = "spellwork_changes"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum AbilityAdjustment: EntitySubtype {
|
||||
case combatTechnique(CombatTechniqueAdjustment)
|
||||
case skill(SkillAdjustment)
|
||||
case spellwork(SpellworkAdjustment)
|
||||
}
|
||||
|
||||
public struct CombatTechniqueAdjustment: EntitySubtype {
|
||||
public let id: CombatTechniqueIdentifier
|
||||
|
||||
/// The combat technique points that will be added to the current combat
|
||||
/// technique rating.
|
||||
public let points: Int
|
||||
}
|
||||
|
||||
public struct SkillAdjustment: EntitySubtype {
|
||||
/// The skill's identifier.
|
||||
public let id: SkillIdentifier
|
||||
|
||||
/// The skill points that will be added to the current skill rating.
|
||||
public let points: Int
|
||||
}
|
||||
|
||||
public struct SpellworkAdjustment: EntitySubtype {
|
||||
public let id: SpellworkIdentifier
|
||||
|
||||
/// The skill points that will be added to the current skill rating. If a
|
||||
/// spell gets to a skill rating of 0 because of this, it will be removed
|
||||
/// completely.
|
||||
public let points: Int
|
||||
|
||||
/// The target tradition. If the target spell is not from the Guild Mage
|
||||
/// tradition, specify the tradition identifier here.
|
||||
public let tradition: MagicalTraditionIdentifier?
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Lessons_Guideline.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Guideline: LocalizableEntity {
|
||||
/// The guideline's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Maximum number of spells that can be exchanged.
|
||||
public let spellworkChangesAllowed: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<GuidelineTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case spellworkChangesAllowed = "spellwork_changes_allowed"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct GuidelineTranslation: EntitySubtype {
|
||||
/// The guideline name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// LiturgicalChant.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct LiturgicalChant: LocalizableEntity {
|
||||
/// The liturgical chant's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Lists the linked three attributes used to make a skill check.
|
||||
public let check: SkillCheck
|
||||
|
||||
/// In some cases, the target's Spirit or Toughness is applied as a penalty.
|
||||
public let checkPenalty: SkillCheckPenalty?
|
||||
|
||||
/// Measurable parameters of a liturgical chant.
|
||||
public let parameters: FastPerformanceParameters
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
public let target: AffectedTargetCategories
|
||||
|
||||
/// The tradition(s) the liturgical chant is available for. Note that general
|
||||
/// aspects do not have an associated tradition and thus need to be defined in
|
||||
/// a special way.
|
||||
public let traditions: [SkillTradition]
|
||||
|
||||
/// States which column is used to improve the skill.
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
public let prerequisites: LiturgyPrerequisites?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<LiturgicalChantTranslation>
|
||||
|
||||
public let enhancements: Enhancements?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case check = "check"
|
||||
case checkPenalty = "check_penalty"
|
||||
case parameters = "parameters"
|
||||
case target = "target"
|
||||
case traditions = "traditions"
|
||||
case improvementCost = "improvement_cost"
|
||||
case prerequisites = "prerequisites"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
case enhancements = "enhancements"
|
||||
}
|
||||
}
|
||||
|
||||
public struct LiturgicalChantTranslation: EntitySubtype {
|
||||
/// The name of the liturgical chant.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// A compressed name of the liturgical chant for use in small areas (e.g.
|
||||
/// on character sheet). Should only be defined if the `name` does not fit
|
||||
/// on character sheet.
|
||||
public let nameCompressed: NonEmptyString?
|
||||
|
||||
/// The effect description may be either a plain text or a text that is
|
||||
/// divided by a list of effects for each quality level. It may also be a
|
||||
/// list for each two quality levels.
|
||||
public let effect: ActivatableSkillEffect
|
||||
|
||||
@available(*, deprecated)
|
||||
public let castingTime: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let cost: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let range: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let target: String
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case nameCompressed = "name_compressed"
|
||||
case effect = "effect"
|
||||
case castingTime = "casting_time"
|
||||
case cost = "cost"
|
||||
case range = "range"
|
||||
case duration = "duration"
|
||||
case target = "target"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Locale.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Locale: Entity {
|
||||
/// The locale's identifier. An IETF language tag (BCP47).
|
||||
public let id: String
|
||||
|
||||
/// Name of the language in it's language.
|
||||
public let name: String
|
||||
|
||||
/// Region in which the language is spoken in it's language.
|
||||
public let region: String
|
||||
|
||||
/// The language is not (fully) implemented and thus needs to be excluded from
|
||||
/// stable releases.
|
||||
public let isMissingImplementation: Bool?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case name = "name"
|
||||
case region = "region"
|
||||
case isMissingImplementation = "is_missing_implementation"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// MetaCondition.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// Meta Conditions are rule elements that work like conditions in the sense that
|
||||
/// they have four levels with different effects, but which are not explicitly
|
||||
/// listed as conditions.
|
||||
public struct MetaCondition: LocalizableEntity {
|
||||
/// The meta condition's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<MetaConditionTranslation>
|
||||
}
|
||||
|
||||
public struct MetaConditionTranslation: EntitySubtype {
|
||||
/// The meta condition's name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// Additional rules for the meta condition, if applicable.
|
||||
public let rules: NonEmptyMarkdown?
|
||||
|
||||
/// The effects for level 1 to 4.
|
||||
public let effects: [NonEmptyMarkdown]
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// PactCategory.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct PactCategory: LocalizableEntity {
|
||||
/// The pact category's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Types of creatures in this category.
|
||||
public let types: [PactType]
|
||||
|
||||
/// Domains in this category.
|
||||
public let domains: [PactDomain]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PactCategoryTranslation>
|
||||
}
|
||||
|
||||
public struct PactCategoryTranslation: EntitySubtype {
|
||||
/// The name of the pact category.
|
||||
public let name: NonEmptyString
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
public struct PactType: EntitySubtype {
|
||||
/// The type's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PactTypeTranslation>
|
||||
}
|
||||
|
||||
public struct PactTypeTranslation: EntitySubtype {
|
||||
/// The name of the type.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
|
||||
public struct PactDomain: EntitySubtype {
|
||||
/// The domain's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PactDomainTranslation>
|
||||
}
|
||||
|
||||
public struct PactDomainTranslation: EntitySubtype {
|
||||
/// The name of the domain.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
//
|
||||
// Patron.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Patron: LocalizableEntity {
|
||||
/// The patron's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The patron's category.
|
||||
public let category: PatronCategoryReference
|
||||
|
||||
/// The patron-specific skills.
|
||||
public let skills: [SkillReference]
|
||||
|
||||
/// The patron is only available to a certain set of cultures. It may be
|
||||
/// available to all, it may be available to only specific ones (intersection)
|
||||
/// and it may be available to all except specific ones to the listed cultures
|
||||
/// (difference).
|
||||
public let culture: PatronCulture
|
||||
|
||||
/// The list of cultures where patrons from this category can be the primary
|
||||
/// patron of.
|
||||
public let primaryPatronCultures: [CultureReference]?
|
||||
|
||||
/// The patron-specific powers. Used by animist power Animal Powers I–III and
|
||||
/// should only be present on animal patrons.
|
||||
public let powers: AnimalPowers?
|
||||
|
||||
/// The patron-specific AE cost. Used by several animist forces for animal
|
||||
/// patrons.
|
||||
public let aeCost: Int?
|
||||
|
||||
/// The patron-specific improvement cost. Used by several animist forces for
|
||||
/// animal patrons.
|
||||
public let improvementCost: ImprovementCost?
|
||||
|
||||
/// The patron may grant common advantages that are taken into account during
|
||||
/// character creation.
|
||||
///
|
||||
/// *Source:* Geisterwald & Knochenklippen, p. 6-7
|
||||
public let commonAdvantages: [AdvantageReference]?
|
||||
|
||||
/// The patron may grant common disadvantages that are taken into account
|
||||
/// during character creation.
|
||||
///
|
||||
/// *Source:* Geisterwald & Knochenklippen, p. 6-7
|
||||
public let commonDisadvantages: [DisadvantageReference]?
|
||||
|
||||
/// The animist may learn spellworks common for this patron.
|
||||
///
|
||||
/// *Source:* Geisterwald & Knochenklippen, p. 6-7
|
||||
public let commonSpellworks: [SpellworkReference]?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PatronTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case category = "category"
|
||||
case skills = "skills"
|
||||
case culture = "culture"
|
||||
case primaryPatronCultures = "primary_patron_cultures"
|
||||
case powers = "powers"
|
||||
case aeCost = "ae_cost"
|
||||
case improvementCost = "improvement_cost"
|
||||
case commonAdvantages = "common_advantages"
|
||||
case commonDisadvantages = "common_disadvantages"
|
||||
case commonSpellworks = "common_spellworks"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct PatronTranslation: EntitySubtype {
|
||||
/// The name of the patron.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
|
||||
/// The patron cultures the patron is or is not part of. If the patron is part of
|
||||
/// all patron cultures, the set should be empty and the operation should be
|
||||
/// difference.
|
||||
public struct PatronCulture: EntitySubtype {
|
||||
public let set: [CultureReference]
|
||||
|
||||
public let operation: PatronCultureOperation
|
||||
}
|
||||
|
||||
/// The set operation to combine the set of all patron cultures with the
|
||||
/// specified set of patron cultures: If they should intersect, the patron is
|
||||
/// only part of the given cultures. If they should differ, the patron is only
|
||||
/// part of the cultures that are not given.
|
||||
public enum PatronCultureOperation: String, EntitySubtype {
|
||||
case intersection = "Intersection"
|
||||
case difference = "Difference"
|
||||
}
|
||||
|
||||
public struct AnimalPowers: EntitySubtype {
|
||||
public let level1: AnimalPowersLevel1
|
||||
|
||||
public let level2: AnimalPowersLevel2
|
||||
|
||||
public let level3: AnimalPowersLevel3
|
||||
}
|
||||
|
||||
public struct AdvantageAnimalPower: EntitySubtype {
|
||||
/// The advantage's identifier.
|
||||
public let id: AdvantageIdentifier
|
||||
|
||||
/// It grants a higher level of the advantage.
|
||||
public let level: Int?
|
||||
|
||||
/// It grants a specific general option of the advantage.
|
||||
public let option: Int?
|
||||
}
|
||||
|
||||
public struct SkillAnimalPower: EntitySubtype {
|
||||
/// The skill's identifier.
|
||||
public let id: SkillIdentifier
|
||||
|
||||
/// The points that gets added to the skill's rating.
|
||||
public let points: Int
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum AnimalPowerLevel1: EntitySubtype {
|
||||
case advantage(AdvantageAnimalPower)
|
||||
case skill(SkillAnimalPower)
|
||||
}
|
||||
|
||||
public typealias AnimalPowersLevel1 = [AnimalPowerLevel1]
|
||||
|
||||
public struct CombatAnimalPower: EntitySubtype {
|
||||
/// The combat value.
|
||||
public let id: CombatAnimalPowerType
|
||||
|
||||
/// The value that gets added to the combat value.
|
||||
public let value: Int
|
||||
}
|
||||
|
||||
public enum CombatAnimalPowerType: String, EntitySubtype {
|
||||
case attack = "Attack"
|
||||
case parry = "Parry"
|
||||
case rangedCombat = "RangedCombat"
|
||||
case dodge = "Dodge"
|
||||
case damagePoints = "DamagePoints"
|
||||
case protection = "Protection"
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum AnimalPowerLevel2: EntitySubtype {
|
||||
case combat(CombatAnimalPower)
|
||||
}
|
||||
|
||||
public typealias AnimalPowersLevel2 = [AnimalPowerLevel2]
|
||||
|
||||
public struct AttributeAnimalPower: EntitySubtype {
|
||||
/// The attribute's identifier.
|
||||
public let id: AttributeIdentifier
|
||||
|
||||
/// The value that gets added to the attribute.
|
||||
public let value: Int
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum AnimalPowerLevel3: EntitySubtype {
|
||||
case attribute(AttributeAnimalPower)
|
||||
}
|
||||
|
||||
public typealias AnimalPowersLevel3 = [AnimalPowerLevel3]
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// PatronCategory.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct PatronCategory: LocalizableEntity {
|
||||
/// The patron category's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The list of cultures where patrons from this category can be the primary
|
||||
/// patron of.
|
||||
public let primaryPatronCultures: [CultureReference]
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PatronCategoryTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case primaryPatronCultures = "primary_patron_cultures"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct PatronCategoryTranslation: EntitySubtype {
|
||||
/// The name of the patron category.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// PersonalityTrait.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// A personality trait describes character aspects of a person from a certain
|
||||
/// region. Higher trait levels only cover a part of the region covered by
|
||||
/// lower-level traits.
|
||||
public struct PersonalityTrait: LocalizableEntity {
|
||||
/// The personality trait's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The personality trait's level.
|
||||
public let level: Int
|
||||
|
||||
public let prerequisites: PersonalityTraitPrerequisites?
|
||||
|
||||
/// The lower-level personality trait(s) this trait can be combined with.
|
||||
public let combinationOptions: [PersonalityTraitReference]?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PersonalityTraitTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case level = "level"
|
||||
case prerequisites = "prerequisites"
|
||||
case combinationOptions = "combination_options"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct PersonalityTraitTranslation: EntitySubtype {
|
||||
/// The name of the personality trait.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The effects of the personality trait. They should be sorted like they
|
||||
/// are in the book.
|
||||
public let effects: [PersonalityTraitEffect]
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
public struct PersonalityTraitEffect: EntitySubtype {
|
||||
/// A label that is displayed and placed before the actual text.
|
||||
public let label: NonEmptyString?
|
||||
|
||||
/// The effect text.
|
||||
public let text: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,609 @@
|
||||
//
|
||||
// Profession.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Profession: Entity {
|
||||
/// The profession's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The profession group.
|
||||
public let group: ProfessionGroup
|
||||
|
||||
/// A list of professions representing the same profession but with (slightly)
|
||||
/// different stats. For example, there may be a profession in a regional
|
||||
/// sourcebook or in the core rules and a profession in an extension rulebook
|
||||
/// like Magic of Aventuria, where the profession is basically called the same
|
||||
/// and almost has the same values, but the version from Magic of Aventuria
|
||||
/// features a spell style special ability that does not exist in the core
|
||||
/// rules or regional sourcebook.
|
||||
///
|
||||
/// The profession representation may feature different values for different
|
||||
/// explicitly mentioned experience levels. In most cases, there is only one
|
||||
/// stats package, which targets the experience level *Experienced*.
|
||||
public let versions: [ProfessionVersion]
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum ProfessionGroup: EntitySubtype {
|
||||
case mundane(MundaneProfessionGroup)
|
||||
case magical(MagicalProfessionGroup)
|
||||
case blessed
|
||||
}
|
||||
|
||||
public enum MundaneProfessionGroup: String, EntitySubtype {
|
||||
case profane = "Profane"
|
||||
case fighter = "Fighter"
|
||||
case religious = "Religious"
|
||||
}
|
||||
|
||||
public struct MagicalProfessionGroup: EntitySubtype {
|
||||
/// The curriculum/academy associated with this magical profession, if any.
|
||||
public let curriculum: CurriculumReference?
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum ProfessionVersion: EntitySubtype {
|
||||
case experienced(ExperiencedProfessionPackage)
|
||||
case byExperienceLevel(ProfessionPackagesForDifferentExperienceLevels)
|
||||
}
|
||||
|
||||
public struct ExperiencedProfessionPackage: EntitySubtype {
|
||||
/// The profession representation variant's identifier. An unique, increasing
|
||||
/// integer.
|
||||
public let id: Int
|
||||
|
||||
public let package: ProfessionPackage
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ProfessionTranslation>
|
||||
}
|
||||
|
||||
public struct ProfessionPackagesForDifferentExperienceLevels: EntitySubtype {
|
||||
/// The profession representation variant's identifier. An unique, increasing
|
||||
/// integer.
|
||||
public let id: Int
|
||||
|
||||
public let packagesMap: [ExperienceLevelDynamicProfessionPackage]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ProfessionTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case packagesMap = "packages_map"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ExperienceLevelDynamicProfessionPackage: EntitySubtype {
|
||||
/// The experience level this profession targets. The experience level
|
||||
/// must be unique for this representation.
|
||||
public let experienceLevelId: Int
|
||||
|
||||
public let package: ProfessionPackage
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case experienceLevelId = "experience_level_id"
|
||||
case package = "package"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ProfessionPackage: EntitySubtype {
|
||||
/// What does the professional package cost in adventure points?
|
||||
public let apValue: Int
|
||||
|
||||
/// Which prerequisites must be met to buy the stat block? For example, a
|
||||
/// character might need the advantage Spellcaster or Blessed. Note: the AP
|
||||
/// cost for a profession package does not include these prerequisites.
|
||||
public let prerequisites: ProfessionPrerequisites?
|
||||
|
||||
/// In some areas, the profession package grants a loose set of stats where the
|
||||
/// player must choose between different options for the profession package.
|
||||
public let options: ProfessionPackageOptions?
|
||||
|
||||
/// Any special abilities the profession receives from the package.
|
||||
public let specialAbilities: [ProfessionSpecialAbility]?
|
||||
|
||||
/// Provides ratings for the combat techniques that the hero receives from the
|
||||
/// package.
|
||||
public let combatTechniques: [CombatTechniqueRating]?
|
||||
|
||||
/// The skill ratings the package grants to the hero.
|
||||
public let skills: [SkillRating]?
|
||||
|
||||
/// The skill ratings a magical profession receives for spells; these spells
|
||||
/// are considered activated. Spells from an unfamiliar Tradition, if any, are
|
||||
/// identified as such.
|
||||
public let spells: [SpellRating]?
|
||||
|
||||
/// Clerical professions receive these liturgical chants at the listed skill
|
||||
/// ratings. These liturgical chants are considered activated.
|
||||
public let liturgicalChants: [LiturgicalChantRating]?
|
||||
|
||||
/// Typical advantages for the profession.
|
||||
public let suggestedAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// Typical disadvantages for the profession.
|
||||
public let suggestedDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// These advantages do not fit well with this profession; to be checked with
|
||||
/// the GM before taking any of them.
|
||||
public let unsuitableAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// These disadvantages do not fit well with this profession; to be checked
|
||||
/// with the GM before taking any of them.
|
||||
public let unsuitableDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// Provides examples of variants for the profession, which may include changes
|
||||
/// to AP values and additional or modified skill ratings, special abilities,
|
||||
/// or combat techniques, as compared to the basic profession. Usually picking
|
||||
/// a variant is optional, but there are some rare exceptions where picking a
|
||||
/// variant is required.
|
||||
public let variants: ProfessionVariants?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case apValue = "ap_value"
|
||||
case prerequisites = "prerequisites"
|
||||
case options = "options"
|
||||
case specialAbilities = "special_abilities"
|
||||
case combatTechniques = "combat_techniques"
|
||||
case skills = "skills"
|
||||
case spells = "spells"
|
||||
case liturgicalChants = "liturgical_chants"
|
||||
case suggestedAdvantages = "suggested_advantages"
|
||||
case suggestedDisadvantages = "suggested_disadvantages"
|
||||
case unsuitableAdvantages = "unsuitable_advantages"
|
||||
case unsuitableDisadvantages = "unsuitable_disadvantages"
|
||||
case variants = "variants"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ProfessionTranslation: EntitySubtype {
|
||||
/// Name of the basic profession.
|
||||
public let name: ProfessionName
|
||||
|
||||
/// A name addition of the profession. This will contain texts like name of
|
||||
/// the academy or the witch circle. It is enclosed in parenthesis, but the
|
||||
/// database entry must not contain parenthesis.
|
||||
public let specification: ProfessionName?
|
||||
|
||||
/// Typical advantages for the profession.
|
||||
public let suggestedAdvantages: NonEmptyString?
|
||||
|
||||
/// Typical disadvantages for the profession.
|
||||
public let suggestedDisadvantages: NonEmptyString?
|
||||
|
||||
/// These advantages do not fit well with this profession; to be checked with
|
||||
/// the GM before taking any of them.
|
||||
public let unsuitableAdvantages: NonEmptyString?
|
||||
|
||||
/// These disadvantages do not fit well with this profession; to be checked
|
||||
/// with the GM before taking any of them.
|
||||
public let unsuitableDisadvantages: NonEmptyString?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case specification = "specification"
|
||||
case suggestedAdvantages = "suggested_advantages"
|
||||
case suggestedDisadvantages = "suggested_disadvantages"
|
||||
case unsuitableAdvantages = "unsuitable_advantages"
|
||||
case unsuitableDisadvantages = "unsuitable_disadvantages"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
|
||||
/// Provides examples of variants for the profession, which may include changes
|
||||
/// to AP values and additional or modified skill ratings, special abilities, or
|
||||
/// combat techniques, as compared to the basic profession. Usually picking a
|
||||
/// variant is optional, but there are some rare exceptions where picking a
|
||||
/// variant is required.
|
||||
public struct ProfessionVariants: EntitySubtype {
|
||||
/// If the selection of a profession variant is required.
|
||||
public let isSelectionRequired: Bool
|
||||
|
||||
/// The list of profession variants.
|
||||
public let list: [ProfessionVariant]
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isSelectionRequired = "is_selection_required"
|
||||
case list = "list"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ProfessionVariant: EntitySubtype {
|
||||
/// The profession variant's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The AP value you have to pay for the package variant.
|
||||
public let apValue: Int
|
||||
|
||||
/// Which prerequisites must be met to buy the stat block? For example, a
|
||||
/// character might need the advantage Spellcaster or Blessed. Note: the AP
|
||||
/// cost for a profession package does not include these prerequisites.
|
||||
public let prerequisites: ProfessionPrerequisites?
|
||||
|
||||
public let options: ProfessionVariantPackageOptions?
|
||||
|
||||
/// Any special abilities the profession receives from the package variant.
|
||||
public let specialAbilities: [VariantSpecialAbility]?
|
||||
|
||||
/// Provides ratings for the combat techniques that the hero receives from the
|
||||
/// package variant.
|
||||
public let combatTechniques: [CombatTechniqueRating]?
|
||||
|
||||
/// The skill ratings the package variant grants to the hero.
|
||||
public let skills: [SkillRating]?
|
||||
|
||||
/// The skill ratings a magical profession variant receives for spells; these
|
||||
/// spells are considered activated. Spells from an unfamiliar Tradition, if
|
||||
/// any, are identified as such.
|
||||
public let spells: [SpellRating]?
|
||||
|
||||
/// Clerical professions receive these liturgical chants at the listed skill
|
||||
/// ratings. These liturgical chants are considered activated.
|
||||
public let liturgicalChants: [LiturgicalChantRating]?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ProfessionVariantTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case apValue = "ap_value"
|
||||
case prerequisites = "prerequisites"
|
||||
case options = "options"
|
||||
case specialAbilities = "special_abilities"
|
||||
case combatTechniques = "combat_techniques"
|
||||
case skills = "skills"
|
||||
case spells = "spells"
|
||||
case liturgicalChants = "liturgical_chants"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ProfessionVariantTranslation: EntitySubtype {
|
||||
/// Name of the profession variant.
|
||||
public let name: ProfessionName
|
||||
|
||||
/// A text that replaces the generated text for the profession variant.
|
||||
public let fullText: NonEmptyString?
|
||||
|
||||
/// A text that is appended to the generated text for the profession variant.
|
||||
///
|
||||
/// Has no effect when `full_text` is set.
|
||||
public let concludingText: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case fullText = "full_text"
|
||||
case concludingText = "concluding_text"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum ProfessionSpecialAbility: EntitySubtype {
|
||||
case fixed(FixedSpecialAbility)
|
||||
case selection(SpecialAbilitySelection)
|
||||
}
|
||||
|
||||
public typealias FixedSpecialAbility = SpecialAbilityDefinition
|
||||
|
||||
public struct SpecialAbilitySelection: EntitySubtype {
|
||||
public let options: [SpecialAbilityDefinition]
|
||||
}
|
||||
|
||||
public struct SpecialAbilityDefinition: EntitySubtype {
|
||||
/// The identifier of the combat technique to provide the rating for.
|
||||
public let id: SpecialAbilityIdentifier
|
||||
|
||||
/// The level of the received special ability.
|
||||
public let level: Int?
|
||||
|
||||
/// Received select options. Order is important. Typically, you only need the
|
||||
/// first array index, though.
|
||||
public let options: [RequirableSelectOptionIdentifier]?
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum VariantSpecialAbility: EntitySubtype {
|
||||
case fixed(FixedVariantSpecialAbility)
|
||||
case selection(VariantSpecialAbilitySelection)
|
||||
}
|
||||
|
||||
public struct FixedVariantSpecialAbility: EntitySubtype {
|
||||
/// The identifier of the combat technique to provide the rating for.
|
||||
public let id: SpecialAbilityIdentifier
|
||||
|
||||
/// if set to `false`, if the selection is granted by the basic package, it
|
||||
/// is removed.
|
||||
public let active: Bool?
|
||||
|
||||
/// The level of the received special ability.
|
||||
public let level: Int?
|
||||
|
||||
/// Received select options. Order is important. Typically, you only need the
|
||||
/// first array index, though.
|
||||
public let options: [RequirableSelectOptionIdentifier]?
|
||||
}
|
||||
|
||||
public struct VariantSpecialAbilitySelection: EntitySubtype {
|
||||
/// if set to `false`, if the selection is granted by the basic package, it
|
||||
/// is removed.
|
||||
public let active: Bool?
|
||||
|
||||
public let options: [SpecialAbilityDefinition]
|
||||
}
|
||||
|
||||
public struct CombatTechniqueRating: EntitySubtype {
|
||||
/// The identifier of the combat technique to provide the rating for.
|
||||
public let id: CombatTechniqueIdentifier
|
||||
|
||||
/// The rating bonus provided for the combat technique. If used in a profession
|
||||
/// variant, it can also be used to lower the bonus of the base profession.
|
||||
///
|
||||
/// **Note:** This is a rating *bonus*, so it will be *added* to the default
|
||||
/// value of 6.
|
||||
public let rating: Int
|
||||
}
|
||||
|
||||
public struct SkillRating: EntitySubtype {
|
||||
/// The identifier of the skill to provide the rating for.
|
||||
public let id: SkillIdentifier
|
||||
|
||||
/// The rating bonus provided for the skill. If used in a profession variant,
|
||||
/// it can also be used to lower the bonus of the base profession
|
||||
public let rating: Int
|
||||
}
|
||||
|
||||
public struct SpellRating: EntitySubtype {
|
||||
/// The identifier(s) of the spell(s) to choose from to provide the rating for.
|
||||
/// If multiple spells are provided, they must all have the same improvement
|
||||
/// cost.
|
||||
public let id: [ProfessionSpellIdentifier]
|
||||
|
||||
/// The rating bonus provided for the (selected) spell. If used in a profession
|
||||
/// variant, it can also be used to lower the bonus of the base profession.
|
||||
public let rating: Int
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum ProfessionSpellIdentifier: EntitySubtype {
|
||||
case spellwork(ProfessionSpellworkIdentifier)
|
||||
case magicalAction(ProfessionMagicalActionIdentifier)
|
||||
}
|
||||
|
||||
public struct ProfessionSpellworkIdentifier: EntitySubtype {
|
||||
/// The identifier of the spell to provide the rating for.
|
||||
public let id: SpellworkIdentifier
|
||||
|
||||
/// If the spell is not part of the magical tradition required by the
|
||||
/// package, this references the magical tradition it is part of. It can also
|
||||
/// be used to define the target magical tradition of a spell if multiple
|
||||
/// magical traditions are required and the spell is available to multiple
|
||||
/// of them.
|
||||
public let tradition: MagicalTraditionReference?
|
||||
}
|
||||
|
||||
public struct ProfessionMagicalActionIdentifier: EntitySubtype {
|
||||
/// The identifier of the magical action to provide the rating for.
|
||||
public let id: MagicalActionIdentifier
|
||||
}
|
||||
|
||||
public struct LiturgicalChantRating: EntitySubtype {
|
||||
/// The identifier(s) of the liturgical chant(s) to choose from to provide
|
||||
/// the rating for. If multiple liturgical chants are provided, they must all
|
||||
/// have the same improvement cost.
|
||||
public let id: [LiturgyIdentifier]
|
||||
|
||||
/// The rating bonus provided for the selected liturgical chant. If used in a
|
||||
/// profession variant, it can also be used to lower the bonus of the base
|
||||
/// profession.
|
||||
public let rating: Int
|
||||
}
|
||||
|
||||
/// In some areas, the profession package grants a loose set of stats where the
|
||||
/// player must choose between different options for the profession package.
|
||||
public struct ProfessionPackageOptions: EntitySubtype {
|
||||
public let skillSpecialization: SkillSpecializationOptions?
|
||||
|
||||
public let languagesScripts: LanguagesScriptsOptions?
|
||||
|
||||
public let combatTechniques: CombatTechniquesOptions?
|
||||
|
||||
public let cantrips: CantripsOptions?
|
||||
|
||||
public let curses: CursesOptions?
|
||||
|
||||
public let terrainKnowledge: TerrainKnowledgeOptions?
|
||||
|
||||
public let skills: SkillsOptions?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case skillSpecialization = "skill_specialization"
|
||||
case languagesScripts = "languages_scripts"
|
||||
case combatTechniques = "combat_techniques"
|
||||
case cantrips = "cantrips"
|
||||
case curses = "curses"
|
||||
case terrainKnowledge = "terrain_knowledge"
|
||||
case skills = "skills"
|
||||
}
|
||||
}
|
||||
|
||||
/// In some areas, the profession package grants a loose set of stats where the
|
||||
/// player must choose between different options for the profession package. The
|
||||
/// variant may override or remove those options.
|
||||
public struct ProfessionVariantPackageOptions: EntitySubtype {
|
||||
public let skillSpecialization: VariantOptionAction<SkillSpecializationOptions>?
|
||||
|
||||
public let languagesScripts: VariantOptionAction<LanguagesScriptsOptions>?
|
||||
|
||||
public let combatTechniques: VariantOptionAction<CombatTechniquesOptions>?
|
||||
|
||||
public let cantrips: VariantOptionAction<CantripsOptions>?
|
||||
|
||||
public let curses: VariantOptionAction<CursesOptions>?
|
||||
|
||||
public let terrainKnowledge: VariantOptionAction<TerrainKnowledgeOptions>?
|
||||
|
||||
public let skills: VariantOptionAction<SkillsOptions>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case skillSpecialization = "skill_specialization"
|
||||
case languagesScripts = "languages_scripts"
|
||||
case combatTechniques = "combat_techniques"
|
||||
case cantrips = "cantrips"
|
||||
case curses = "curses"
|
||||
case terrainKnowledge = "terrain_knowledge"
|
||||
case skills = "skills"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum VariantOptionAction<T: EntitySubtype>: EntitySubtype {
|
||||
case remove
|
||||
case override(T)
|
||||
}
|
||||
|
||||
/// Select an application from a skill or from one of a list of skills where you
|
||||
/// get a skill specialization for. You can also specify a skill groups from
|
||||
/// which you can choose a skill.
|
||||
@DiscriminatedEnum
|
||||
public enum SkillSpecializationOptions: EntitySubtype {
|
||||
case single(SingleSkillSpecializationOption)
|
||||
case group(SkillGroupSkillSpecializationOption)
|
||||
}
|
||||
|
||||
public struct SingleSkillSpecializationOption: EntitySubtype {
|
||||
/// Possible skills to get a skill specialization for.
|
||||
public let options: [SkillReference]
|
||||
}
|
||||
|
||||
public typealias SkillGroupSkillSpecializationOption = SkillGroupReference
|
||||
|
||||
/// Buy languages and scripts for a specific amount of AP.
|
||||
public struct LanguagesScriptsOptions: EntitySubtype {
|
||||
/// The AP value you can buy languages and scripts for.
|
||||
public let apValue: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
/// Select one or more combat techniques you get a CtR bonus for.
|
||||
public struct CombatTechniquesOptions: EntitySubtype {
|
||||
/// Specify the number of combat techniques that can be selected so that they
|
||||
/// get increased to a specific CtR. There can be multiple selections with
|
||||
/// different CtRs.
|
||||
public let fixed: [RatingForCombatTechniquesNumber]
|
||||
|
||||
/// Define if after the fixed selections the remaining unselected combat
|
||||
/// techniques will receive a certain rating bonus as well.
|
||||
public let restRating: Int?
|
||||
|
||||
/// The list of combat techniques to choose from.
|
||||
public let options: [CombatTechniqueReference]
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case fixed = "fixed"
|
||||
case restRating = "rest_rating"
|
||||
case options = "options"
|
||||
}
|
||||
}
|
||||
|
||||
public struct RatingForCombatTechniquesNumber: EntitySubtype {
|
||||
/// The number of selectable combat techniques.
|
||||
public let number: Int
|
||||
|
||||
/// The rating bonus provided for the selected combat technique(s).
|
||||
///
|
||||
/// **Note:** This is a rating *bonus*, so it will be *added* to the default
|
||||
/// value of 6.
|
||||
public let rating: Int
|
||||
}
|
||||
|
||||
/// Select one or more cantrips you receive.
|
||||
public struct CantripsOptions: EntitySubtype {
|
||||
/// The number of selectable cantrips.
|
||||
public let number: Int
|
||||
|
||||
/// The list of cantrips to choose from.
|
||||
public let options: [CantripReference]
|
||||
}
|
||||
|
||||
/// Buy curses for a specific amount of AP.
|
||||
public struct CursesOptions: EntitySubtype {
|
||||
/// The AP value you can buy curses for.
|
||||
public let apValue: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
/// Select one of a list of possible terrain knowledges
|
||||
public struct TerrainKnowledgeOptions: EntitySubtype {
|
||||
/// The list of possible terrain knowledges.
|
||||
public let options: [TerrainKnowledgeOptionReference]
|
||||
}
|
||||
|
||||
public struct TerrainKnowledgeOptionReference: EntitySubtype {
|
||||
/// The terrain knowledge option's identifier.
|
||||
public let id: Int
|
||||
}
|
||||
|
||||
/// Buy skills for a specific amount of AP.
|
||||
public struct SkillsOptions: EntitySubtype {
|
||||
/// If specified, you may only choose from skills of the specified group.
|
||||
public let group: SkillGroupReference?
|
||||
|
||||
/// The AP value you can buy skills for.
|
||||
public let apValue: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case group = "group"
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
/// The name of the profession that may have sex-specific names.
|
||||
public enum ProfessionName: EntitySubtype {
|
||||
case simpleProfessionName(SimpleProfessionName)
|
||||
case professionNameBySex(ProfessionNameBySex)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let simpleProfessionName = try? container.decode(SimpleProfessionName.self) {
|
||||
self = .simpleProfessionName(simpleProfessionName)
|
||||
} else if let professionNameBySex = try? container.decode(ProfessionNameBySex.self) {
|
||||
self = .professionNameBySex(professionNameBySex)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No ProfessionName type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public typealias SimpleProfessionName = NonEmptyString
|
||||
|
||||
public struct ProfessionNameBySex: EntitySubtype {
|
||||
/// The name from the source publication.
|
||||
public let `default`: NonEmptyString
|
||||
|
||||
/// The male name.
|
||||
public let male: NonEmptyString
|
||||
|
||||
/// The female name.
|
||||
public let female: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Property.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Property: LocalizableEntity {
|
||||
/// The property's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The property check's attributes. Only the properties from the Core Rules
|
||||
/// have defined property checks.
|
||||
public let check: SkillCheck?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PropertyTranslation>
|
||||
}
|
||||
|
||||
public struct PropertyTranslation: EntitySubtype {
|
||||
/// The property's name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
//
|
||||
// Race.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// A playable race with stats and skills.
|
||||
public struct Race: LocalizableEntity {
|
||||
/// The race's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// How many Adventure Points does the race cost during character creation?
|
||||
public let apValue: Int
|
||||
|
||||
/// The race’s base values.
|
||||
public let baseValues: BaseValues
|
||||
|
||||
/// Describes how to raise or lower maximum attribute values during character
|
||||
/// creation.
|
||||
public let attributeAdjustments: AttributeAdjustments
|
||||
|
||||
/// A list of automatically applied advantages. This does only work for
|
||||
/// advantages with no further configuration such as level or special
|
||||
/// selection.
|
||||
public let automaticAdvantages: [AdvantageReference]?
|
||||
|
||||
/// A list of strongly recommended advantages.
|
||||
public let stronglyRecommendedAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// A list of strongly recommended disadvantages.
|
||||
public let stronglyRecommendedDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// Configuration for random weight generation.
|
||||
public let weight: RandomWeightGeneration
|
||||
|
||||
/// Defines the starting ages for the race. It depends on the selected
|
||||
/// experience level.
|
||||
public let startingAge: [StartingAgeConfigForExperienceLevel]
|
||||
|
||||
/// A list of available race variants where one has to be selected. If no
|
||||
/// variants are to be selected, a single variant with no name has to be provided
|
||||
/// which will be used as the missing values for the base race.
|
||||
public let variants: RaceVariants
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<RaceTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case apValue = "ap_value"
|
||||
case baseValues = "base_values"
|
||||
case attributeAdjustments = "attribute_adjustments"
|
||||
case automaticAdvantages = "automatic_advantages"
|
||||
case stronglyRecommendedAdvantages = "strongly_recommended_advantages"
|
||||
case stronglyRecommendedDisadvantages = "strongly_recommended_disadvantages"
|
||||
case weight = "weight"
|
||||
case startingAge = "starting_age"
|
||||
case variants = "variants"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
/// The race’s base values.
|
||||
public struct BaseValues: EntitySubtype {
|
||||
/// The race’s life point base value.
|
||||
public let lifePoints: Int
|
||||
|
||||
/// The race’s Spirit base value.
|
||||
public let spirit: Int
|
||||
|
||||
/// The race’s Toughness base value.
|
||||
public let toughness: Int
|
||||
|
||||
/// The race’s tactical movement rate.
|
||||
public let movement: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case lifePoints = "life_points"
|
||||
case spirit = "spirit"
|
||||
case toughness = "toughness"
|
||||
case movement = "movement"
|
||||
}
|
||||
}
|
||||
|
||||
/// Describes how to raise or lower maximum attribute values during character
|
||||
/// creation.
|
||||
public struct AttributeAdjustments: EntitySubtype {
|
||||
/// The values by which the maximum of the respective attribute is modified.
|
||||
public let fixed: [FixedAttributeAdjustment]?
|
||||
|
||||
/// An array of attribute maximum modifiers, where the attribute they apply to
|
||||
/// is selected from a list of options.
|
||||
///
|
||||
/// The array only permits a single entry because no race specified more than
|
||||
/// one selectable attribute adjustment so far. But the schema allows for
|
||||
/// multiple entries to be future-proof.
|
||||
public let selectable: [SelectableAttributeAdjustment]?
|
||||
}
|
||||
|
||||
/// A value by which the maximum of the respective attribute is modified.
|
||||
public struct FixedAttributeAdjustment: EntitySubtype {
|
||||
/// The attribute the modifier applies to.
|
||||
public let id: AttributeIdentifier
|
||||
|
||||
/// The value by which the specified attribute's maximum is modified
|
||||
/// (negative values will lower the maximum).
|
||||
public let value: Int
|
||||
}
|
||||
|
||||
/// A value that will be added to the current maximum of the selected attribute
|
||||
/// that has been chosen from the listed attributes (negative values will lower
|
||||
/// the maximum).
|
||||
public struct SelectableAttributeAdjustment: EntitySubtype {
|
||||
/// A list of attributes the player has to choose from.
|
||||
public let list: [AttributeReference]
|
||||
|
||||
/// The value by which the selected attribute's maximum is modified
|
||||
/// (negative values will lower the maximum).
|
||||
public let value: Int
|
||||
}
|
||||
|
||||
/// Configuration for random weight generation.
|
||||
public struct RandomWeightGeneration: EntitySubtype {
|
||||
/// The base value used for random weight. The height subtrahend; in case of
|
||||
/// `Height - 110 + 2D6` it is `110`.
|
||||
public let base: Int
|
||||
|
||||
/// The dice used for random weight.
|
||||
public let random: [WeightDice]
|
||||
}
|
||||
|
||||
public struct WeightDice: EntitySubtype {
|
||||
/// Number of dice of the same type. Example: 2 in 2D6.
|
||||
public let number: Int
|
||||
|
||||
/// Number of sides on every die. Example: 6 in 2D6.
|
||||
public let sides: DieType
|
||||
|
||||
/// The strategy how to offset the randomly generated values against the
|
||||
/// base value. Either they are all added or subtracted or even results are
|
||||
/// added and odd results are subtracted.
|
||||
public let offsetStrategy: WeightDiceOffsetStrategy
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case number = "number"
|
||||
case sides = "sides"
|
||||
case offsetStrategy = "offset_strategy"
|
||||
}
|
||||
}
|
||||
|
||||
/// The strategy how to offset the randomly generated values against the
|
||||
/// base value. Either they are all added or subtracted or even results are
|
||||
/// added and odd results are subtracted.
|
||||
public enum WeightDiceOffsetStrategy: String, EntitySubtype {
|
||||
case add = "Add"
|
||||
case subtract = "Subtract"
|
||||
case addEvenSubtractOdd = "AddEvenSubtractOdd"
|
||||
}
|
||||
|
||||
public struct StartingAgeConfigForExperienceLevel: EntitySubtype {
|
||||
/// The selected experience level's identifier.
|
||||
public let id: ExperienceLevelIdentifier
|
||||
|
||||
/// The base value for the selected experience level.
|
||||
public let base: Int
|
||||
|
||||
/// The random value for the selected experience level. It is going to be
|
||||
/// added to the base value.
|
||||
public let random: Dice
|
||||
}
|
||||
|
||||
/// A list of available race variants where one has to be selected. If no
|
||||
/// variants are to be selected, a single variant with no name has to be provided
|
||||
/// which will be used as the missing values for the base race.
|
||||
public typealias RaceVariants = [RaceVariant]
|
||||
|
||||
public struct RaceVariant: EntitySubtype {
|
||||
/// An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The list of common cultures.
|
||||
public let commonCultures: [CultureReference]
|
||||
|
||||
/// A list of common advantages.
|
||||
public let commonAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// A list of common disadvantages.
|
||||
public let commonDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// A list of uncommon advantages.
|
||||
public let uncommonAdvantages: [CommonnessRatedAdvantageDisadvantage<AdvantageIdentifier>]?
|
||||
|
||||
/// A list of uncommon disadvantages.
|
||||
public let uncommonDisadvantages: [CommonnessRatedAdvantageDisadvantage<DisadvantageIdentifier>]?
|
||||
|
||||
/// An array containing 20 (numeric) hair color identifiers. The array also
|
||||
/// represents the 20-sided die for a random hair color.
|
||||
public let hairColor: [HairColorReference]
|
||||
|
||||
/// An array containing 20 (numeric) eye color identifiers. The array also
|
||||
/// represents the 20-sided die for a random eye color.
|
||||
public let eyeColor: [EyeColorReference]
|
||||
|
||||
/// Configuration for random height generation.
|
||||
public let height: Height
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<RaceVariantTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case commonCultures = "common_cultures"
|
||||
case commonAdvantages = "common_advantages"
|
||||
case commonDisadvantages = "common_disadvantages"
|
||||
case uncommonAdvantages = "uncommon_advantages"
|
||||
case uncommonDisadvantages = "uncommon_disadvantages"
|
||||
case hairColor = "hair_color"
|
||||
case eyeColor = "eye_color"
|
||||
case height = "height"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
/// Configuration for random height generation.
|
||||
public struct Height: EntitySubtype {
|
||||
/// The base value used for random height.
|
||||
public let base: Int
|
||||
|
||||
/// The dice used for random height.
|
||||
public let random: [Dice]
|
||||
}
|
||||
|
||||
public struct RaceVariantTranslation: EntitySubtype {
|
||||
/// The race variant's name. If left empty, it defaults to the base race name.
|
||||
/// This can be used if the race has no (visible) variants so that a single
|
||||
/// variant has to be provided.
|
||||
public let name: NonEmptyString?
|
||||
|
||||
/// The respective common advantages text from the source book.
|
||||
public let commonAdvantages: NonEmptyString?
|
||||
|
||||
/// The respective common disadvantages text from the source book.
|
||||
public let commonDisadvantages: NonEmptyString?
|
||||
|
||||
/// The respective uncommon advantages text from the source book.
|
||||
public let uncommonAdvantages: NonEmptyString?
|
||||
|
||||
/// The respective uncommon disadvantages text from the source book.
|
||||
public let uncommonDisadvantages: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case commonAdvantages = "common_advantages"
|
||||
case commonDisadvantages = "common_disadvantages"
|
||||
case uncommonAdvantages = "uncommon_advantages"
|
||||
case uncommonDisadvantages = "uncommon_disadvantages"
|
||||
}
|
||||
}
|
||||
|
||||
public struct RaceTranslation: EntitySubtype {
|
||||
/// The race's name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The respective attribute adjustments text from the source book.
|
||||
public let attributeAdjustments: NonEmptyString
|
||||
|
||||
/// The respective automatic advantages text from the source book.
|
||||
public let automaticAdvantages: NonEmptyString?
|
||||
|
||||
/// The respective strongly recommended advantages text from the source book.
|
||||
public let stronglyRecommendedAdvantages: NonEmptyString?
|
||||
|
||||
/// The respective strongly recommended disadvantages text from the source
|
||||
/// book.
|
||||
public let stronglyRecommendedDisadvantages: NonEmptyString?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case attributeAdjustments = "attribute_adjustments"
|
||||
case automaticAdvantages = "automatic_advantages"
|
||||
case stronglyRecommendedAdvantages = "strongly_recommended_advantages"
|
||||
case stronglyRecommendedDisadvantages = "strongly_recommended_disadvantages"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Region.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Region: LocalizableEntity {
|
||||
/// The region's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<RegionTranslation>
|
||||
}
|
||||
|
||||
public struct RegionTranslation: EntitySubtype {
|
||||
/// The region name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// Ritual.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Ritual: LocalizableEntity {
|
||||
/// The ritual's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Lists the linked three attributes used to make a skill check.
|
||||
public let check: SkillCheck
|
||||
|
||||
/// In some cases, the target's Spirit or Toughness is applied as a penalty.
|
||||
public let checkPenalty: SkillCheckPenalty?
|
||||
|
||||
/// Measurable parameters of a ritual.
|
||||
public let parameters: SlowPerformanceParameters
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
public let target: AffectedTargetCategories
|
||||
|
||||
/// The associated property.
|
||||
public let property: PropertyReference
|
||||
|
||||
/// The tradition(s) the ritual is available for. It may be *generally*
|
||||
/// available to all traditions or it may be only familiar in specific
|
||||
/// traditions.
|
||||
public let traditions: Traditions
|
||||
|
||||
/// States which column is used to improve the skill.
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
public let prerequisites: SpellworkPrerequisites?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<RitualTranslation>
|
||||
|
||||
public let enhancements: Enhancements?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case check = "check"
|
||||
case checkPenalty = "check_penalty"
|
||||
case parameters = "parameters"
|
||||
case target = "target"
|
||||
case property = "property"
|
||||
case traditions = "traditions"
|
||||
case improvementCost = "improvement_cost"
|
||||
case prerequisites = "prerequisites"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
case enhancements = "enhancements"
|
||||
}
|
||||
}
|
||||
|
||||
public struct RitualTranslation: EntitySubtype {
|
||||
/// The name of the ritual.
|
||||
public let name: String
|
||||
|
||||
/// The effect description may be either a plain text or a text that is
|
||||
/// divided by a list of effects for each quality level. It may also be a
|
||||
/// list for each two quality levels.
|
||||
public let effect: ActivatableSkillEffect
|
||||
|
||||
@available(*, deprecated)
|
||||
public let castingTime: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let cost: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let range: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let target: String
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case effect = "effect"
|
||||
case castingTime = "casting_time"
|
||||
case cost = "cost"
|
||||
case range = "range"
|
||||
case duration = "duration"
|
||||
case target = "target"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// Service.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Service: LocalizableEntity {
|
||||
/// The service's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Defines for which creature type(s) the service is available.
|
||||
public let availability: [ServiceAvailability]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ServiceTranslation>
|
||||
}
|
||||
|
||||
public enum ServiceAvailability: String, EntitySubtype {
|
||||
case summonedCreatures = "SummonedCreatures"
|
||||
case monstrosities = "Monstrosities"
|
||||
}
|
||||
|
||||
public struct ServiceTranslation: EntitySubtype {
|
||||
/// The name of the service.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The description of the service.
|
||||
public let description: NonEmptyMarkdown
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// SexPractice.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct SexPractice: LocalizableEntity {
|
||||
/// The sex practice's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SexPracticeTranslation>
|
||||
}
|
||||
|
||||
public struct SexPracticeTranslation: EntitySubtype {
|
||||
/// The sex practice's name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The rules of the sex practice.
|
||||
public let rules: NonEmptyString
|
||||
|
||||
/// How long a round of this sex practice takes.
|
||||
public let duration: NonEmptyString
|
||||
|
||||
/// Prerequisites of participants and environment. Do not specify if the
|
||||
/// sex practice has no prerequisites.
|
||||
public let prerequisites: NonEmptyString?
|
||||
|
||||
/// Effects of a failed *Seduction* check.
|
||||
public let failed: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
//
|
||||
// Skill.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Skill: LocalizableEntity {
|
||||
/// The skill's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Lists the linked three attributes used to make a skill check.
|
||||
public let check: SkillCheck
|
||||
|
||||
/// Lists applications for the skill, if any. This does not necessarily include
|
||||
/// all possible applications. There may also be new applications that could be
|
||||
/// purchased via certain advantages or special abilities.
|
||||
public let applications: Applications
|
||||
|
||||
/// Indicates whether encumbrance gives a penalty for checks with the skill.
|
||||
public let encumbrance: EncumbranceInfluence
|
||||
|
||||
/// States which column is used to improve the skill.
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
/// The skill group this skill belongs to.
|
||||
public let group: SkillGroupReference
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SkillTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case check = "check"
|
||||
case applications = "applications"
|
||||
case encumbrance = "encumbrance"
|
||||
case improvementCost = "improvement_cost"
|
||||
case group = "group"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SkillTranslation: EntitySubtype {
|
||||
/// The name of the skill.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// If there are options available that can not be put into a selection
|
||||
/// list (like different cults), provide the label text for the input
|
||||
/// element here. Otherwise leave empty.
|
||||
public let applicationsInputLabel: NonEmptyString?
|
||||
|
||||
/// The text listing the certain circumstances in which the encumbrance may
|
||||
/// count. This text must be used if `encumbrance` is set to `"Maybe"`,
|
||||
/// otherwise it is ignored if defined.
|
||||
public let encumbranceDescription: NonEmptyString?
|
||||
|
||||
/// Mentions any tools from the equipment list that are necessary to employ
|
||||
/// the skill.
|
||||
public let tools: NonEmptyMarkdown?
|
||||
|
||||
/// Gives examples of the effects that various QL might provide.
|
||||
public let quality: NonEmptyMarkdown
|
||||
|
||||
/// Lists examples of results for a failed check.
|
||||
public let failed: NonEmptyMarkdown
|
||||
|
||||
/// Lists examples of results for a critical success.
|
||||
public let critical: NonEmptyMarkdown
|
||||
|
||||
/// Lists examples of results for botches.
|
||||
public let botch: NonEmptyMarkdown
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case applicationsInputLabel = "applications_input_label"
|
||||
case encumbranceDescription = "encumbrance_description"
|
||||
case tools = "tools"
|
||||
case quality = "quality"
|
||||
case failed = "failed"
|
||||
case critical = "critical"
|
||||
case botch = "botch"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
|
||||
/// A category. All available entries from the specified category will be
|
||||
/// included as separate applications.
|
||||
public enum ApplicationCategory: String, EntitySubtype {
|
||||
case blessedTraditions = "BlessedTraditions"
|
||||
case diseases = "Diseases"
|
||||
case regions = "Regions"
|
||||
}
|
||||
|
||||
/// The skill's applications.
|
||||
@DiscriminatedEnum
|
||||
public enum Applications: EntitySubtype {
|
||||
case derived(ApplicationCategory)
|
||||
case explicit(SpecificApplications)
|
||||
}
|
||||
|
||||
/// A list of explicit applications.
|
||||
public typealias SpecificApplications = [Application]
|
||||
|
||||
/// An explicit skill application.
|
||||
public struct Application: EntitySubtype {
|
||||
/// The skill application's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ApplicationTranslation>
|
||||
}
|
||||
|
||||
public struct ApplicationTranslation: EntitySubtype {
|
||||
/// The skill application's name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
|
||||
/// Indicates whether encumbrance gives a penalty for checks with the skill.
|
||||
public enum EncumbranceInfluence: String, EntitySubtype {
|
||||
case `true` = "True"
|
||||
case `false` = "False"
|
||||
case maybe = "Maybe"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// SkillGroup.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct SkillGroup: LocalizableEntity {
|
||||
/// The skill group's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The skill group check's attributes.
|
||||
public let check: SkillCheck
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SkillGroupTranslation>
|
||||
}
|
||||
|
||||
public struct SkillGroupTranslation: EntitySubtype {
|
||||
/// The skill group's name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The skill group's long name.
|
||||
public let longName: NonEmptyString
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case longName = "long_name"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// SkillModificationLevel.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct SkillModificationLevel: Entity {
|
||||
/// The skill modification level's identifier.
|
||||
public let id: Int
|
||||
|
||||
/// Configuration for this level for fast skills (spells, liturgical chants).
|
||||
public let fast: FastSkillModificationLevelConfig
|
||||
|
||||
/// Configuration for this level for slow skills (rituals, ceremonies).
|
||||
public let slow: SlowSkillModificationLevelConfig
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SkillModificationLevelTranslation>?
|
||||
}
|
||||
|
||||
public struct FastSkillModificationLevelConfig: EntitySubtype {
|
||||
/// The casting time in actions.
|
||||
public let castingTime: Int
|
||||
|
||||
/// The range in meters.
|
||||
public let range: Int
|
||||
|
||||
/// The cost in AE/KP.
|
||||
public let cost: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case castingTime = "casting_time"
|
||||
case range = "range"
|
||||
case cost = "cost"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SlowSkillModificationLevelConfig: EntitySubtype {
|
||||
/// The casting time.
|
||||
public let castingTime: SlowSkillCastingTime
|
||||
|
||||
/// The range in meters.
|
||||
public let range: Int
|
||||
|
||||
/// The cost in AE/KP.
|
||||
public let cost: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case castingTime = "casting_time"
|
||||
case range = "range"
|
||||
case cost = "cost"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SlowSkillCastingTime: EntitySubtype {
|
||||
/// The (unitless) casting time.
|
||||
public let value: Int
|
||||
|
||||
/// The unit for the `value`.
|
||||
public let unit: SlowSkillCastingTimeUnit
|
||||
}
|
||||
|
||||
public enum SlowSkillCastingTimeUnit: String, EntitySubtype {
|
||||
case minutes = "Minutes"
|
||||
case hours = "Hours"
|
||||
}
|
||||
|
||||
public struct SkillModificationLevelTranslation: EntitySubtype {
|
||||
/// Configuration for this level for fast skills (spells, liturgical chants).
|
||||
/// Values set here override the default generated text.
|
||||
public let fast: LevelTypeConfigTranslation?
|
||||
|
||||
/// Configuration for this level for slow skills (rituals, ceremonies). Values
|
||||
/// set here override the default generated text.
|
||||
public let slow: LevelTypeConfigTranslation?
|
||||
}
|
||||
|
||||
/// Configuration translation of a type for a level. Values set here override the
|
||||
/// default generated text.
|
||||
public struct LevelTypeConfigTranslation: EntitySubtype {
|
||||
public let range: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// SocialStatus.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct SocialStatus: LocalizableEntity {
|
||||
/// The social status' identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SocialStatusTranslation>
|
||||
}
|
||||
|
||||
public struct SocialStatusTranslation: EntitySubtype {
|
||||
/// The social status name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// Spell.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Spell: LocalizableEntity {
|
||||
/// The spell's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// Lists the linked three attributes used to make a skill check.
|
||||
public let check: SkillCheck
|
||||
|
||||
/// In some cases, the target's Spirit or Toughness is applied as a penalty.
|
||||
public let checkPenalty: SkillCheckPenalty?
|
||||
|
||||
/// Measurable parameters of a spell.
|
||||
public let parameters: FastPerformanceParameters
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
public let target: AffectedTargetCategories
|
||||
|
||||
/// The associated property.
|
||||
public let property: PropertyReference
|
||||
|
||||
/// The tradition(s) the spell is available for. It may be *generally*
|
||||
/// available to all traditions or it may be only familiar in specific
|
||||
/// traditions.
|
||||
public let traditions: Traditions
|
||||
|
||||
/// States which column is used to improve the skill.
|
||||
public let improvementCost: ImprovementCost
|
||||
|
||||
public let prerequisites: SpellworkPrerequisites?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SpellTranslation>
|
||||
|
||||
public let enhancements: Enhancements?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case check = "check"
|
||||
case checkPenalty = "check_penalty"
|
||||
case parameters = "parameters"
|
||||
case target = "target"
|
||||
case property = "property"
|
||||
case traditions = "traditions"
|
||||
case improvementCost = "improvement_cost"
|
||||
case prerequisites = "prerequisites"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
case enhancements = "enhancements"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SpellTranslation: EntitySubtype {
|
||||
/// The name of the spell.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The effect description may be either a plain text or a text that is
|
||||
/// divided by a list of effects for each quality level. It may also be a
|
||||
/// list for each two quality levels.
|
||||
public let effect: ActivatableSkillEffect
|
||||
|
||||
@available(*, deprecated)
|
||||
public let castingTime: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let cost: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let range: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let duration: OldParameter
|
||||
|
||||
@available(*, deprecated)
|
||||
public let target: String
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case effect = "effect"
|
||||
case castingTime = "casting_time"
|
||||
case cost = "cost"
|
||||
case range = "range"
|
||||
case duration = "duration"
|
||||
case target = "target"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// State.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct State: LocalizableEntity {
|
||||
/// The state's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<StateTranslation>
|
||||
}
|
||||
|
||||
public struct StateTranslation: EntitySubtype {
|
||||
/// The name of the state.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The description of the state.
|
||||
public let description: NonEmptyMarkdown
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// Talisman.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Talisman: LocalizableEntity {
|
||||
/// The talisman's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The tradition(s) the talisman belongs to.
|
||||
public let tradition: [BlessedTraditionReference]
|
||||
|
||||
/// The talisman type, if any.
|
||||
public let type: TalismanType?
|
||||
|
||||
/// The AP value for the required trade secret, if possible.
|
||||
public let apValue: Int?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<TalismanTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case tradition = "tradition"
|
||||
case type = "type"
|
||||
case apValue = "ap_value"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public enum TalismanType: String, EntitySubtype {
|
||||
case mainTalisman = "MainTalisman"
|
||||
case talisman = "Talisman"
|
||||
case minorTalisman = "MinorTalisman"
|
||||
case regalia = "Regalia"
|
||||
case powerfulTalisman = "PowerfulTalisman"
|
||||
}
|
||||
|
||||
public struct TalismanTranslation: EntitySubtype {
|
||||
/// The name of the talisman.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The effect description.
|
||||
public let effect: NonEmptyMarkdown
|
||||
|
||||
/// The activation parameters.
|
||||
public let activation: TalismanActivationTranslation?
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
public struct TalismanActivationTranslation: EntitySubtype {
|
||||
/// The KP cost.
|
||||
public let cost: Int
|
||||
|
||||
/// The duration.
|
||||
public let duration: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// TargetCategory.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct TargetCategory: LocalizableEntity {
|
||||
/// The target category's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// A superordinate target category, if present.
|
||||
public let parent: TargetCategoryParent?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<TargetCategoryTranslation>
|
||||
}
|
||||
|
||||
/// A superordinate target category, if present.
|
||||
public struct TargetCategoryParent: EntitySubtype {
|
||||
/// The identifier of the superordinate target category.
|
||||
public let id: TargetCategoryIdentifier
|
||||
}
|
||||
|
||||
public struct TargetCategoryTranslation: EntitySubtype {
|
||||
/// The target category name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// UI.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
/* This file has been marked as ignored for generating Swift code. */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,305 @@
|
||||
//
|
||||
// _ActivatableSelectOptionCategory.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SelectOptionCategory: EntitySubtype {
|
||||
case blessings
|
||||
case cantrips
|
||||
case tradeSecrets
|
||||
case scripts
|
||||
case animalShapes
|
||||
case arcaneBardTraditions
|
||||
case arcaneDancerTraditions
|
||||
case sexPractices
|
||||
case races
|
||||
case cultures
|
||||
case racesAndCultures
|
||||
case blessedTraditions(BlessedTraditionsSelectOptionCategory)
|
||||
case elements(ElementsSelectOptionCategory)
|
||||
case properties(PropertiesSelectOptionCategory)
|
||||
case aspects(AspectSelectOptionCategory)
|
||||
case diseases(DiseasesPoisonsSelectOptionCategory)
|
||||
case poisons(DiseasesPoisonsSelectOptionCategory)
|
||||
case languages(LanguagesSelectOptionCategory)
|
||||
case skills(SkillsSelectOptionCategory)
|
||||
case combatTechniques(CombatTechniquesSelectOptionCategory)
|
||||
case targetCategories(TargetCategoriesSelectOptionCategory)
|
||||
}
|
||||
|
||||
public struct BlessedTraditionsSelectOptionCategory: EntitySubtype {
|
||||
/// Should the principles (code) of the tradition be required to select the
|
||||
/// respective tradition?
|
||||
public let requirePrinciples: Bool?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case requirePrinciples = "require_principles"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ElementsSelectOptionCategory: EntitySubtype {
|
||||
/// Only include entries with the listed identifiers.
|
||||
public let specific: [ElementReference]?
|
||||
}
|
||||
|
||||
public struct PropertiesSelectOptionCategory: EntitySubtype {
|
||||
/// Does each property require it's corresponding property knowledge?
|
||||
public let requireKnowledge: Bool?
|
||||
|
||||
/// Require a minimum number of spellworks of the respective property to be
|
||||
/// on a minimum skill rating.
|
||||
public let requireMinimumSpellworksOn: RequiredMinimumSkillsToBeOnSkillRating?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case requireKnowledge = "require_knowledge"
|
||||
case requireMinimumSpellworksOn = "require_minimum_spellworks_on"
|
||||
}
|
||||
}
|
||||
|
||||
public struct AspectSelectOptionCategory: EntitySubtype {
|
||||
/// Does each aspect require it's corresponding aspect knowledge?
|
||||
public let requireKnowledge: Bool?
|
||||
|
||||
/// The generated name should be the *Master of (Aspect)* suffix for this
|
||||
/// aspect instead of the aspect's name. If an aspect does not provide a
|
||||
/// suffix (such as the General aspect), it is automatically excluded from
|
||||
/// the list.
|
||||
public let useMasterOfSuffixAsName: Bool?
|
||||
|
||||
/// Require a minimum number of liturgies of the respective aspect to be on a
|
||||
/// minimum skill rating.
|
||||
public let requireMinimumLiturgiesOn: RequiredMinimumSkillsToBeOnSkillRating?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case requireKnowledge = "require_knowledge"
|
||||
case useMasterOfSuffixAsName = "use_master_of_suffix_as_name"
|
||||
case requireMinimumLiturgiesOn = "require_minimum_liturgies_on"
|
||||
}
|
||||
}
|
||||
|
||||
/// Require a minimum number of spellworks/liturgies of the respective
|
||||
/// property/aspect to be on a minimum skill rating.
|
||||
public struct RequiredMinimumSkillsToBeOnSkillRating: EntitySubtype {
|
||||
/// The minimum number of liturgies that need to be on the defined minimum
|
||||
/// skill rating.
|
||||
public let number: Int
|
||||
|
||||
/// The minimum skill rating the defined minimum number of liturgies need
|
||||
/// to be on.
|
||||
public let rating: Int
|
||||
}
|
||||
|
||||
public struct DiseasesPoisonsSelectOptionCategory: EntitySubtype {
|
||||
/// Only convert half the disease/poison level into the AP value.
|
||||
public let useHalfLevelAsApValue: Bool?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case useHalfLevelAsApValue = "use_half_level_as_ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
public struct LanguagesSelectOptionCategory: EntitySubtype {
|
||||
/// Generate prerequisites for each entry of the category.
|
||||
public let prerequisites: [LanguagesSelectOptionCategoryPrerequisite]?
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum LanguagesSelectOptionCategoryPrerequisite: EntitySubtype {
|
||||
case selectOption(OptionPrerequisite)
|
||||
}
|
||||
|
||||
public struct SkillsSelectOptionCategory: EntitySubtype {
|
||||
/// A list of skill categories.
|
||||
public let categories: [SkillsSelectOptionCategoryCategory]
|
||||
|
||||
/// Generate AP values for each entry.
|
||||
public let apValue: SelectOptionsAdventurePointsValue<SkillishIdentifier>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case categories = "categories"
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SkillsSelectOptionCategoryCategory: EntitySubtype {
|
||||
case skills(SkillSelectOptionCategoryCategory)
|
||||
case spells(GenericSkillsSelectOptionCategoryCategory<SpellReference>)
|
||||
case rituals(GenericSkillsSelectOptionCategoryCategory<RitualReference>)
|
||||
case liturgicalChants(GenericSkillsSelectOptionCategoryCategory<LiturgicalChantReference>)
|
||||
case ceremonies(GenericSkillsSelectOptionCategoryCategory<CeremonyReference>)
|
||||
}
|
||||
|
||||
public struct SkillSelectOptionCategoryCategory: EntitySubtype {
|
||||
/// Only include entries of the specified groups.
|
||||
public let groups: [SkillGroupReference]?
|
||||
|
||||
/// Only include (`Intersection`) or exclude (`Difference`) specific
|
||||
/// skills.
|
||||
public let specific: SpecificFromSkillSelectOptionCategoryCategory<SkillReference>?
|
||||
|
||||
/// Registers new applications, which get enabled once this entry is
|
||||
/// activated with its respective select option. It specifies an
|
||||
/// entry-unique identifier, the skill it belongs to is derived from the
|
||||
/// select option automatically. A translation can be left out if its
|
||||
/// name equals the name of the origin entry.
|
||||
public let skillApplications: [SkillApplicationOrUse]?
|
||||
|
||||
/// Registers uses, which get enabled once this entry is activated with
|
||||
/// its respective select option. It specifies an entry-unique
|
||||
/// identifier, the skill it belongs to is derived from the select option
|
||||
/// automatically. A translation can be left out if its name equals the
|
||||
/// name of the origin entry.
|
||||
public let skillUses: [SkillApplicationOrUse]?
|
||||
|
||||
/// Generate prerequisites for each entry of the category.
|
||||
public let prerequisites: [SkillSelectOptionCategoryPrerequisite]?
|
||||
|
||||
/// Generate AP values for each entry.
|
||||
public let apValue: SelectOptionsAdventurePointsValue<SkillIdentifier>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case groups = "groups"
|
||||
case specific = "specific"
|
||||
case skillApplications = "skill_applications"
|
||||
case skillUses = "skill_uses"
|
||||
case prerequisites = "prerequisites"
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CombatTechniquesSelectOptionCategory: EntitySubtype {
|
||||
/// A list of combat technique categories.
|
||||
public let categories: [CombatTechniquesSelectOptionCategoryCategory]
|
||||
|
||||
/// Generate AP values for each entry.
|
||||
public let apValue: SelectOptionsAdventurePointsValue<CombatTechniqueIdentifier>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case categories = "categories"
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum CombatTechniquesSelectOptionCategoryCategory: EntitySubtype {
|
||||
case closeCombatTechniques(GenericSkillsSelectOptionCategoryCategory<CloseCombatTechniqueReference>)
|
||||
case rangedCombatTechniques(GenericSkillsSelectOptionCategoryCategory<RangedCombatTechniqueReference>)
|
||||
}
|
||||
|
||||
public struct SkillApplicationOrUse: EntitySubtype {
|
||||
/// The application's or use's identifier. An entry-unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SkillApplicationOrUseTranslation>?
|
||||
}
|
||||
|
||||
public struct SkillApplicationOrUseTranslation: EntitySubtype {
|
||||
/// The name of the application or use if different from the activatable
|
||||
/// entry's name.
|
||||
public let name: String
|
||||
}
|
||||
|
||||
public struct GenericSkillsSelectOptionCategoryCategory<Ref: EntitySubtype>: EntitySubtype {
|
||||
/// Only include (`Intersection`) or exclude (`Difference`) specific entries.
|
||||
public let specific: SpecificFromSkillSelectOptionCategoryCategory<Ref>?
|
||||
|
||||
/// Generate prerequisites for each entry of the category.
|
||||
public let prerequisites: [SkillSelectOptionCategoryPrerequisite]?
|
||||
}
|
||||
|
||||
public struct SpecificFromSkillSelectOptionCategoryCategory<Ref: EntitySubtype>: EntitySubtype {
|
||||
public let operation: SpecificFromSkillSelectOptionCategoryCategoryOperation
|
||||
|
||||
/// The list of specific entries.
|
||||
public let list: [Ref]
|
||||
}
|
||||
|
||||
/// Only include (`Intersection`) or exclude (`Difference`) specific entries.
|
||||
public enum SpecificFromSkillSelectOptionCategoryCategoryOperation: String, EntitySubtype {
|
||||
case intersection = "Intersection"
|
||||
case difference = "Difference"
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SkillSelectOptionCategoryPrerequisite: EntitySubtype {
|
||||
case `self`(SelfPrerequisite)
|
||||
case selectOption(OptionPrerequisite)
|
||||
}
|
||||
|
||||
public struct SelfPrerequisite: EntitySubtype {
|
||||
/// The entry requires itself on a certain Skill Rating.
|
||||
public let value: Int
|
||||
}
|
||||
|
||||
/// The entry requires or prohibits itself as a select option of another entry.
|
||||
public struct OptionPrerequisite: EntitySubtype {
|
||||
/// The target entry's identifier.
|
||||
public let id: ActivatableIdentifier
|
||||
|
||||
/// Is the select option required (`true`) or prohibited (`false`)?
|
||||
public let active: Bool
|
||||
|
||||
/// The required level, if any.
|
||||
public let level: Int?
|
||||
}
|
||||
|
||||
/// Generate AP values for each entry.
|
||||
@DiscriminatedEnum
|
||||
public enum SelectOptionsAdventurePointsValue<Identifier: EntitySubtype>: EntitySubtype {
|
||||
case derivedFromImprovementCost(SelectOptionsDeriveAdventurePointsValueFromImprovementCost)
|
||||
case fixed(SelectOptionsFixedAdventurePointsValue<Identifier>)
|
||||
}
|
||||
|
||||
/// Derive the cost from the improvement cost of each entry.
|
||||
///
|
||||
/// **Calculation:** AP Value = Improvement Cost × `multiplier` + `offset`
|
||||
public struct SelectOptionsDeriveAdventurePointsValueFromImprovementCost: EntitySubtype {
|
||||
/// This number is multiplied with the improvement cost of the entry
|
||||
/// (A = 1 to D = 4).
|
||||
public let multiplier: Int?
|
||||
|
||||
/// This number is added to the multiplied improvement cost of the entry.
|
||||
public let offset: Int?
|
||||
}
|
||||
|
||||
public struct SelectOptionsFixedAdventurePointsValue<Identifier: EntitySubtype>: EntitySubtype {
|
||||
/// A mapping of skill identifiers to their specific AP values.
|
||||
public let map: [SelectOptionsFixedAdventurePointsValueMapping<Identifier>]
|
||||
|
||||
/// The default value of an entry. Used as a fallback if no value is
|
||||
/// found in `list`.
|
||||
public let `default`: Int
|
||||
}
|
||||
|
||||
public struct SelectOptionsFixedAdventurePointsValueMapping<Identifier: EntitySubtype>: EntitySubtype {
|
||||
/// The entry's identifier.
|
||||
public let id: Identifier
|
||||
|
||||
/// The AP value for the specified entry.
|
||||
public let apValue: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case apValue = "ap_value"
|
||||
}
|
||||
}
|
||||
|
||||
public struct TargetCategoriesSelectOptionCategory: EntitySubtype {
|
||||
/// A list of combat technique categories.
|
||||
public let list: [SpecificTargetCategory]
|
||||
}
|
||||
|
||||
public struct SpecificTargetCategory: EntitySubtype {
|
||||
/// The target category’s identifier.
|
||||
public let id: TargetCategoryIdentifier
|
||||
|
||||
/// The volume for this specific selection.
|
||||
public let volume: Int?
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// _ActivatableSkill.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct OneTimePerformanceParameters<CastingTime: EntitySubtype>: EntitySubtype {
|
||||
public let castingTime: CastingTime
|
||||
|
||||
public let cost: OneTimeCost
|
||||
|
||||
public let range: Range
|
||||
|
||||
public let duration: DurationForOneTime
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case castingTime = "casting_time"
|
||||
case cost = "cost"
|
||||
case range = "range"
|
||||
case duration = "duration"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SustainedPerformanceParameters<CastingTime: EntitySubtype>: EntitySubtype {
|
||||
public let castingTime: CastingTime
|
||||
|
||||
public let cost: SustainedCost
|
||||
|
||||
public let range: Range
|
||||
|
||||
public let duration: DurationForSustained?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case castingTime = "casting_time"
|
||||
case cost = "cost"
|
||||
case range = "range"
|
||||
case duration = "duration"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum FastPerformanceParameters: EntitySubtype {
|
||||
case oneTime(FastOneTimePerformanceParameters)
|
||||
case sustained(FastSustainedPerformanceParameters)
|
||||
}
|
||||
|
||||
public typealias FastOneTimePerformanceParameters = OneTimePerformanceParameters<FastCastingTime>
|
||||
|
||||
public typealias FastSustainedPerformanceParameters = SustainedPerformanceParameters<FastCastingTime>
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SlowPerformanceParameters: EntitySubtype {
|
||||
case oneTime(SlowOneTimePerformanceParameters)
|
||||
case sustained(SlowSustainedPerformanceParameters)
|
||||
}
|
||||
|
||||
public typealias SlowOneTimePerformanceParameters = OneTimePerformanceParameters<SlowCastingTime>
|
||||
|
||||
public typealias SlowSustainedPerformanceParameters = SustainedPerformanceParameters<SlowCastingTime>
|
||||
|
||||
public struct OldParameter: EntitySubtype {
|
||||
public let full: String
|
||||
|
||||
public let abbr: String
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// _ActivatableSkillCastingTime.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum CastingTime<NonModifiable: EntitySubtype>: EntitySubtype {
|
||||
case modifiable(ModifiableCastingTime)
|
||||
case nonModifiable(NonModifiable)
|
||||
}
|
||||
|
||||
public struct ModifiableCastingTime: EntitySubtype {
|
||||
/// The initial skill modification identifier/level.
|
||||
public let initialModificationLevel: Int
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case initialModificationLevel = "initial_modification_level"
|
||||
}
|
||||
}
|
||||
|
||||
/// The casting time may have two different values: One for use in “normal” time,
|
||||
/// i. e. actions, combat rounds and others, and one for use during lovemaking,
|
||||
/// which is a rule set from Aventurian Intimacy.
|
||||
///
|
||||
/// There must always be at least one casting time value.
|
||||
public struct CastingTimeIncludingLovemaking<NonModifiable: EntitySubtype>: EntitySubtype {
|
||||
/// The default casting time definition.
|
||||
public let `default`: CastingTime<NonModifiable>?
|
||||
|
||||
/// The casting time during lovemaking. In Aventurian Intimacy, you may only
|
||||
/// use an activatable skill during lovemaking if it has a casting time used
|
||||
/// during lovemaking.
|
||||
public let duringLovemaking: CastingTimeDuringLovemaking?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case `default` = "default"
|
||||
case duringLovemaking = "during_lovemaking"
|
||||
}
|
||||
}
|
||||
|
||||
/// The casting time during lovemaking. In Aventurian Intimacy, you may only use
|
||||
/// an activatable skill during lovemaking if it has a casting time used during
|
||||
/// lovemaking.
|
||||
public struct CastingTimeDuringLovemaking: EntitySubtype {
|
||||
/// The (unitless) casting time value.
|
||||
public let value: Int
|
||||
|
||||
/// The unit of the `value`.
|
||||
public let unit: CastingTimeDuringLovemakingUnit
|
||||
}
|
||||
|
||||
public enum CastingTimeDuringLovemakingUnit: String, EntitySubtype {
|
||||
case seductionActions = "SeductionActions"
|
||||
case rounds = "Rounds"
|
||||
}
|
||||
|
||||
public struct FastSkillNonModifiableCastingTime: EntitySubtype {
|
||||
/// The casting time value in actions.
|
||||
public let actions: Int
|
||||
}
|
||||
|
||||
public struct SlowSkillNonModifiableCastingTime: EntitySubtype {
|
||||
/// The (unitless) casting time value.
|
||||
public let value: Int
|
||||
|
||||
public let unit: SlowSkillCastingTimeUnit
|
||||
}
|
||||
|
||||
public typealias FastCastingTime = CastingTimeIncludingLovemaking<FastSkillNonModifiableCastingTime>
|
||||
|
||||
public typealias SlowCastingTime = CastingTimeIncludingLovemaking<SlowSkillNonModifiableCastingTime>
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// _ActivatableSkillCheckResultBased.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// Defines the derived (unitless) value.
|
||||
public enum CheckResultValue: String, EntitySubtype {
|
||||
case qualityLevels = "QualityLevels"
|
||||
case skillPoints = "SkillPoints"
|
||||
}
|
||||
|
||||
/// Defines how the the `value` is set off against the check result.
|
||||
public enum CheckResultArithmetic: String, EntitySubtype {
|
||||
case multiply = "Multiply"
|
||||
case divide = "Divide"
|
||||
}
|
||||
|
||||
public struct CheckResultBasedModifier: EntitySubtype {
|
||||
/// The arithmetic how to apply the `value` to the `base`.
|
||||
public let arithmetic: CheckResultArithmetic
|
||||
|
||||
/// The value that is applied to the `base` using the defined `arithmetic`.
|
||||
public let value: Int
|
||||
}
|
||||
|
||||
/// Defines a parameter being based on a check result.
|
||||
public struct CheckResultBased: EntitySubtype {
|
||||
/// The base value that is derived from the check result.
|
||||
public let base: CheckResultValue
|
||||
|
||||
/// If defined, it modifies the base value.
|
||||
public let modifier: CheckResultBasedModifier?
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
//
|
||||
// _ActivatableSkillCost.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum OneTimeCost: EntitySubtype {
|
||||
case single(SingleOneTimeCost)
|
||||
case conjunction(MultipleOneTimeCosts)
|
||||
case disjunction(MultipleOneTimeCosts)
|
||||
case map(CostMap)
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SingleOneTimeCost: EntitySubtype {
|
||||
case modifiable(ModifiableOneTimeCost)
|
||||
case nonModifiable(NonModifiableOneTimeCost)
|
||||
case indefinite(IndefiniteOneTimeCost)
|
||||
}
|
||||
|
||||
public typealias MultipleOneTimeCosts = [SingleOneTimeCost]
|
||||
|
||||
public struct ModifiableOneTimeCost: EntitySubtype {
|
||||
/// The initial skill modification identifier/level.
|
||||
public let initialModificationLevel: Int
|
||||
|
||||
/// The part of the cost value that has to be spent permanently.
|
||||
public let permanentValue: Int?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ModifiableOneTimeCostTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case initialModificationLevel = "initial_modification_level"
|
||||
case permanentValue = "permanent_value"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ModifiableOneTimeCostTranslation: EntitySubtype {
|
||||
/// A replacement string.
|
||||
public let replacement: ResponsiveTextReplace
|
||||
}
|
||||
|
||||
public struct NonModifiableOneTimeCost: EntitySubtype {
|
||||
/// If `true`, the non-modifiable value is a minimum value.
|
||||
public let isMinimum: Bool?
|
||||
|
||||
/// The AE cost value.
|
||||
public let value: Int
|
||||
|
||||
/// The part of the cost value that has to be spent permanently.
|
||||
public let permanentValue: Int?
|
||||
|
||||
/// The cost have to be per a specific countable entity, e.g. `8 KP per
|
||||
/// person`.
|
||||
public let per: NonModifiableOneTimeCostPerCountable?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag
|
||||
/// (BCP47).
|
||||
public let translations: LocaleMap<NonModifiableOneTimeCostTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMinimum = "is_minimum"
|
||||
case value = "value"
|
||||
case permanentValue = "permanent_value"
|
||||
case per = "per"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NonModifiableOneTimeCostPerCountable: EntitySubtype {
|
||||
/// If defined, the minimum total AE that have to be spent casting the
|
||||
/// skill.
|
||||
public let minimumTotal: Double?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag
|
||||
/// (BCP47).
|
||||
public let translations: LocaleMap<NonModifiableOneTimeCostPerCountableTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case minimumTotal = "minimum_total"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NonModifiableOneTimeCostPerCountableTranslation: EntitySubtype {
|
||||
/// The countable entity name.
|
||||
public let countable: ResponsiveText
|
||||
}
|
||||
|
||||
public struct NonModifiableOneTimeCostTranslation: EntitySubtype {
|
||||
/// A note, appended to the generated string in parenthesis.
|
||||
public let note: ResponsiveTextOptional
|
||||
}
|
||||
|
||||
public struct IndefiniteOneTimeCost: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<IndefiniteOneTimeCostTranslation>
|
||||
}
|
||||
|
||||
public struct IndefiniteOneTimeCostTranslation: EntitySubtype {
|
||||
/// A description of where the cost come from.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
|
||||
/// A content that is `2/4/8/16 AE for an item the size of a
|
||||
/// cup/chest/door/castle gate` may be respresented as the following map:
|
||||
///
|
||||
/// ```yaml
|
||||
/// options:
|
||||
/// - value: 2
|
||||
/// label: "cup"
|
||||
/// - value: 4
|
||||
/// label: "chest"
|
||||
/// - value: 8
|
||||
/// label: "door"
|
||||
/// - value: 16
|
||||
/// label: "castle gate"
|
||||
/// for_append: "an item the size of a"
|
||||
/// ```
|
||||
///
|
||||
/// This will generate the exact same string as seen above – given it is set
|
||||
/// for a spellwork and thus `AE` is used.
|
||||
public struct CostMap: EntitySubtype {
|
||||
/// The possible costs and associated labels.
|
||||
public let options: [CostMapOption]
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CostMapTranslation>?
|
||||
}
|
||||
|
||||
public struct CostMapOption: EntitySubtype {
|
||||
/// The full cost value for this option.
|
||||
public let value: Int
|
||||
|
||||
/// The part of the `value` that has to be paid permanently.
|
||||
public let permanentValue: Int?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CostMapOptionTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case value = "value"
|
||||
case permanentValue = "permanent_value"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CostMapOptionTranslation: EntitySubtype {
|
||||
/// The description of the option for cost string generation.
|
||||
public let label: NonEmptyString
|
||||
|
||||
/// The description of the option if used standalone. Only used if
|
||||
/// different from `label`.
|
||||
public let labelStandalone: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case label = "label"
|
||||
case labelStandalone = "label_standalone"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CostMapTranslation: EntitySubtype {
|
||||
/// Place a string between the `for` and the grouped map option labels.
|
||||
public let listPrepend: NonEmptyString?
|
||||
|
||||
/// Place a string after the grouped map option labels.
|
||||
public let listAppend: NonEmptyString?
|
||||
|
||||
/// If the string from the book cannot be generated using the default
|
||||
/// generation technique, use this string. All options still need to be
|
||||
/// inserted propertly, since it may be used by in-game tools to provide a
|
||||
/// selection to players.
|
||||
public let replacement: NonEmptyString?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case listPrepend = "list_prepend"
|
||||
case listAppend = "list_append"
|
||||
case replacement = "replacement"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SustainedCost: EntitySubtype {
|
||||
case modifiable(ModifiableSustainedCost)
|
||||
case nonModifiable(NonModifiableSustainedCost)
|
||||
}
|
||||
|
||||
public struct ModifiableSustainedCost: EntitySubtype {
|
||||
/// The initial skill modification identifier/level.
|
||||
public let initialModificationLevel: Int
|
||||
|
||||
/// The sustain interval.
|
||||
public let interval: DurationUnitValue
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case initialModificationLevel = "initial_modification_level"
|
||||
case interval = "interval"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NonModifiableSustainedCost: EntitySubtype {
|
||||
/// If `true`, the non-modifiable value is a minimum value.
|
||||
public let isMinimum: Bool?
|
||||
|
||||
/// The AE cost value.
|
||||
public let value: Int
|
||||
|
||||
/// The cost have to be per a specific countable entity, e.g. `8 KP per
|
||||
/// person per 5 minutes`.
|
||||
public let per: NonModifiableSustainedCostPerCountable?
|
||||
|
||||
/// The sustain interval.
|
||||
public let interval: DurationUnitValue
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMinimum = "is_minimum"
|
||||
case value = "value"
|
||||
case per = "per"
|
||||
case interval = "interval"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NonModifiableSustainedCostPerCountable: EntitySubtype {
|
||||
/// If defined, the minimum total AE that have to be spent casting the
|
||||
/// skill.
|
||||
public let minimumTotal: Double?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<NonModifiableSustainedCostPerCountableTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case minimumTotal = "minimum_total"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct NonModifiableSustainedCostPerCountableTranslation: EntitySubtype {
|
||||
/// The countable entity name.
|
||||
public let countable: ResponsiveText
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
//
|
||||
// _ActivatableSkillDuration.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum DurationForOneTime: EntitySubtype {
|
||||
case immediate(Immediate)
|
||||
case permanent(PermanentDuration)
|
||||
case fixed(FixedDuration)
|
||||
case checkResultBased(CheckResultBasedDuration)
|
||||
case indefinite(IndefiniteDuration)
|
||||
}
|
||||
|
||||
public struct Immediate: EntitySubtype {
|
||||
/// Specified if the duration has a maximum time span.
|
||||
public let maximum: DurationUnitValue?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ImmediateTranslation>?
|
||||
}
|
||||
|
||||
public struct ImmediateTranslation: EntitySubtype {
|
||||
/// A replacement string.
|
||||
public let replacement: ResponsiveTextReplace
|
||||
}
|
||||
|
||||
public struct PermanentDuration: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<PermanentDurationTranslation>?
|
||||
}
|
||||
|
||||
public struct PermanentDurationTranslation: EntitySubtype {
|
||||
/// A replacement string.
|
||||
public let replacement: ResponsiveTextReplace
|
||||
}
|
||||
|
||||
public struct FixedDuration: EntitySubtype {
|
||||
/// If the duration is the maximum duration, so it may end earlier.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The (unitless) duration.
|
||||
public let value: Int
|
||||
|
||||
/// The duration unit.
|
||||
public let unit: DurationUnit
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<FixedDurationTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case value = "value"
|
||||
case unit = "unit"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct FixedDurationTranslation: EntitySubtype {
|
||||
/// A replacement string.
|
||||
public let replacement: ResponsiveTextReplace
|
||||
}
|
||||
|
||||
/// Defines the duration being based on a check result.
|
||||
public struct CheckResultBasedDuration: EntitySubtype {
|
||||
/// If the duration is the maximum duration, so it may end earlier.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The base value that is derived from the check result.
|
||||
public let base: CheckResultValue
|
||||
|
||||
/// If defined, it modifies the base value.
|
||||
public let modifier: CheckResultBasedModifier?
|
||||
|
||||
/// The duration unit.
|
||||
public let unit: DurationUnit
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CheckResultBasedDurationTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case base = "base"
|
||||
case modifier = "modifier"
|
||||
case unit = "unit"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct CheckResultBasedDurationTranslation: EntitySubtype {
|
||||
/// A replacement string.
|
||||
public let replacement: ResponsiveTextReplace
|
||||
}
|
||||
|
||||
public struct IndefiniteDuration: EntitySubtype {
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<IndefiniteDurationTranslation>
|
||||
}
|
||||
|
||||
public struct IndefiniteDurationTranslation: EntitySubtype {
|
||||
/// A description of the duration.
|
||||
public let description: ResponsiveText
|
||||
}
|
||||
|
||||
public struct DurationForSustained: EntitySubtype {
|
||||
/// The sustained skill can be active a maximum amount of time.
|
||||
public let maximum: DurationUnitValue
|
||||
}
|
||||
|
||||
public enum DurationUnit: String, EntitySubtype {
|
||||
case seconds = "Seconds"
|
||||
case minutes = "Minutes"
|
||||
case hours = "Hours"
|
||||
case days = "Days"
|
||||
case weeks = "Weeks"
|
||||
case months = "Months"
|
||||
case years = "Years"
|
||||
case centuries = "Centuries"
|
||||
case actions = "Actions"
|
||||
case combatRounds = "CombatRounds"
|
||||
}
|
||||
|
||||
public struct DurationUnitValue: EntitySubtype {
|
||||
/// The (unitless) duration value.
|
||||
public let value: Int
|
||||
|
||||
/// The unit of the `value`.
|
||||
public let unit: DurationUnit
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// _ActivatableSkillEffect.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// The effect description may be either a plain text or a text that is divided
|
||||
/// by a list of effects for each quality level. It may also be a list for each
|
||||
/// two quality levels.
|
||||
@DiscriminatedEnum
|
||||
public enum ActivatableSkillEffect: EntitySubtype {
|
||||
case plain(ActivatableSkillPlainEffect)
|
||||
case forEachQualityLevel(ActivatableSkillEffectForEachQualityLevel)
|
||||
case forEachTwoQualityLevels(ActivatableSkillEffectForEachTwoQualityLevels)
|
||||
}
|
||||
|
||||
public struct ActivatableSkillPlainEffect: EntitySubtype {
|
||||
/// The effect description.
|
||||
public let text: NonEmptyMarkdown
|
||||
}
|
||||
|
||||
public struct ActivatableSkillEffectForEachQualityLevel: EntitySubtype {
|
||||
/// The effect description before the list of effects for each quality
|
||||
/// level.
|
||||
public let textBefore: NonEmptyMarkdown
|
||||
|
||||
/// The list of effects for each quality level. The first element
|
||||
/// represents QL 1, the second element QL 2, and so on.
|
||||
public let qualityLevels: [NonEmptyMarkdown]
|
||||
|
||||
/// The effect description after the list of effects for each quality
|
||||
/// level.
|
||||
public let textAfter: NonEmptyMarkdown?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case textBefore = "text_before"
|
||||
case qualityLevels = "quality_levels"
|
||||
case textAfter = "text_after"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ActivatableSkillEffectForEachTwoQualityLevels: EntitySubtype {
|
||||
/// The effect description before the list of effects for each quality
|
||||
/// level.
|
||||
public let textBefore: NonEmptyMarkdown
|
||||
|
||||
/// The list of effects for each two quality levels. The first element
|
||||
/// represents QL 1–2, the second element QL 3–4 and the third element QL
|
||||
/// 5–6.
|
||||
public let qualityLevels: [NonEmptyMarkdown]
|
||||
|
||||
/// The effect description after the list of effects for each quality
|
||||
/// level.
|
||||
public let textAfter: NonEmptyMarkdown?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case textBefore = "text_before"
|
||||
case qualityLevels = "quality_levels"
|
||||
case textAfter = "text_after"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// _ActivatableSkillRange.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Range: EntitySubtype {
|
||||
public let value: RangeValue
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<RangeTranslation>?
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum RangeValue: EntitySubtype {
|
||||
case modifiable(ModifiableRange)
|
||||
case sight
|
||||
case `self`
|
||||
case global
|
||||
case touch
|
||||
case fixed(FixedRange)
|
||||
case checkResultBased(CheckResultBasedRange)
|
||||
}
|
||||
|
||||
public struct ModifiableRange: EntitySubtype {
|
||||
/// If `true`, the range is a maximum range.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The initial skill modification identifier/level.
|
||||
public let initialModificationLevel: Int
|
||||
|
||||
/// If `true`, the range is a radius.
|
||||
public let isRadius: Bool?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case initialModificationLevel = "initial_modification_level"
|
||||
case isRadius = "is_radius"
|
||||
}
|
||||
}
|
||||
|
||||
public struct FixedRange: EntitySubtype {
|
||||
/// If `true`, the range is a maximum range.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The (unitless) range value.
|
||||
public let value: Int
|
||||
|
||||
/// The unit of the `value`.
|
||||
public let unit: RangeUnit
|
||||
|
||||
/// If `true`, the range is a radius.
|
||||
public let isRadius: Bool?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case value = "value"
|
||||
case unit = "unit"
|
||||
case isRadius = "is_radius"
|
||||
}
|
||||
}
|
||||
|
||||
/// Defines the range being based on a check result.
|
||||
public struct CheckResultBasedRange: EntitySubtype {
|
||||
/// If the range is the maximum range.
|
||||
public let isMaximum: Bool?
|
||||
|
||||
/// The base value that is derived from the check result.
|
||||
public let base: CheckResultValue
|
||||
|
||||
/// If defined, it modifies the base value.
|
||||
public let modifier: CheckResultBasedModifier?
|
||||
|
||||
/// The duration unit.
|
||||
public let unit: RangeUnit
|
||||
|
||||
/// If `true`, the range is a radius.
|
||||
public let isRadius: Bool?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case isMaximum = "is_maximum"
|
||||
case base = "base"
|
||||
case modifier = "modifier"
|
||||
case unit = "unit"
|
||||
case isRadius = "is_radius"
|
||||
}
|
||||
}
|
||||
|
||||
public struct RangeTranslation: EntitySubtype {
|
||||
/// A note, appended to the generated string in parenthesis. If the
|
||||
/// generated is modified using `replacement`, the note is appended to
|
||||
/// the modifier string.
|
||||
public let note: ResponsiveTextOptional?
|
||||
|
||||
/// A replacement string. If `note` is provided, it is appended to the
|
||||
/// replaced string.
|
||||
public let replacement: ResponsiveTextReplace?
|
||||
}
|
||||
|
||||
public enum RangeUnit: String, EntitySubtype {
|
||||
case steps = "Steps"
|
||||
case miles = "Miles"
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// _ActivatableSkillTargetCategory.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// The target category – the kind of creature or object – the skill affects.
|
||||
///
|
||||
/// If no target categories are given, the skill applies to all target
|
||||
/// categories.
|
||||
public typealias AffectedTargetCategories = [SpecificAffectedTargetCategory]
|
||||
|
||||
public struct SpecificAffectedTargetCategory: EntitySubtype {
|
||||
public let id: SpecificAffectedTargetCategoryIdentifier
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SpecificAffectedTargetCategoryTranslation>?
|
||||
}
|
||||
|
||||
public struct SpecificAffectedTargetCategoryTranslation: EntitySubtype {
|
||||
/// A note, appended to the generated string in parenthesis.
|
||||
public let note: NonEmptyString
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SpecificAffectedTargetCategoryIdentifier: EntitySubtype {
|
||||
case `self`
|
||||
case zone
|
||||
case liturgicalChantsAndCeremonies
|
||||
case cantrips
|
||||
case predefined(TargetCategoryReference)
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// _AlternativeNames.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct AlternativeName: EntitySubtype {
|
||||
/// An alternative name of the disease.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The region where this alternative name is used.
|
||||
public let region: NonEmptyString?
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// _ArcaneTradition.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct ArcaneTradition: LocalizableEntity {
|
||||
/// The arcane tradition's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let prerequisites: ArcaneTraditionPrerequisites
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ArcaneTraditionTranslation>
|
||||
}
|
||||
|
||||
public struct ArcaneTraditionTranslation: EntitySubtype {
|
||||
/// The arcane tradition's name.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// _Blessed.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum SkillTradition: EntitySubtype {
|
||||
case generalAspect(AspectReference)
|
||||
case tradition(SkillTraditionWithAspects)
|
||||
}
|
||||
|
||||
public struct SkillTraditionWithAspects: EntitySubtype {
|
||||
/// The blessed tradition.
|
||||
public let tradition: BlessedTraditionReference
|
||||
|
||||
/// The aspect(s) from the tradition the ceremony belongs to. Note that not
|
||||
/// all traditions have aspects. Traditions with aspects must have at least one
|
||||
/// aspect specified.
|
||||
public let aspects: [AspectReference]?
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// _CommonnessRatedAdvantageDisadvantage.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// Reference to a commonness-rated advantage or disadvantage. Commonness-rating terms used in the source books are strongly recommended, common, uncommon, suggested and unsuitable.
|
||||
public struct CommonnessRatedAdvantageDisadvantage<Identifier: EntitySubtype>: EntitySubtype {
|
||||
/// The advantage's or disadvantage's identifier.
|
||||
public let id: Identifier
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// _Dice.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Dice: EntitySubtype {
|
||||
/// Number of dice of the same type. Example: 2 in 2D6.
|
||||
public let number: Int
|
||||
|
||||
/// Number of sides on every die. Example: 6 in 2D6.
|
||||
public let sides: DieType
|
||||
}
|
||||
|
||||
/// Number of sides on every dice. Example: 6 in 2D6.
|
||||
public enum DieType: Int, EntitySubtype {
|
||||
case _3 = 3
|
||||
case _6 = 6
|
||||
case _20 = 20
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// _DiseasePoison.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// Depending on the disease, apply Spirit or Toughness as a penalty to the
|
||||
/// disease roll. It may also happen that the lower of both is applied as a
|
||||
/// penalty.
|
||||
public enum Resistance: String, EntitySubtype {
|
||||
case spirit = "Spirit"
|
||||
case toughness = "Toughness"
|
||||
case lowerOfSpiritAndToughness = "LowerOfSpiritAndToughness"
|
||||
}
|
||||
|
||||
/// What causes the disease? The GM rolls 1D20 to see if a character gets
|
||||
/// infected. If the infection check succeeds, the GM makes a disease check to
|
||||
/// determine the severity of the infection.
|
||||
public struct Cause: EntitySubtype {
|
||||
/// The chance to get infected by this cause, in percent.
|
||||
public let chance: Int?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<CauseTranslation>
|
||||
}
|
||||
|
||||
public struct CauseTranslation: EntitySubtype {
|
||||
/// The name of the cause.
|
||||
public let name: String
|
||||
|
||||
/// The chance to get infected by this cause. If present for this
|
||||
/// language, this overrides the universal `chance` field; they cannot be
|
||||
/// used at the same time.
|
||||
public let chance: NonEmptyString?
|
||||
|
||||
/// An additional note about this cause.
|
||||
public let note: NonEmptyString?
|
||||
}
|
||||
|
||||
public struct DiseaseTranslation: EntitySubtype {
|
||||
/// The name of the disease.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// A list of alternative names.
|
||||
public let alternativeNames: [AlternativeName]?
|
||||
|
||||
/// The disease’s progress, in detail.
|
||||
public let progress: NonEmptyMarkdown
|
||||
|
||||
/// After infection, how much time passes before symptoms appear?
|
||||
public let incubationTime: NonEmptyString
|
||||
|
||||
/// The damage caused by the disease. If the disease check fails, apply the
|
||||
/// lessened effects.
|
||||
public let damage: Reduceable<NonEmptyMarkdown>
|
||||
|
||||
/// The duration of the disease. If the disease check fails, use the
|
||||
/// lessened duration.
|
||||
public let duration: Reduceable<NonEmptyMarkdown>
|
||||
|
||||
/// Special information about the disease.
|
||||
public let special: NonEmptyMarkdown?
|
||||
|
||||
/// Methods known to lessen the disease’s progress or relieve symptoms.
|
||||
public let treatment: NonEmptyMarkdown
|
||||
|
||||
/// Known remedies for the disease.
|
||||
public let cure: NonEmptyMarkdown
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case alternativeNames = "alternative_names"
|
||||
case progress = "progress"
|
||||
case incubationTime = "incubation_time"
|
||||
case damage = "damage"
|
||||
case duration = "duration"
|
||||
case special = "special"
|
||||
case treatment = "treatment"
|
||||
case cure = "cure"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
|
||||
/// An effect or other parameter that may be reduced by a failed disease check
|
||||
/// for lessening or a degraded poison.
|
||||
///
|
||||
/// This streamlines the wording for diseases and poison by using a unified
|
||||
/// wording for *lessened* (disease) and *degraded* (poison).
|
||||
public struct Reduceable<Content: EntitySubtype>: EntitySubtype {
|
||||
/// The default value. In the source, it's the text before the slash.
|
||||
public let `default`: Content
|
||||
|
||||
/// The reduced value. In the source, it's the text after the slash. Some
|
||||
/// entries may not have a reduced value.
|
||||
public let reduced: Content?
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// _Enhancements.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// A list of enhancements.
|
||||
public typealias Enhancements = [Enhancement]
|
||||
|
||||
public struct Enhancement: EntitySubtype {
|
||||
/// The enhancement's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The skill rating required to learn this enhancement.
|
||||
public let skillRating: Int
|
||||
|
||||
/// The value to multiply with the numeric representation of the associated
|
||||
/// skill's improvement cost to form the final AP cost of this enhancement.
|
||||
public let adventurePointsModifier: Int
|
||||
|
||||
public let prerequisites: EnhancementPrerequisites?
|
||||
|
||||
/// Only defined if different than the associated skill.
|
||||
public let src: PublicationRefs?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<EnhancementTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case skillRating = "skill_rating"
|
||||
case adventurePointsModifier = "adventure_points_modifier"
|
||||
case prerequisites = "prerequisites"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct EnhancementTranslation: EntitySubtype {
|
||||
/// The name of the enhancement.
|
||||
public let name: String
|
||||
|
||||
/// The effect description.
|
||||
public let effect: String
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// _I18n.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// The item can be present in multiple pluralization categories; this object
|
||||
/// unifies handling of them. Not all of the options must be present, however,
|
||||
/// every possible category for that language should be defined. This means, that
|
||||
/// different languages may have a different amount of properties defined here.
|
||||
/// More information on pluralization and the Intl.PluralRules API on
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules,
|
||||
/// https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Language_Plural_Rules and
|
||||
/// http://cldr.unicode.org/index/cldr-spec/plural-rules.
|
||||
///
|
||||
/// From the third link:
|
||||
///
|
||||
/// > The minimal pairs are those that are required for correct grammar. So
|
||||
/// > because 0 and 1 don't have to form a minimal pair (it is ok—even though
|
||||
/// > often not optimal—to say '0 people') , 0 doesn't establish a separate
|
||||
/// > category. However, implementations are encouraged to provide the ability to
|
||||
/// > have special plural messages for 0 in particular, so that more natural
|
||||
/// > language can be used:
|
||||
/// >
|
||||
/// > — None of your friends are online.
|
||||
/// >
|
||||
/// > rather than
|
||||
/// >
|
||||
/// > — You have 0 friends online.
|
||||
public struct PluralizationCategories: EntitySubtype {
|
||||
public let zero: NonEmptyString?
|
||||
|
||||
public let one: NonEmptyString?
|
||||
|
||||
public let two: NonEmptyString?
|
||||
|
||||
public let few: NonEmptyString?
|
||||
|
||||
public let many: NonEmptyString?
|
||||
|
||||
public let other: NonEmptyString
|
||||
}
|
||||
|
||||
/// The item can be different for each operating system.
|
||||
public struct VaryBySystem: EntitySubtype {
|
||||
public let mac: NonEmptyString
|
||||
|
||||
public let windows: NonEmptyString
|
||||
|
||||
public let linux: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// _Identifier.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
/* This file has been marked as ignored for generating Swift code. */
|
||||
@@ -0,0 +1,878 @@
|
||||
//
|
||||
// _IdentifierGroup.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public enum ActivatableIdentifier: EntitySubtype {
|
||||
case advantageIdentifier(AdvantageIdentifier)
|
||||
case disadvantageIdentifier(DisadvantageIdentifier)
|
||||
case advancedCombatSpecialAbilityIdentifier(AdvancedCombatSpecialAbilityIdentifier)
|
||||
case advancedKarmaSpecialAbilityIdentifier(AdvancedKarmaSpecialAbilityIdentifier)
|
||||
case advancedMagicalSpecialAbilityIdentifier(AdvancedMagicalSpecialAbilityIdentifier)
|
||||
case advancedSkillSpecialAbilityIdentifier(AdvancedSkillSpecialAbilityIdentifier)
|
||||
case ancestorGlyphIdentifier(AncestorGlyphIdentifier)
|
||||
case arcaneOrbEnchantmentIdentifier(ArcaneOrbEnchantmentIdentifier)
|
||||
case attireEnchantmentIdentifier(AttireEnchantmentIdentifier)
|
||||
case blessedTraditionIdentifier(BlessedTraditionIdentifier)
|
||||
case bowlEnchantmentIdentifier(BowlEnchantmentIdentifier)
|
||||
case brawlingSpecialAbilityIdentifier(BrawlingSpecialAbilityIdentifier)
|
||||
case cauldronEnchantmentIdentifier(CauldronEnchantmentIdentifier)
|
||||
case ceremonialItemSpecialAbilityIdentifier(CeremonialItemSpecialAbilityIdentifier)
|
||||
case chronicleEnchantmentIdentifier(ChronicleEnchantmentIdentifier)
|
||||
case combatSpecialAbilityIdentifier(CombatSpecialAbilityIdentifier)
|
||||
case combatStyleSpecialAbilityIdentifier(CombatStyleSpecialAbilityIdentifier)
|
||||
case commandSpecialAbilityIdentifier(CommandSpecialAbilityIdentifier)
|
||||
case daggerRitualIdentifier(DaggerRitualIdentifier)
|
||||
case familiarSpecialAbilityIdentifier(FamiliarSpecialAbilityIdentifier)
|
||||
case fatePointSexSpecialAbilityIdentifier(FatePointSexSpecialAbilityIdentifier)
|
||||
case fatePointSpecialAbilityIdentifier(FatePointSpecialAbilityIdentifier)
|
||||
case foolsHatEnchantmentIdentifier(FoolsHatEnchantmentIdentifier)
|
||||
case generalSpecialAbilityIdentifier(GeneralSpecialAbilityIdentifier)
|
||||
case instrumentEnchantmentIdentifier(InstrumentEnchantmentIdentifier)
|
||||
case karmaSpecialAbilityIdentifier(KarmaSpecialAbilityIdentifier)
|
||||
case krallenkettenzauberIdentifier(KrallenkettenzauberIdentifier)
|
||||
case liturgicalStyleSpecialAbilityIdentifier(LiturgicalStyleSpecialAbilityIdentifier)
|
||||
case lycantropicGiftIdentifier(LycantropicGiftIdentifier)
|
||||
case magicalSignIdentifier(MagicalSignIdentifier)
|
||||
case magicalSpecialAbilityIdentifier(MagicalSpecialAbilityIdentifier)
|
||||
case magicalTraditionIdentifier(MagicalTraditionIdentifier)
|
||||
case magicStyleSpecialAbilityIdentifier(MagicStyleSpecialAbilityIdentifier)
|
||||
case orbEnchantmentIdentifier(OrbEnchantmentIdentifier)
|
||||
case pactGiftIdentifier(PactGiftIdentifier)
|
||||
case protectiveWardingCircleSpecialAbilityIdentifier(ProtectiveWardingCircleSpecialAbilityIdentifier)
|
||||
case ringEnchantmentIdentifier(RingEnchantmentIdentifier)
|
||||
case sermonIdentifier(SermonIdentifier)
|
||||
case sexSpecialAbilityIdentifier(SexSpecialAbilityIdentifier)
|
||||
case sickleRitualIdentifier(SickleRitualIdentifier)
|
||||
case sikaryanDrainSpecialAbilityIdentifier(SikaryanDrainSpecialAbilityIdentifier)
|
||||
case skillStyleSpecialAbilityIdentifier(SkillStyleSpecialAbilityIdentifier)
|
||||
case spellSwordEnchantmentIdentifier(SpellSwordEnchantmentIdentifier)
|
||||
case staffEnchantmentIdentifier(StaffEnchantmentIdentifier)
|
||||
case toyEnchantmentIdentifier(ToyEnchantmentIdentifier)
|
||||
case trinkhornzauberIdentifier(TrinkhornzauberIdentifier)
|
||||
case vampiricGiftIdentifier(VampiricGiftIdentifier)
|
||||
case visionIdentifier(VisionIdentifier)
|
||||
case wandEnchantmentIdentifier(WandEnchantmentIdentifier)
|
||||
case weaponEnchantmentIdentifier(WeaponEnchantmentIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let advantageIdentifier = try? container.decode(AdvantageIdentifier.self) {
|
||||
self = .advantageIdentifier(advantageIdentifier)
|
||||
} else if let disadvantageIdentifier = try? container.decode(DisadvantageIdentifier.self) {
|
||||
self = .disadvantageIdentifier(disadvantageIdentifier)
|
||||
} else if let advancedCombatSpecialAbilityIdentifier = try? container.decode(AdvancedCombatSpecialAbilityIdentifier.self) {
|
||||
self = .advancedCombatSpecialAbilityIdentifier(advancedCombatSpecialAbilityIdentifier)
|
||||
} else if let advancedKarmaSpecialAbilityIdentifier = try? container.decode(AdvancedKarmaSpecialAbilityIdentifier.self) {
|
||||
self = .advancedKarmaSpecialAbilityIdentifier(advancedKarmaSpecialAbilityIdentifier)
|
||||
} else if let advancedMagicalSpecialAbilityIdentifier = try? container.decode(AdvancedMagicalSpecialAbilityIdentifier.self) {
|
||||
self = .advancedMagicalSpecialAbilityIdentifier(advancedMagicalSpecialAbilityIdentifier)
|
||||
} else if let advancedSkillSpecialAbilityIdentifier = try? container.decode(AdvancedSkillSpecialAbilityIdentifier.self) {
|
||||
self = .advancedSkillSpecialAbilityIdentifier(advancedSkillSpecialAbilityIdentifier)
|
||||
} else if let ancestorGlyphIdentifier = try? container.decode(AncestorGlyphIdentifier.self) {
|
||||
self = .ancestorGlyphIdentifier(ancestorGlyphIdentifier)
|
||||
} else if let arcaneOrbEnchantmentIdentifier = try? container.decode(ArcaneOrbEnchantmentIdentifier.self) {
|
||||
self = .arcaneOrbEnchantmentIdentifier(arcaneOrbEnchantmentIdentifier)
|
||||
} else if let attireEnchantmentIdentifier = try? container.decode(AttireEnchantmentIdentifier.self) {
|
||||
self = .attireEnchantmentIdentifier(attireEnchantmentIdentifier)
|
||||
} else if let blessedTraditionIdentifier = try? container.decode(BlessedTraditionIdentifier.self) {
|
||||
self = .blessedTraditionIdentifier(blessedTraditionIdentifier)
|
||||
} else if let bowlEnchantmentIdentifier = try? container.decode(BowlEnchantmentIdentifier.self) {
|
||||
self = .bowlEnchantmentIdentifier(bowlEnchantmentIdentifier)
|
||||
} else if let brawlingSpecialAbilityIdentifier = try? container.decode(BrawlingSpecialAbilityIdentifier.self) {
|
||||
self = .brawlingSpecialAbilityIdentifier(brawlingSpecialAbilityIdentifier)
|
||||
} else if let cauldronEnchantmentIdentifier = try? container.decode(CauldronEnchantmentIdentifier.self) {
|
||||
self = .cauldronEnchantmentIdentifier(cauldronEnchantmentIdentifier)
|
||||
} else if let ceremonialItemSpecialAbilityIdentifier = try? container.decode(CeremonialItemSpecialAbilityIdentifier.self) {
|
||||
self = .ceremonialItemSpecialAbilityIdentifier(ceremonialItemSpecialAbilityIdentifier)
|
||||
} else if let chronicleEnchantmentIdentifier = try? container.decode(ChronicleEnchantmentIdentifier.self) {
|
||||
self = .chronicleEnchantmentIdentifier(chronicleEnchantmentIdentifier)
|
||||
} else if let combatSpecialAbilityIdentifier = try? container.decode(CombatSpecialAbilityIdentifier.self) {
|
||||
self = .combatSpecialAbilityIdentifier(combatSpecialAbilityIdentifier)
|
||||
} else if let combatStyleSpecialAbilityIdentifier = try? container.decode(CombatStyleSpecialAbilityIdentifier.self) {
|
||||
self = .combatStyleSpecialAbilityIdentifier(combatStyleSpecialAbilityIdentifier)
|
||||
} else if let commandSpecialAbilityIdentifier = try? container.decode(CommandSpecialAbilityIdentifier.self) {
|
||||
self = .commandSpecialAbilityIdentifier(commandSpecialAbilityIdentifier)
|
||||
} else if let daggerRitualIdentifier = try? container.decode(DaggerRitualIdentifier.self) {
|
||||
self = .daggerRitualIdentifier(daggerRitualIdentifier)
|
||||
} else if let familiarSpecialAbilityIdentifier = try? container.decode(FamiliarSpecialAbilityIdentifier.self) {
|
||||
self = .familiarSpecialAbilityIdentifier(familiarSpecialAbilityIdentifier)
|
||||
} else if let fatePointSexSpecialAbilityIdentifier = try? container.decode(FatePointSexSpecialAbilityIdentifier.self) {
|
||||
self = .fatePointSexSpecialAbilityIdentifier(fatePointSexSpecialAbilityIdentifier)
|
||||
} else if let fatePointSpecialAbilityIdentifier = try? container.decode(FatePointSpecialAbilityIdentifier.self) {
|
||||
self = .fatePointSpecialAbilityIdentifier(fatePointSpecialAbilityIdentifier)
|
||||
} else if let foolsHatEnchantmentIdentifier = try? container.decode(FoolsHatEnchantmentIdentifier.self) {
|
||||
self = .foolsHatEnchantmentIdentifier(foolsHatEnchantmentIdentifier)
|
||||
} else if let generalSpecialAbilityIdentifier = try? container.decode(GeneralSpecialAbilityIdentifier.self) {
|
||||
self = .generalSpecialAbilityIdentifier(generalSpecialAbilityIdentifier)
|
||||
} else if let instrumentEnchantmentIdentifier = try? container.decode(InstrumentEnchantmentIdentifier.self) {
|
||||
self = .instrumentEnchantmentIdentifier(instrumentEnchantmentIdentifier)
|
||||
} else if let karmaSpecialAbilityIdentifier = try? container.decode(KarmaSpecialAbilityIdentifier.self) {
|
||||
self = .karmaSpecialAbilityIdentifier(karmaSpecialAbilityIdentifier)
|
||||
} else if let krallenkettenzauberIdentifier = try? container.decode(KrallenkettenzauberIdentifier.self) {
|
||||
self = .krallenkettenzauberIdentifier(krallenkettenzauberIdentifier)
|
||||
} else if let liturgicalStyleSpecialAbilityIdentifier = try? container.decode(LiturgicalStyleSpecialAbilityIdentifier.self) {
|
||||
self = .liturgicalStyleSpecialAbilityIdentifier(liturgicalStyleSpecialAbilityIdentifier)
|
||||
} else if let lycantropicGiftIdentifier = try? container.decode(LycantropicGiftIdentifier.self) {
|
||||
self = .lycantropicGiftIdentifier(lycantropicGiftIdentifier)
|
||||
} else if let magicalSignIdentifier = try? container.decode(MagicalSignIdentifier.self) {
|
||||
self = .magicalSignIdentifier(magicalSignIdentifier)
|
||||
} else if let magicalSpecialAbilityIdentifier = try? container.decode(MagicalSpecialAbilityIdentifier.self) {
|
||||
self = .magicalSpecialAbilityIdentifier(magicalSpecialAbilityIdentifier)
|
||||
} else if let magicalTraditionIdentifier = try? container.decode(MagicalTraditionIdentifier.self) {
|
||||
self = .magicalTraditionIdentifier(magicalTraditionIdentifier)
|
||||
} else if let magicStyleSpecialAbilityIdentifier = try? container.decode(MagicStyleSpecialAbilityIdentifier.self) {
|
||||
self = .magicStyleSpecialAbilityIdentifier(magicStyleSpecialAbilityIdentifier)
|
||||
} else if let orbEnchantmentIdentifier = try? container.decode(OrbEnchantmentIdentifier.self) {
|
||||
self = .orbEnchantmentIdentifier(orbEnchantmentIdentifier)
|
||||
} else if let pactGiftIdentifier = try? container.decode(PactGiftIdentifier.self) {
|
||||
self = .pactGiftIdentifier(pactGiftIdentifier)
|
||||
} else if let protectiveWardingCircleSpecialAbilityIdentifier = try? container.decode(ProtectiveWardingCircleSpecialAbilityIdentifier.self) {
|
||||
self = .protectiveWardingCircleSpecialAbilityIdentifier(protectiveWardingCircleSpecialAbilityIdentifier)
|
||||
} else if let ringEnchantmentIdentifier = try? container.decode(RingEnchantmentIdentifier.self) {
|
||||
self = .ringEnchantmentIdentifier(ringEnchantmentIdentifier)
|
||||
} else if let sermonIdentifier = try? container.decode(SermonIdentifier.self) {
|
||||
self = .sermonIdentifier(sermonIdentifier)
|
||||
} else if let sexSpecialAbilityIdentifier = try? container.decode(SexSpecialAbilityIdentifier.self) {
|
||||
self = .sexSpecialAbilityIdentifier(sexSpecialAbilityIdentifier)
|
||||
} else if let sickleRitualIdentifier = try? container.decode(SickleRitualIdentifier.self) {
|
||||
self = .sickleRitualIdentifier(sickleRitualIdentifier)
|
||||
} else if let sikaryanDrainSpecialAbilityIdentifier = try? container.decode(SikaryanDrainSpecialAbilityIdentifier.self) {
|
||||
self = .sikaryanDrainSpecialAbilityIdentifier(sikaryanDrainSpecialAbilityIdentifier)
|
||||
} else if let skillStyleSpecialAbilityIdentifier = try? container.decode(SkillStyleSpecialAbilityIdentifier.self) {
|
||||
self = .skillStyleSpecialAbilityIdentifier(skillStyleSpecialAbilityIdentifier)
|
||||
} else if let spellSwordEnchantmentIdentifier = try? container.decode(SpellSwordEnchantmentIdentifier.self) {
|
||||
self = .spellSwordEnchantmentIdentifier(spellSwordEnchantmentIdentifier)
|
||||
} else if let staffEnchantmentIdentifier = try? container.decode(StaffEnchantmentIdentifier.self) {
|
||||
self = .staffEnchantmentIdentifier(staffEnchantmentIdentifier)
|
||||
} else if let toyEnchantmentIdentifier = try? container.decode(ToyEnchantmentIdentifier.self) {
|
||||
self = .toyEnchantmentIdentifier(toyEnchantmentIdentifier)
|
||||
} else if let trinkhornzauberIdentifier = try? container.decode(TrinkhornzauberIdentifier.self) {
|
||||
self = .trinkhornzauberIdentifier(trinkhornzauberIdentifier)
|
||||
} else if let vampiricGiftIdentifier = try? container.decode(VampiricGiftIdentifier.self) {
|
||||
self = .vampiricGiftIdentifier(vampiricGiftIdentifier)
|
||||
} else if let visionIdentifier = try? container.decode(VisionIdentifier.self) {
|
||||
self = .visionIdentifier(visionIdentifier)
|
||||
} else if let wandEnchantmentIdentifier = try? container.decode(WandEnchantmentIdentifier.self) {
|
||||
self = .wandEnchantmentIdentifier(wandEnchantmentIdentifier)
|
||||
} else if let weaponEnchantmentIdentifier = try? container.decode(WeaponEnchantmentIdentifier.self) {
|
||||
self = .weaponEnchantmentIdentifier(weaponEnchantmentIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No ActivatableIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SpecialAbilityIdentifier: EntitySubtype {
|
||||
case advancedCombatSpecialAbilityIdentifier(AdvancedCombatSpecialAbilityIdentifier)
|
||||
case advancedKarmaSpecialAbilityIdentifier(AdvancedKarmaSpecialAbilityIdentifier)
|
||||
case advancedMagicalSpecialAbilityIdentifier(AdvancedMagicalSpecialAbilityIdentifier)
|
||||
case advancedSkillSpecialAbilityIdentifier(AdvancedSkillSpecialAbilityIdentifier)
|
||||
case ancestorGlyphIdentifier(AncestorGlyphIdentifier)
|
||||
case arcaneOrbEnchantmentIdentifier(ArcaneOrbEnchantmentIdentifier)
|
||||
case attireEnchantmentIdentifier(AttireEnchantmentIdentifier)
|
||||
case blessedTraditionIdentifier(BlessedTraditionIdentifier)
|
||||
case bowlEnchantmentIdentifier(BowlEnchantmentIdentifier)
|
||||
case brawlingSpecialAbilityIdentifier(BrawlingSpecialAbilityIdentifier)
|
||||
case cauldronEnchantmentIdentifier(CauldronEnchantmentIdentifier)
|
||||
case ceremonialItemSpecialAbilityIdentifier(CeremonialItemSpecialAbilityIdentifier)
|
||||
case chronicleEnchantmentIdentifier(ChronicleEnchantmentIdentifier)
|
||||
case combatSpecialAbilityIdentifier(CombatSpecialAbilityIdentifier)
|
||||
case combatStyleSpecialAbilityIdentifier(CombatStyleSpecialAbilityIdentifier)
|
||||
case commandSpecialAbilityIdentifier(CommandSpecialAbilityIdentifier)
|
||||
case daggerRitualIdentifier(DaggerRitualIdentifier)
|
||||
case familiarSpecialAbilityIdentifier(FamiliarSpecialAbilityIdentifier)
|
||||
case fatePointSexSpecialAbilityIdentifier(FatePointSexSpecialAbilityIdentifier)
|
||||
case fatePointSpecialAbilityIdentifier(FatePointSpecialAbilityIdentifier)
|
||||
case foolsHatEnchantmentIdentifier(FoolsHatEnchantmentIdentifier)
|
||||
case generalSpecialAbilityIdentifier(GeneralSpecialAbilityIdentifier)
|
||||
case instrumentEnchantmentIdentifier(InstrumentEnchantmentIdentifier)
|
||||
case karmaSpecialAbilityIdentifier(KarmaSpecialAbilityIdentifier)
|
||||
case krallenkettenzauberIdentifier(KrallenkettenzauberIdentifier)
|
||||
case liturgicalStyleSpecialAbilityIdentifier(LiturgicalStyleSpecialAbilityIdentifier)
|
||||
case lycantropicGiftIdentifier(LycantropicGiftIdentifier)
|
||||
case magicalSignIdentifier(MagicalSignIdentifier)
|
||||
case magicalSpecialAbilityIdentifier(MagicalSpecialAbilityIdentifier)
|
||||
case magicalTraditionIdentifier(MagicalTraditionIdentifier)
|
||||
case magicStyleSpecialAbilityIdentifier(MagicStyleSpecialAbilityIdentifier)
|
||||
case orbEnchantmentIdentifier(OrbEnchantmentIdentifier)
|
||||
case pactGiftIdentifier(PactGiftIdentifier)
|
||||
case protectiveWardingCircleSpecialAbilityIdentifier(ProtectiveWardingCircleSpecialAbilityIdentifier)
|
||||
case ringEnchantmentIdentifier(RingEnchantmentIdentifier)
|
||||
case sermonIdentifier(SermonIdentifier)
|
||||
case sexSpecialAbilityIdentifier(SexSpecialAbilityIdentifier)
|
||||
case sickleRitualIdentifier(SickleRitualIdentifier)
|
||||
case sikaryanDrainSpecialAbilityIdentifier(SikaryanDrainSpecialAbilityIdentifier)
|
||||
case skillStyleSpecialAbilityIdentifier(SkillStyleSpecialAbilityIdentifier)
|
||||
case spellSwordEnchantmentIdentifier(SpellSwordEnchantmentIdentifier)
|
||||
case staffEnchantmentIdentifier(StaffEnchantmentIdentifier)
|
||||
case toyEnchantmentIdentifier(ToyEnchantmentIdentifier)
|
||||
case trinkhornzauberIdentifier(TrinkhornzauberIdentifier)
|
||||
case vampiricGiftIdentifier(VampiricGiftIdentifier)
|
||||
case visionIdentifier(VisionIdentifier)
|
||||
case wandEnchantmentIdentifier(WandEnchantmentIdentifier)
|
||||
case weaponEnchantmentIdentifier(WeaponEnchantmentIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let advancedCombatSpecialAbilityIdentifier = try? container.decode(AdvancedCombatSpecialAbilityIdentifier.self) {
|
||||
self = .advancedCombatSpecialAbilityIdentifier(advancedCombatSpecialAbilityIdentifier)
|
||||
} else if let advancedKarmaSpecialAbilityIdentifier = try? container.decode(AdvancedKarmaSpecialAbilityIdentifier.self) {
|
||||
self = .advancedKarmaSpecialAbilityIdentifier(advancedKarmaSpecialAbilityIdentifier)
|
||||
} else if let advancedMagicalSpecialAbilityIdentifier = try? container.decode(AdvancedMagicalSpecialAbilityIdentifier.self) {
|
||||
self = .advancedMagicalSpecialAbilityIdentifier(advancedMagicalSpecialAbilityIdentifier)
|
||||
} else if let advancedSkillSpecialAbilityIdentifier = try? container.decode(AdvancedSkillSpecialAbilityIdentifier.self) {
|
||||
self = .advancedSkillSpecialAbilityIdentifier(advancedSkillSpecialAbilityIdentifier)
|
||||
} else if let ancestorGlyphIdentifier = try? container.decode(AncestorGlyphIdentifier.self) {
|
||||
self = .ancestorGlyphIdentifier(ancestorGlyphIdentifier)
|
||||
} else if let arcaneOrbEnchantmentIdentifier = try? container.decode(ArcaneOrbEnchantmentIdentifier.self) {
|
||||
self = .arcaneOrbEnchantmentIdentifier(arcaneOrbEnchantmentIdentifier)
|
||||
} else if let attireEnchantmentIdentifier = try? container.decode(AttireEnchantmentIdentifier.self) {
|
||||
self = .attireEnchantmentIdentifier(attireEnchantmentIdentifier)
|
||||
} else if let blessedTraditionIdentifier = try? container.decode(BlessedTraditionIdentifier.self) {
|
||||
self = .blessedTraditionIdentifier(blessedTraditionIdentifier)
|
||||
} else if let bowlEnchantmentIdentifier = try? container.decode(BowlEnchantmentIdentifier.self) {
|
||||
self = .bowlEnchantmentIdentifier(bowlEnchantmentIdentifier)
|
||||
} else if let brawlingSpecialAbilityIdentifier = try? container.decode(BrawlingSpecialAbilityIdentifier.self) {
|
||||
self = .brawlingSpecialAbilityIdentifier(brawlingSpecialAbilityIdentifier)
|
||||
} else if let cauldronEnchantmentIdentifier = try? container.decode(CauldronEnchantmentIdentifier.self) {
|
||||
self = .cauldronEnchantmentIdentifier(cauldronEnchantmentIdentifier)
|
||||
} else if let ceremonialItemSpecialAbilityIdentifier = try? container.decode(CeremonialItemSpecialAbilityIdentifier.self) {
|
||||
self = .ceremonialItemSpecialAbilityIdentifier(ceremonialItemSpecialAbilityIdentifier)
|
||||
} else if let chronicleEnchantmentIdentifier = try? container.decode(ChronicleEnchantmentIdentifier.self) {
|
||||
self = .chronicleEnchantmentIdentifier(chronicleEnchantmentIdentifier)
|
||||
} else if let combatSpecialAbilityIdentifier = try? container.decode(CombatSpecialAbilityIdentifier.self) {
|
||||
self = .combatSpecialAbilityIdentifier(combatSpecialAbilityIdentifier)
|
||||
} else if let combatStyleSpecialAbilityIdentifier = try? container.decode(CombatStyleSpecialAbilityIdentifier.self) {
|
||||
self = .combatStyleSpecialAbilityIdentifier(combatStyleSpecialAbilityIdentifier)
|
||||
} else if let commandSpecialAbilityIdentifier = try? container.decode(CommandSpecialAbilityIdentifier.self) {
|
||||
self = .commandSpecialAbilityIdentifier(commandSpecialAbilityIdentifier)
|
||||
} else if let daggerRitualIdentifier = try? container.decode(DaggerRitualIdentifier.self) {
|
||||
self = .daggerRitualIdentifier(daggerRitualIdentifier)
|
||||
} else if let familiarSpecialAbilityIdentifier = try? container.decode(FamiliarSpecialAbilityIdentifier.self) {
|
||||
self = .familiarSpecialAbilityIdentifier(familiarSpecialAbilityIdentifier)
|
||||
} else if let fatePointSexSpecialAbilityIdentifier = try? container.decode(FatePointSexSpecialAbilityIdentifier.self) {
|
||||
self = .fatePointSexSpecialAbilityIdentifier(fatePointSexSpecialAbilityIdentifier)
|
||||
} else if let fatePointSpecialAbilityIdentifier = try? container.decode(FatePointSpecialAbilityIdentifier.self) {
|
||||
self = .fatePointSpecialAbilityIdentifier(fatePointSpecialAbilityIdentifier)
|
||||
} else if let foolsHatEnchantmentIdentifier = try? container.decode(FoolsHatEnchantmentIdentifier.self) {
|
||||
self = .foolsHatEnchantmentIdentifier(foolsHatEnchantmentIdentifier)
|
||||
} else if let generalSpecialAbilityIdentifier = try? container.decode(GeneralSpecialAbilityIdentifier.self) {
|
||||
self = .generalSpecialAbilityIdentifier(generalSpecialAbilityIdentifier)
|
||||
} else if let instrumentEnchantmentIdentifier = try? container.decode(InstrumentEnchantmentIdentifier.self) {
|
||||
self = .instrumentEnchantmentIdentifier(instrumentEnchantmentIdentifier)
|
||||
} else if let karmaSpecialAbilityIdentifier = try? container.decode(KarmaSpecialAbilityIdentifier.self) {
|
||||
self = .karmaSpecialAbilityIdentifier(karmaSpecialAbilityIdentifier)
|
||||
} else if let krallenkettenzauberIdentifier = try? container.decode(KrallenkettenzauberIdentifier.self) {
|
||||
self = .krallenkettenzauberIdentifier(krallenkettenzauberIdentifier)
|
||||
} else if let liturgicalStyleSpecialAbilityIdentifier = try? container.decode(LiturgicalStyleSpecialAbilityIdentifier.self) {
|
||||
self = .liturgicalStyleSpecialAbilityIdentifier(liturgicalStyleSpecialAbilityIdentifier)
|
||||
} else if let lycantropicGiftIdentifier = try? container.decode(LycantropicGiftIdentifier.self) {
|
||||
self = .lycantropicGiftIdentifier(lycantropicGiftIdentifier)
|
||||
} else if let magicalSignIdentifier = try? container.decode(MagicalSignIdentifier.self) {
|
||||
self = .magicalSignIdentifier(magicalSignIdentifier)
|
||||
} else if let magicalSpecialAbilityIdentifier = try? container.decode(MagicalSpecialAbilityIdentifier.self) {
|
||||
self = .magicalSpecialAbilityIdentifier(magicalSpecialAbilityIdentifier)
|
||||
} else if let magicalTraditionIdentifier = try? container.decode(MagicalTraditionIdentifier.self) {
|
||||
self = .magicalTraditionIdentifier(magicalTraditionIdentifier)
|
||||
} else if let magicStyleSpecialAbilityIdentifier = try? container.decode(MagicStyleSpecialAbilityIdentifier.self) {
|
||||
self = .magicStyleSpecialAbilityIdentifier(magicStyleSpecialAbilityIdentifier)
|
||||
} else if let orbEnchantmentIdentifier = try? container.decode(OrbEnchantmentIdentifier.self) {
|
||||
self = .orbEnchantmentIdentifier(orbEnchantmentIdentifier)
|
||||
} else if let pactGiftIdentifier = try? container.decode(PactGiftIdentifier.self) {
|
||||
self = .pactGiftIdentifier(pactGiftIdentifier)
|
||||
} else if let protectiveWardingCircleSpecialAbilityIdentifier = try? container.decode(ProtectiveWardingCircleSpecialAbilityIdentifier.self) {
|
||||
self = .protectiveWardingCircleSpecialAbilityIdentifier(protectiveWardingCircleSpecialAbilityIdentifier)
|
||||
} else if let ringEnchantmentIdentifier = try? container.decode(RingEnchantmentIdentifier.self) {
|
||||
self = .ringEnchantmentIdentifier(ringEnchantmentIdentifier)
|
||||
} else if let sermonIdentifier = try? container.decode(SermonIdentifier.self) {
|
||||
self = .sermonIdentifier(sermonIdentifier)
|
||||
} else if let sexSpecialAbilityIdentifier = try? container.decode(SexSpecialAbilityIdentifier.self) {
|
||||
self = .sexSpecialAbilityIdentifier(sexSpecialAbilityIdentifier)
|
||||
} else if let sickleRitualIdentifier = try? container.decode(SickleRitualIdentifier.self) {
|
||||
self = .sickleRitualIdentifier(sickleRitualIdentifier)
|
||||
} else if let sikaryanDrainSpecialAbilityIdentifier = try? container.decode(SikaryanDrainSpecialAbilityIdentifier.self) {
|
||||
self = .sikaryanDrainSpecialAbilityIdentifier(sikaryanDrainSpecialAbilityIdentifier)
|
||||
} else if let skillStyleSpecialAbilityIdentifier = try? container.decode(SkillStyleSpecialAbilityIdentifier.self) {
|
||||
self = .skillStyleSpecialAbilityIdentifier(skillStyleSpecialAbilityIdentifier)
|
||||
} else if let spellSwordEnchantmentIdentifier = try? container.decode(SpellSwordEnchantmentIdentifier.self) {
|
||||
self = .spellSwordEnchantmentIdentifier(spellSwordEnchantmentIdentifier)
|
||||
} else if let staffEnchantmentIdentifier = try? container.decode(StaffEnchantmentIdentifier.self) {
|
||||
self = .staffEnchantmentIdentifier(staffEnchantmentIdentifier)
|
||||
} else if let toyEnchantmentIdentifier = try? container.decode(ToyEnchantmentIdentifier.self) {
|
||||
self = .toyEnchantmentIdentifier(toyEnchantmentIdentifier)
|
||||
} else if let trinkhornzauberIdentifier = try? container.decode(TrinkhornzauberIdentifier.self) {
|
||||
self = .trinkhornzauberIdentifier(trinkhornzauberIdentifier)
|
||||
} else if let vampiricGiftIdentifier = try? container.decode(VampiricGiftIdentifier.self) {
|
||||
self = .vampiricGiftIdentifier(vampiricGiftIdentifier)
|
||||
} else if let visionIdentifier = try? container.decode(VisionIdentifier.self) {
|
||||
self = .visionIdentifier(visionIdentifier)
|
||||
} else if let wandEnchantmentIdentifier = try? container.decode(WandEnchantmentIdentifier.self) {
|
||||
self = .wandEnchantmentIdentifier(wandEnchantmentIdentifier)
|
||||
} else if let weaponEnchantmentIdentifier = try? container.decode(WeaponEnchantmentIdentifier.self) {
|
||||
self = .weaponEnchantmentIdentifier(weaponEnchantmentIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No SpecialAbilityIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum CombatRelatedSpecialAbilityIdentifier: EntitySubtype {
|
||||
case combatSpecialAbilityIdentifier(CombatSpecialAbilityIdentifier)
|
||||
case combatStyleSpecialAbilityIdentifier(CombatStyleSpecialAbilityIdentifier)
|
||||
case advancedCombatSpecialAbilityIdentifier(AdvancedCombatSpecialAbilityIdentifier)
|
||||
case commandSpecialAbilityIdentifier(CommandSpecialAbilityIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let combatSpecialAbilityIdentifier = try? container.decode(CombatSpecialAbilityIdentifier.self) {
|
||||
self = .combatSpecialAbilityIdentifier(combatSpecialAbilityIdentifier)
|
||||
} else if let combatStyleSpecialAbilityIdentifier = try? container.decode(CombatStyleSpecialAbilityIdentifier.self) {
|
||||
self = .combatStyleSpecialAbilityIdentifier(combatStyleSpecialAbilityIdentifier)
|
||||
} else if let advancedCombatSpecialAbilityIdentifier = try? container.decode(AdvancedCombatSpecialAbilityIdentifier.self) {
|
||||
self = .advancedCombatSpecialAbilityIdentifier(advancedCombatSpecialAbilityIdentifier)
|
||||
} else if let commandSpecialAbilityIdentifier = try? container.decode(CommandSpecialAbilityIdentifier.self) {
|
||||
self = .commandSpecialAbilityIdentifier(commandSpecialAbilityIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No CombatRelatedSpecialAbilityIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum TraditionIdentifier: EntitySubtype {
|
||||
case magicalTraditionIdentifier(MagicalTraditionIdentifier)
|
||||
case blessedTraditionIdentifier(BlessedTraditionIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let magicalTraditionIdentifier = try? container.decode(MagicalTraditionIdentifier.self) {
|
||||
self = .magicalTraditionIdentifier(magicalTraditionIdentifier)
|
||||
} else if let blessedTraditionIdentifier = try? container.decode(BlessedTraditionIdentifier.self) {
|
||||
self = .blessedTraditionIdentifier(blessedTraditionIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No TraditionIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum RatedIdentifier: EntitySubtype {
|
||||
case attributeIdentifier(AttributeIdentifier)
|
||||
case skillIdentifier(SkillIdentifier)
|
||||
case closeCombatTechniqueIdentifier(CloseCombatTechniqueIdentifier)
|
||||
case rangedCombatTechniqueIdentifier(RangedCombatTechniqueIdentifier)
|
||||
case spellIdentifier(SpellIdentifier)
|
||||
case ritualIdentifier(RitualIdentifier)
|
||||
case liturgicalChantIdentifier(LiturgicalChantIdentifier)
|
||||
case ceremonyIdentifier(CeremonyIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let attributeIdentifier = try? container.decode(AttributeIdentifier.self) {
|
||||
self = .attributeIdentifier(attributeIdentifier)
|
||||
} else if let skillIdentifier = try? container.decode(SkillIdentifier.self) {
|
||||
self = .skillIdentifier(skillIdentifier)
|
||||
} else if let closeCombatTechniqueIdentifier = try? container.decode(CloseCombatTechniqueIdentifier.self) {
|
||||
self = .closeCombatTechniqueIdentifier(closeCombatTechniqueIdentifier)
|
||||
} else if let rangedCombatTechniqueIdentifier = try? container.decode(RangedCombatTechniqueIdentifier.self) {
|
||||
self = .rangedCombatTechniqueIdentifier(rangedCombatTechniqueIdentifier)
|
||||
} else if let spellIdentifier = try? container.decode(SpellIdentifier.self) {
|
||||
self = .spellIdentifier(spellIdentifier)
|
||||
} else if let ritualIdentifier = try? container.decode(RitualIdentifier.self) {
|
||||
self = .ritualIdentifier(ritualIdentifier)
|
||||
} else if let liturgicalChantIdentifier = try? container.decode(LiturgicalChantIdentifier.self) {
|
||||
self = .liturgicalChantIdentifier(liturgicalChantIdentifier)
|
||||
} else if let ceremonyIdentifier = try? container.decode(CeremonyIdentifier.self) {
|
||||
self = .ceremonyIdentifier(ceremonyIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No RatedIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SkillishIdentifier: EntitySubtype {
|
||||
case skillIdentifier(SkillIdentifier)
|
||||
case spellIdentifier(SpellIdentifier)
|
||||
case ritualIdentifier(RitualIdentifier)
|
||||
case liturgicalChantIdentifier(LiturgicalChantIdentifier)
|
||||
case ceremonyIdentifier(CeremonyIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let skillIdentifier = try? container.decode(SkillIdentifier.self) {
|
||||
self = .skillIdentifier(skillIdentifier)
|
||||
} else if let spellIdentifier = try? container.decode(SpellIdentifier.self) {
|
||||
self = .spellIdentifier(spellIdentifier)
|
||||
} else if let ritualIdentifier = try? container.decode(RitualIdentifier.self) {
|
||||
self = .ritualIdentifier(ritualIdentifier)
|
||||
} else if let liturgicalChantIdentifier = try? container.decode(LiturgicalChantIdentifier.self) {
|
||||
self = .liturgicalChantIdentifier(liturgicalChantIdentifier)
|
||||
} else if let ceremonyIdentifier = try? container.decode(CeremonyIdentifier.self) {
|
||||
self = .ceremonyIdentifier(ceremonyIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No SkillishIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum AdvancedSpecialAbilityRestrictedOptionIdentifier: EntitySubtype {
|
||||
case generalIdentifier(GeneralIdentifier)
|
||||
case skillIdentifier(SkillIdentifier)
|
||||
case elementIdentifier(ElementIdentifier)
|
||||
case aspectIdentifier(AspectIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let generalIdentifier = try? container.decode(GeneralIdentifier.self) {
|
||||
self = .generalIdentifier(generalIdentifier)
|
||||
} else if let skillIdentifier = try? container.decode(SkillIdentifier.self) {
|
||||
self = .skillIdentifier(skillIdentifier)
|
||||
} else if let elementIdentifier = try? container.decode(ElementIdentifier.self) {
|
||||
self = .elementIdentifier(elementIdentifier)
|
||||
} else if let aspectIdentifier = try? container.decode(AspectIdentifier.self) {
|
||||
self = .aspectIdentifier(aspectIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No AdvancedSpecialAbilityRestrictedOptionIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum VolumePointsOptionReferenceIdentifier: EntitySubtype {
|
||||
case generalIdentifier(GeneralIdentifier)
|
||||
case animalShapeSizeIdentifier(AnimalShapeSizeIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let generalIdentifier = try? container.decode(GeneralIdentifier.self) {
|
||||
self = .generalIdentifier(generalIdentifier)
|
||||
} else if let animalShapeSizeIdentifier = try? container.decode(AnimalShapeSizeIdentifier.self) {
|
||||
self = .animalShapeSizeIdentifier(animalShapeSizeIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No VolumePointsOptionReferenceIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum CombatTechniqueIdentifier: EntitySubtype {
|
||||
case closeCombatTechniqueIdentifier(CloseCombatTechniqueIdentifier)
|
||||
case rangedCombatTechniqueIdentifier(RangedCombatTechniqueIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let closeCombatTechniqueIdentifier = try? container.decode(CloseCombatTechniqueIdentifier.self) {
|
||||
self = .closeCombatTechniqueIdentifier(closeCombatTechniqueIdentifier)
|
||||
} else if let rangedCombatTechniqueIdentifier = try? container.decode(RangedCombatTechniqueIdentifier.self) {
|
||||
self = .rangedCombatTechniqueIdentifier(rangedCombatTechniqueIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No CombatTechniqueIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum ExtensionRuleIdentifier: EntitySubtype {
|
||||
case focusRuleIdentifier(FocusRuleIdentifier)
|
||||
case optionalRuleIdentifier(OptionalRuleIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let focusRuleIdentifier = try? container.decode(FocusRuleIdentifier.self) {
|
||||
self = .focusRuleIdentifier(focusRuleIdentifier)
|
||||
} else if let optionalRuleIdentifier = try? container.decode(OptionalRuleIdentifier.self) {
|
||||
self = .optionalRuleIdentifier(optionalRuleIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No ExtensionRuleIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SkillWithEnhancementsIdentifier: EntitySubtype {
|
||||
case spellIdentifier(SpellIdentifier)
|
||||
case ritualIdentifier(RitualIdentifier)
|
||||
case liturgicalChantIdentifier(LiturgicalChantIdentifier)
|
||||
case ceremonyIdentifier(CeremonyIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let spellIdentifier = try? container.decode(SpellIdentifier.self) {
|
||||
self = .spellIdentifier(spellIdentifier)
|
||||
} else if let ritualIdentifier = try? container.decode(RitualIdentifier.self) {
|
||||
self = .ritualIdentifier(ritualIdentifier)
|
||||
} else if let liturgicalChantIdentifier = try? container.decode(LiturgicalChantIdentifier.self) {
|
||||
self = .liturgicalChantIdentifier(liturgicalChantIdentifier)
|
||||
} else if let ceremonyIdentifier = try? container.decode(CeremonyIdentifier.self) {
|
||||
self = .ceremonyIdentifier(ceremonyIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No SkillWithEnhancementsIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SpellworkIdentifier: EntitySubtype {
|
||||
case spellIdentifier(SpellIdentifier)
|
||||
case ritualIdentifier(RitualIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let spellIdentifier = try? container.decode(SpellIdentifier.self) {
|
||||
self = .spellIdentifier(spellIdentifier)
|
||||
} else if let ritualIdentifier = try? container.decode(RitualIdentifier.self) {
|
||||
self = .ritualIdentifier(ritualIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No SpellworkIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum LiturgyIdentifier: EntitySubtype {
|
||||
case liturgicalChantIdentifier(LiturgicalChantIdentifier)
|
||||
case ceremonyIdentifier(CeremonyIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let liturgicalChantIdentifier = try? container.decode(LiturgicalChantIdentifier.self) {
|
||||
self = .liturgicalChantIdentifier(liturgicalChantIdentifier)
|
||||
} else if let ceremonyIdentifier = try? container.decode(CeremonyIdentifier.self) {
|
||||
self = .ceremonyIdentifier(ceremonyIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No LiturgyIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum MagicalActionIdentifier: EntitySubtype {
|
||||
case curseIdentifier(CurseIdentifier)
|
||||
case elvenMagicalSongIdentifier(ElvenMagicalSongIdentifier)
|
||||
case dominationRitualIdentifier(DominationRitualIdentifier)
|
||||
case magicalMelodyIdentifier(MagicalMelodyIdentifier)
|
||||
case magicalDanceIdentifier(MagicalDanceIdentifier)
|
||||
case jesterTrickIdentifier(JesterTrickIdentifier)
|
||||
case animistPowerIdentifier(AnimistPowerIdentifier)
|
||||
case geodeRitualIdentifier(GeodeRitualIdentifier)
|
||||
case zibiljaRitualIdentifier(ZibiljaRitualIdentifier)
|
||||
case magicalRuneIdentifier(MagicalRuneIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let curseIdentifier = try? container.decode(CurseIdentifier.self) {
|
||||
self = .curseIdentifier(curseIdentifier)
|
||||
} else if let elvenMagicalSongIdentifier = try? container.decode(ElvenMagicalSongIdentifier.self) {
|
||||
self = .elvenMagicalSongIdentifier(elvenMagicalSongIdentifier)
|
||||
} else if let dominationRitualIdentifier = try? container.decode(DominationRitualIdentifier.self) {
|
||||
self = .dominationRitualIdentifier(dominationRitualIdentifier)
|
||||
} else if let magicalMelodyIdentifier = try? container.decode(MagicalMelodyIdentifier.self) {
|
||||
self = .magicalMelodyIdentifier(magicalMelodyIdentifier)
|
||||
} else if let magicalDanceIdentifier = try? container.decode(MagicalDanceIdentifier.self) {
|
||||
self = .magicalDanceIdentifier(magicalDanceIdentifier)
|
||||
} else if let jesterTrickIdentifier = try? container.decode(JesterTrickIdentifier.self) {
|
||||
self = .jesterTrickIdentifier(jesterTrickIdentifier)
|
||||
} else if let animistPowerIdentifier = try? container.decode(AnimistPowerIdentifier.self) {
|
||||
self = .animistPowerIdentifier(animistPowerIdentifier)
|
||||
} else if let geodeRitualIdentifier = try? container.decode(GeodeRitualIdentifier.self) {
|
||||
self = .geodeRitualIdentifier(geodeRitualIdentifier)
|
||||
} else if let zibiljaRitualIdentifier = try? container.decode(ZibiljaRitualIdentifier.self) {
|
||||
self = .zibiljaRitualIdentifier(zibiljaRitualIdentifier)
|
||||
} else if let magicalRuneIdentifier = try? container.decode(MagicalRuneIdentifier.self) {
|
||||
self = .magicalRuneIdentifier(magicalRuneIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No MagicalActionIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SelectOptionIdentifier: EntitySubtype {
|
||||
case generalIdentifier(GeneralIdentifier)
|
||||
case blessingIdentifier(BlessingIdentifier)
|
||||
case cantripIdentifier(CantripIdentifier)
|
||||
case tradeSecretIdentifier(TradeSecretIdentifier)
|
||||
case scriptIdentifier(ScriptIdentifier)
|
||||
case animalShapeIdentifier(AnimalShapeIdentifier)
|
||||
case arcaneBardTraditionIdentifier(ArcaneBardTraditionIdentifier)
|
||||
case arcaneDancerTraditionIdentifier(ArcaneDancerTraditionIdentifier)
|
||||
case sexPracticeIdentifier(SexPracticeIdentifier)
|
||||
case raceIdentifier(RaceIdentifier)
|
||||
case cultureIdentifier(CultureIdentifier)
|
||||
case blessedTraditionIdentifier(BlessedTraditionIdentifier)
|
||||
case elementIdentifier(ElementIdentifier)
|
||||
case propertyIdentifier(PropertyIdentifier)
|
||||
case aspectIdentifier(AspectIdentifier)
|
||||
case diseaseIdentifier(DiseaseIdentifier)
|
||||
case poisonIdentifier(PoisonIdentifier)
|
||||
case languageIdentifier(LanguageIdentifier)
|
||||
case skillIdentifier(SkillIdentifier)
|
||||
case closeCombatTechniqueIdentifier(CloseCombatTechniqueIdentifier)
|
||||
case rangedCombatTechniqueIdentifier(RangedCombatTechniqueIdentifier)
|
||||
case liturgicalChantIdentifier(LiturgicalChantIdentifier)
|
||||
case ceremonyIdentifier(CeremonyIdentifier)
|
||||
case spellIdentifier(SpellIdentifier)
|
||||
case ritualIdentifier(RitualIdentifier)
|
||||
case targetCategoryIdentifier(TargetCategoryIdentifier)
|
||||
case patronIdentifier(PatronIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let generalIdentifier = try? container.decode(GeneralIdentifier.self) {
|
||||
self = .generalIdentifier(generalIdentifier)
|
||||
} else if let blessingIdentifier = try? container.decode(BlessingIdentifier.self) {
|
||||
self = .blessingIdentifier(blessingIdentifier)
|
||||
} else if let cantripIdentifier = try? container.decode(CantripIdentifier.self) {
|
||||
self = .cantripIdentifier(cantripIdentifier)
|
||||
} else if let tradeSecretIdentifier = try? container.decode(TradeSecretIdentifier.self) {
|
||||
self = .tradeSecretIdentifier(tradeSecretIdentifier)
|
||||
} else if let scriptIdentifier = try? container.decode(ScriptIdentifier.self) {
|
||||
self = .scriptIdentifier(scriptIdentifier)
|
||||
} else if let animalShapeIdentifier = try? container.decode(AnimalShapeIdentifier.self) {
|
||||
self = .animalShapeIdentifier(animalShapeIdentifier)
|
||||
} else if let arcaneBardTraditionIdentifier = try? container.decode(ArcaneBardTraditionIdentifier.self) {
|
||||
self = .arcaneBardTraditionIdentifier(arcaneBardTraditionIdentifier)
|
||||
} else if let arcaneDancerTraditionIdentifier = try? container.decode(ArcaneDancerTraditionIdentifier.self) {
|
||||
self = .arcaneDancerTraditionIdentifier(arcaneDancerTraditionIdentifier)
|
||||
} else if let sexPracticeIdentifier = try? container.decode(SexPracticeIdentifier.self) {
|
||||
self = .sexPracticeIdentifier(sexPracticeIdentifier)
|
||||
} else if let raceIdentifier = try? container.decode(RaceIdentifier.self) {
|
||||
self = .raceIdentifier(raceIdentifier)
|
||||
} else if let cultureIdentifier = try? container.decode(CultureIdentifier.self) {
|
||||
self = .cultureIdentifier(cultureIdentifier)
|
||||
} else if let blessedTraditionIdentifier = try? container.decode(BlessedTraditionIdentifier.self) {
|
||||
self = .blessedTraditionIdentifier(blessedTraditionIdentifier)
|
||||
} else if let elementIdentifier = try? container.decode(ElementIdentifier.self) {
|
||||
self = .elementIdentifier(elementIdentifier)
|
||||
} else if let propertyIdentifier = try? container.decode(PropertyIdentifier.self) {
|
||||
self = .propertyIdentifier(propertyIdentifier)
|
||||
} else if let aspectIdentifier = try? container.decode(AspectIdentifier.self) {
|
||||
self = .aspectIdentifier(aspectIdentifier)
|
||||
} else if let diseaseIdentifier = try? container.decode(DiseaseIdentifier.self) {
|
||||
self = .diseaseIdentifier(diseaseIdentifier)
|
||||
} else if let poisonIdentifier = try? container.decode(PoisonIdentifier.self) {
|
||||
self = .poisonIdentifier(poisonIdentifier)
|
||||
} else if let languageIdentifier = try? container.decode(LanguageIdentifier.self) {
|
||||
self = .languageIdentifier(languageIdentifier)
|
||||
} else if let skillIdentifier = try? container.decode(SkillIdentifier.self) {
|
||||
self = .skillIdentifier(skillIdentifier)
|
||||
} else if let closeCombatTechniqueIdentifier = try? container.decode(CloseCombatTechniqueIdentifier.self) {
|
||||
self = .closeCombatTechniqueIdentifier(closeCombatTechniqueIdentifier)
|
||||
} else if let rangedCombatTechniqueIdentifier = try? container.decode(RangedCombatTechniqueIdentifier.self) {
|
||||
self = .rangedCombatTechniqueIdentifier(rangedCombatTechniqueIdentifier)
|
||||
} else if let liturgicalChantIdentifier = try? container.decode(LiturgicalChantIdentifier.self) {
|
||||
self = .liturgicalChantIdentifier(liturgicalChantIdentifier)
|
||||
} else if let ceremonyIdentifier = try? container.decode(CeremonyIdentifier.self) {
|
||||
self = .ceremonyIdentifier(ceremonyIdentifier)
|
||||
} else if let spellIdentifier = try? container.decode(SpellIdentifier.self) {
|
||||
self = .spellIdentifier(spellIdentifier)
|
||||
} else if let ritualIdentifier = try? container.decode(RitualIdentifier.self) {
|
||||
self = .ritualIdentifier(ritualIdentifier)
|
||||
} else if let targetCategoryIdentifier = try? container.decode(TargetCategoryIdentifier.self) {
|
||||
self = .targetCategoryIdentifier(targetCategoryIdentifier)
|
||||
} else if let patronIdentifier = try? container.decode(PatronIdentifier.self) {
|
||||
self = .patronIdentifier(patronIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No SelectOptionIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum RequirableSelectOptionIdentifier: EntitySubtype {
|
||||
case generalIdentifier(GeneralIdentifier)
|
||||
case skillIdentifier(SkillIdentifier)
|
||||
case closeCombatTechniqueIdentifier(CloseCombatTechniqueIdentifier)
|
||||
case rangedCombatTechniqueIdentifier(RangedCombatTechniqueIdentifier)
|
||||
case propertyIdentifier(PropertyIdentifier)
|
||||
case aspectIdentifier(AspectIdentifier)
|
||||
case languageIdentifier(LanguageIdentifier)
|
||||
case animalShapeIdentifier(AnimalShapeIdentifier)
|
||||
case liturgicalChantIdentifier(LiturgicalChantIdentifier)
|
||||
case ceremonyIdentifier(CeremonyIdentifier)
|
||||
case spellIdentifier(SpellIdentifier)
|
||||
case ritualIdentifier(RitualIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let generalIdentifier = try? container.decode(GeneralIdentifier.self) {
|
||||
self = .generalIdentifier(generalIdentifier)
|
||||
} else if let skillIdentifier = try? container.decode(SkillIdentifier.self) {
|
||||
self = .skillIdentifier(skillIdentifier)
|
||||
} else if let closeCombatTechniqueIdentifier = try? container.decode(CloseCombatTechniqueIdentifier.self) {
|
||||
self = .closeCombatTechniqueIdentifier(closeCombatTechniqueIdentifier)
|
||||
} else if let rangedCombatTechniqueIdentifier = try? container.decode(RangedCombatTechniqueIdentifier.self) {
|
||||
self = .rangedCombatTechniqueIdentifier(rangedCombatTechniqueIdentifier)
|
||||
} else if let propertyIdentifier = try? container.decode(PropertyIdentifier.self) {
|
||||
self = .propertyIdentifier(propertyIdentifier)
|
||||
} else if let aspectIdentifier = try? container.decode(AspectIdentifier.self) {
|
||||
self = .aspectIdentifier(aspectIdentifier)
|
||||
} else if let languageIdentifier = try? container.decode(LanguageIdentifier.self) {
|
||||
self = .languageIdentifier(languageIdentifier)
|
||||
} else if let animalShapeIdentifier = try? container.decode(AnimalShapeIdentifier.self) {
|
||||
self = .animalShapeIdentifier(animalShapeIdentifier)
|
||||
} else if let liturgicalChantIdentifier = try? container.decode(LiturgicalChantIdentifier.self) {
|
||||
self = .liturgicalChantIdentifier(liturgicalChantIdentifier)
|
||||
} else if let ceremonyIdentifier = try? container.decode(CeremonyIdentifier.self) {
|
||||
self = .ceremonyIdentifier(ceremonyIdentifier)
|
||||
} else if let spellIdentifier = try? container.decode(SpellIdentifier.self) {
|
||||
self = .spellIdentifier(spellIdentifier)
|
||||
} else if let ritualIdentifier = try? container.decode(RitualIdentifier.self) {
|
||||
self = .ritualIdentifier(ritualIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No RequirableSelectOptionIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum CoreRuleDerivableContentIdentifier: EntitySubtype {
|
||||
case magicalTraditionIdentifier(MagicalTraditionIdentifier)
|
||||
case familiarSpecialAbilityIdentifier(FamiliarSpecialAbilityIdentifier)
|
||||
case magicalSpecialAbilityIdentifier(MagicalSpecialAbilityIdentifier)
|
||||
case blessedTraditionIdentifier(BlessedTraditionIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let magicalTraditionIdentifier = try? container.decode(MagicalTraditionIdentifier.self) {
|
||||
self = .magicalTraditionIdentifier(magicalTraditionIdentifier)
|
||||
} else if let familiarSpecialAbilityIdentifier = try? container.decode(FamiliarSpecialAbilityIdentifier.self) {
|
||||
self = .familiarSpecialAbilityIdentifier(familiarSpecialAbilityIdentifier)
|
||||
} else if let magicalSpecialAbilityIdentifier = try? container.decode(MagicalSpecialAbilityIdentifier.self) {
|
||||
self = .magicalSpecialAbilityIdentifier(magicalSpecialAbilityIdentifier)
|
||||
} else if let blessedTraditionIdentifier = try? container.decode(BlessedTraditionIdentifier.self) {
|
||||
self = .blessedTraditionIdentifier(blessedTraditionIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No CoreRuleDerivableContentIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum EquipmentIdentifier: EntitySubtype {
|
||||
case ammunitionIdentifier(AmmunitionIdentifier)
|
||||
case animalIdentifier(AnimalIdentifier)
|
||||
case animalCareIdentifier(AnimalCareIdentifier)
|
||||
case armorIdentifier(ArmorIdentifier)
|
||||
case bandageOrRemedyIdentifier(BandageOrRemedyIdentifier)
|
||||
case bookIdentifier(BookIdentifier)
|
||||
case ceremonialItemIdentifier(CeremonialItemIdentifier)
|
||||
case clothesIdentifier(ClothesIdentifier)
|
||||
case containerIdentifier(ContainerIdentifier)
|
||||
case elixirIdentifier(ElixirIdentifier)
|
||||
case equipmentOfBlessedOnesIdentifier(EquipmentOfBlessedOnesIdentifier)
|
||||
case gemOrPreciousStoneIdentifier(GemOrPreciousStoneIdentifier)
|
||||
case illuminationLightSourceIdentifier(IlluminationLightSourceIdentifier)
|
||||
case illuminationRefillsOrSuppliesIdentifier(IlluminationRefillsOrSuppliesIdentifier)
|
||||
case jewelryIdentifier(JewelryIdentifier)
|
||||
case liebesspielzeugIdentifier(LiebesspielzeugIdentifier)
|
||||
case luxuryGoodIdentifier(LuxuryGoodIdentifier)
|
||||
case magicalArtifactIdentifier(MagicalArtifactIdentifier)
|
||||
case musicalInstrumentIdentifier(MusicalInstrumentIdentifier)
|
||||
case orienteeringAidIdentifier(OrienteeringAidIdentifier)
|
||||
case poisonIdentifier(PoisonIdentifier)
|
||||
case ropeOrChainIdentifier(RopeOrChainIdentifier)
|
||||
case stationaryIdentifier(StationaryIdentifier)
|
||||
case thievesToolIdentifier(ThievesToolIdentifier)
|
||||
case toolOfTheTradeIdentifier(ToolOfTheTradeIdentifier)
|
||||
case travelGearOrToolIdentifier(TravelGearOrToolIdentifier)
|
||||
case vehicleIdentifier(VehicleIdentifier)
|
||||
case weaponIdentifier(WeaponIdentifier)
|
||||
case weaponAccessoryIdentifier(WeaponAccessoryIdentifier)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let ammunitionIdentifier = try? container.decode(AmmunitionIdentifier.self) {
|
||||
self = .ammunitionIdentifier(ammunitionIdentifier)
|
||||
} else if let animalIdentifier = try? container.decode(AnimalIdentifier.self) {
|
||||
self = .animalIdentifier(animalIdentifier)
|
||||
} else if let animalCareIdentifier = try? container.decode(AnimalCareIdentifier.self) {
|
||||
self = .animalCareIdentifier(animalCareIdentifier)
|
||||
} else if let armorIdentifier = try? container.decode(ArmorIdentifier.self) {
|
||||
self = .armorIdentifier(armorIdentifier)
|
||||
} else if let bandageOrRemedyIdentifier = try? container.decode(BandageOrRemedyIdentifier.self) {
|
||||
self = .bandageOrRemedyIdentifier(bandageOrRemedyIdentifier)
|
||||
} else if let bookIdentifier = try? container.decode(BookIdentifier.self) {
|
||||
self = .bookIdentifier(bookIdentifier)
|
||||
} else if let ceremonialItemIdentifier = try? container.decode(CeremonialItemIdentifier.self) {
|
||||
self = .ceremonialItemIdentifier(ceremonialItemIdentifier)
|
||||
} else if let clothesIdentifier = try? container.decode(ClothesIdentifier.self) {
|
||||
self = .clothesIdentifier(clothesIdentifier)
|
||||
} else if let containerIdentifier = try? container.decode(ContainerIdentifier.self) {
|
||||
self = .containerIdentifier(containerIdentifier)
|
||||
} else if let elixirIdentifier = try? container.decode(ElixirIdentifier.self) {
|
||||
self = .elixirIdentifier(elixirIdentifier)
|
||||
} else if let equipmentOfBlessedOnesIdentifier = try? container.decode(EquipmentOfBlessedOnesIdentifier.self) {
|
||||
self = .equipmentOfBlessedOnesIdentifier(equipmentOfBlessedOnesIdentifier)
|
||||
} else if let gemOrPreciousStoneIdentifier = try? container.decode(GemOrPreciousStoneIdentifier.self) {
|
||||
self = .gemOrPreciousStoneIdentifier(gemOrPreciousStoneIdentifier)
|
||||
} else if let illuminationLightSourceIdentifier = try? container.decode(IlluminationLightSourceIdentifier.self) {
|
||||
self = .illuminationLightSourceIdentifier(illuminationLightSourceIdentifier)
|
||||
} else if let illuminationRefillsOrSuppliesIdentifier = try? container.decode(IlluminationRefillsOrSuppliesIdentifier.self) {
|
||||
self = .illuminationRefillsOrSuppliesIdentifier(illuminationRefillsOrSuppliesIdentifier)
|
||||
} else if let jewelryIdentifier = try? container.decode(JewelryIdentifier.self) {
|
||||
self = .jewelryIdentifier(jewelryIdentifier)
|
||||
} else if let liebesspielzeugIdentifier = try? container.decode(LiebesspielzeugIdentifier.self) {
|
||||
self = .liebesspielzeugIdentifier(liebesspielzeugIdentifier)
|
||||
} else if let luxuryGoodIdentifier = try? container.decode(LuxuryGoodIdentifier.self) {
|
||||
self = .luxuryGoodIdentifier(luxuryGoodIdentifier)
|
||||
} else if let magicalArtifactIdentifier = try? container.decode(MagicalArtifactIdentifier.self) {
|
||||
self = .magicalArtifactIdentifier(magicalArtifactIdentifier)
|
||||
} else if let musicalInstrumentIdentifier = try? container.decode(MusicalInstrumentIdentifier.self) {
|
||||
self = .musicalInstrumentIdentifier(musicalInstrumentIdentifier)
|
||||
} else if let orienteeringAidIdentifier = try? container.decode(OrienteeringAidIdentifier.self) {
|
||||
self = .orienteeringAidIdentifier(orienteeringAidIdentifier)
|
||||
} else if let poisonIdentifier = try? container.decode(PoisonIdentifier.self) {
|
||||
self = .poisonIdentifier(poisonIdentifier)
|
||||
} else if let ropeOrChainIdentifier = try? container.decode(RopeOrChainIdentifier.self) {
|
||||
self = .ropeOrChainIdentifier(ropeOrChainIdentifier)
|
||||
} else if let stationaryIdentifier = try? container.decode(StationaryIdentifier.self) {
|
||||
self = .stationaryIdentifier(stationaryIdentifier)
|
||||
} else if let thievesToolIdentifier = try? container.decode(ThievesToolIdentifier.self) {
|
||||
self = .thievesToolIdentifier(thievesToolIdentifier)
|
||||
} else if let toolOfTheTradeIdentifier = try? container.decode(ToolOfTheTradeIdentifier.self) {
|
||||
self = .toolOfTheTradeIdentifier(toolOfTheTradeIdentifier)
|
||||
} else if let travelGearOrToolIdentifier = try? container.decode(TravelGearOrToolIdentifier.self) {
|
||||
self = .travelGearOrToolIdentifier(travelGearOrToolIdentifier)
|
||||
} else if let vehicleIdentifier = try? container.decode(VehicleIdentifier.self) {
|
||||
self = .vehicleIdentifier(vehicleIdentifier)
|
||||
} else if let weaponIdentifier = try? container.decode(WeaponIdentifier.self) {
|
||||
self = .weaponIdentifier(weaponIdentifier)
|
||||
} else if let weaponAccessoryIdentifier = try? container.decode(WeaponAccessoryIdentifier.self) {
|
||||
self = .weaponAccessoryIdentifier(weaponAccessoryIdentifier)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No EquipmentIdentifier type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum OneOrManyNumericIdentifiers: EntitySubtype {
|
||||
case oneNumericIdentifier(OneNumericIdentifier)
|
||||
case manyNumericIdentifiers(ManyNumericIdentifiers)
|
||||
|
||||
public init(from decoder: any Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if let oneNumericIdentifier = try? container.decode(OneNumericIdentifier.self) {
|
||||
self = .oneNumericIdentifier(oneNumericIdentifier)
|
||||
} else if let manyNumericIdentifiers = try? container.decode(ManyNumericIdentifiers.self) {
|
||||
self = .manyNumericIdentifiers(manyNumericIdentifiers)
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "No OneOrManyNumericIdentifiers type found")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public typealias OneNumericIdentifier = Double
|
||||
|
||||
public typealias ManyNumericIdentifiers = [OneNumericIdentifier]
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// _ImprovementCost.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public enum ImprovementCost: String, EntitySubtype {
|
||||
case a = "A"
|
||||
case b = "B"
|
||||
case c = "C"
|
||||
case d = "D"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// _Influence.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Influence: LocalizableEntity {
|
||||
/// The influence's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
public let prerequisites: InfluencePrerequisites
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<InfluenceTranslation>
|
||||
}
|
||||
|
||||
public struct InfluenceTranslation: EntitySubtype {
|
||||
/// The influence name.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// The effects of the influence. They should be sorted like they are in
|
||||
/// the book.
|
||||
public let effects: [InfluenceEffect]
|
||||
|
||||
public let errata: Errata?
|
||||
}
|
||||
|
||||
public struct InfluenceEffect: EntitySubtype {
|
||||
/// An optional label that is displayed and placed before the actual
|
||||
/// text.
|
||||
public let label: NonEmptyString?
|
||||
|
||||
/// The effect text.
|
||||
public let text: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// _LocaleMap.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public typealias LocaleMap<T: EntitySubtype> = [String: T]
|
||||
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// _NonEmptyString.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias NonEmptyString = String
|
||||
|
||||
public typealias NonEmptyMarkdown = String
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// _Prerequisite.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// A prerequisite group has no influence on validation logic. It serves as a
|
||||
/// single unit for displaying purposes, where the source uses a prerequisites
|
||||
/// item that cannot be represented as a single prerequisite.
|
||||
public struct PrerequisiteGroup<T: EntitySubtype>: EntitySubtype {
|
||||
public let list: [T]
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<NonEmptyString>
|
||||
}
|
||||
|
||||
public struct PrerequisitesDisjunction<T: EntitySubtype>: EntitySubtype {
|
||||
public let list: [T]
|
||||
|
||||
public let displayOption: DisplayOption?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case list = "list"
|
||||
case displayOption = "display_option"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum PrerequisitesElement<T: EntitySubtype>: EntitySubtype {
|
||||
case single(T)
|
||||
case disjunction(PrerequisitesDisjunction<T>)
|
||||
case group(PrerequisiteGroup<T>)
|
||||
}
|
||||
|
||||
public typealias PlainPrerequisites<T: EntitySubtype> = [PrerequisitesElement<T>]
|
||||
|
||||
public struct PrerequisiteForLevel<T: EntitySubtype>: EntitySubtype {
|
||||
public let level: Int
|
||||
|
||||
public let prerequisite: PrerequisitesElement<T>
|
||||
}
|
||||
|
||||
public typealias PrerequisitesForLevels<T: EntitySubtype> = [PrerequisiteForLevel<T>]
|
||||
|
||||
public typealias DerivedCharacteristicPrerequisites = PlainPrerequisites<DerivedCharacteristicPrerequisiteGroup>
|
||||
|
||||
public typealias PublicationPrerequisites = PlainPrerequisites<PublicationPrerequisiteGroup>
|
||||
|
||||
public typealias PlainGeneralPrerequisites = PlainPrerequisites<GeneralPrerequisiteGroup>
|
||||
|
||||
public typealias GeneralPrerequisites = PrerequisitesForLevels<GeneralPrerequisiteGroup>
|
||||
|
||||
public typealias ProfessionPrerequisites = PlainPrerequisites<ProfessionPrerequisiteGroup>
|
||||
|
||||
public typealias AdvantageDisadvantagePrerequisites = PrerequisitesForLevels<AdvantageDisadvantagePrerequisiteGroup>
|
||||
|
||||
public typealias ArcaneTraditionPrerequisites = PlainPrerequisites<ArcaneTraditionPrerequisiteGroup>
|
||||
|
||||
public typealias PersonalityTraitPrerequisites = PlainPrerequisites<PersonalityTraitPrerequisiteGroup>
|
||||
|
||||
public typealias SpellworkPrerequisites = PlainPrerequisites<SpellworkPrerequisiteGroup>
|
||||
|
||||
public typealias LiturgyPrerequisites = PlainPrerequisites<LiturgyPrerequisiteGroup>
|
||||
|
||||
public typealias InfluencePrerequisites = PlainPrerequisites<InfluencePrerequisiteGroup>
|
||||
|
||||
public typealias LanguagePrerequisites = PrerequisitesForLevels<LanguagePrerequisiteGroup>
|
||||
|
||||
public typealias AnimistPowerPrerequisites = PlainPrerequisites<AnimistPowerPrerequisiteGroup>
|
||||
|
||||
public typealias GeodeRitualPrerequisites = PlainPrerequisites<GeodeRitualPrerequisiteGroup>
|
||||
|
||||
public typealias EnhancementPrerequisites = PlainPrerequisites<EnhancementPrerequisiteGroup>
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// _ResponsiveText.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// A text from the source that can be also displayed in small areas using a
|
||||
/// compressed version.
|
||||
public struct ResponsiveText: EntitySubtype {
|
||||
/// The full text from the source.
|
||||
public let full: NonEmptyString
|
||||
|
||||
/// A compressed text for use in small areas (e.g. on character sheet).
|
||||
public let compressed: NonEmptyString
|
||||
}
|
||||
|
||||
/// A text from the source that can be also displayed in small areas using a
|
||||
/// compressed version. It is used as a replacement for a generated text while
|
||||
/// the generated text is still provided and should be used.
|
||||
public struct ResponsiveTextReplace: EntitySubtype {
|
||||
/// The full replacement string. It must contain `$1`, which is going to be
|
||||
/// replaced with the generated string, so additional information can be
|
||||
/// provided without duplicating concrete numeric values.
|
||||
public let full: String
|
||||
|
||||
/// A compressed replacement string for use in small areas (e.g. on character
|
||||
/// sheet). It must contain `$1`, which is going to be replaced with the
|
||||
/// generated string, so additional information can be provided without
|
||||
/// duplicating concrete numeric values.
|
||||
public let compressed: String
|
||||
}
|
||||
|
||||
/// A text from the source that can be also displayed in small areas using a
|
||||
/// compressed version, if available.
|
||||
public struct ResponsiveTextOptional: EntitySubtype {
|
||||
/// The full text from the source.
|
||||
public let full: NonEmptyString
|
||||
|
||||
/// A compressed text for use in small areas (e.g. on character sheet). If this
|
||||
/// is not present, it should not appear in those areas.
|
||||
public let compressed: NonEmptyString?
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// _Sex.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public enum BinarySex: String, EntitySubtype {
|
||||
case male = "Male"
|
||||
case female = "Female"
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// _SimpleReferences.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct FocusRuleSubjectReference: EntitySubtype {
|
||||
public let id: SubjectIdentifier
|
||||
}
|
||||
|
||||
public struct RaceReference: EntitySubtype {
|
||||
public let id: RaceIdentifier
|
||||
}
|
||||
|
||||
public struct CultureReference: EntitySubtype {
|
||||
public let id: CultureIdentifier
|
||||
}
|
||||
|
||||
public struct ProfessionReference: EntitySubtype {
|
||||
public let id: ProfessionIdentifier
|
||||
}
|
||||
|
||||
public struct ProfessionVariantReference: EntitySubtype {
|
||||
public let id: ProfessionVariantIdentifier
|
||||
}
|
||||
|
||||
public struct AttributeReference: EntitySubtype {
|
||||
public let id: AttributeIdentifier
|
||||
}
|
||||
|
||||
public struct SkillReference: EntitySubtype {
|
||||
public let id: SkillIdentifier
|
||||
}
|
||||
|
||||
public struct SkillGroupReference: EntitySubtype {
|
||||
public let id: SkillGroupIdentifier
|
||||
}
|
||||
|
||||
public struct CombatTechniqueReference: EntitySubtype {
|
||||
public let id: CombatTechniqueIdentifier
|
||||
}
|
||||
|
||||
public struct CloseCombatTechniqueReference: EntitySubtype {
|
||||
public let id: CloseCombatTechniqueIdentifier
|
||||
}
|
||||
|
||||
public struct RangedCombatTechniqueReference: EntitySubtype {
|
||||
public let id: RangedCombatTechniqueIdentifier
|
||||
}
|
||||
|
||||
public struct MagicalTraditionReference: EntitySubtype {
|
||||
public let id: MagicalTraditionIdentifier
|
||||
}
|
||||
|
||||
public struct CantripReference: EntitySubtype {
|
||||
public let id: CantripIdentifier
|
||||
}
|
||||
|
||||
public struct SpellReference: EntitySubtype {
|
||||
public let id: SpellIdentifier
|
||||
}
|
||||
|
||||
public struct RitualReference: EntitySubtype {
|
||||
public let id: RitualIdentifier
|
||||
}
|
||||
|
||||
public struct SpellworkReference: EntitySubtype {
|
||||
public let id: SpellworkIdentifier
|
||||
}
|
||||
|
||||
public struct PropertyReference: EntitySubtype {
|
||||
public let id: PropertyIdentifier
|
||||
}
|
||||
|
||||
public struct BlessedTraditionReference: EntitySubtype {
|
||||
public let id: BlessedTraditionIdentifier
|
||||
}
|
||||
|
||||
public struct BlessingReference: EntitySubtype {
|
||||
public let id: BlessingIdentifier
|
||||
}
|
||||
|
||||
public struct LiturgicalChantReference: EntitySubtype {
|
||||
public let id: LiturgicalChantIdentifier
|
||||
}
|
||||
|
||||
public struct CeremonyReference: EntitySubtype {
|
||||
public let id: CeremonyIdentifier
|
||||
}
|
||||
|
||||
public struct AspectReference: EntitySubtype {
|
||||
public let id: AspectIdentifier
|
||||
}
|
||||
|
||||
public struct AdvantageReference: EntitySubtype {
|
||||
public let id: AdvantageIdentifier
|
||||
}
|
||||
|
||||
public struct DisadvantageReference: EntitySubtype {
|
||||
public let id: DisadvantageIdentifier
|
||||
}
|
||||
|
||||
public struct AdvancedSpecialAbilityReference<Identifier: EntitySubtype>: EntitySubtype {
|
||||
public let id: Identifier
|
||||
}
|
||||
|
||||
public struct LanguageReference: EntitySubtype {
|
||||
public let id: LanguageIdentifier
|
||||
}
|
||||
|
||||
public struct ScriptReference: EntitySubtype {
|
||||
public let id: ScriptIdentifier
|
||||
}
|
||||
|
||||
public struct SocialStatusReference: EntitySubtype {
|
||||
public let id: SocialStatusIdentifier
|
||||
}
|
||||
|
||||
public struct CurriculumReference: EntitySubtype {
|
||||
public let id: CurriculumIdentifier
|
||||
}
|
||||
|
||||
public struct GuidelineReference: EntitySubtype {
|
||||
public let id: GuidelineIdentifier
|
||||
}
|
||||
|
||||
public struct AnimalTypeReference: EntitySubtype {
|
||||
public let id: AnimalTypeIdentifier
|
||||
}
|
||||
|
||||
public struct TargetCategoryReference: EntitySubtype {
|
||||
public let id: TargetCategoryIdentifier
|
||||
}
|
||||
|
||||
public struct PatronCategoryReference: EntitySubtype {
|
||||
public let id: PatronCategoryIdentifier
|
||||
}
|
||||
|
||||
public struct PersonalityTraitReference: EntitySubtype {
|
||||
public let id: PersonalityTraitIdentifier
|
||||
}
|
||||
|
||||
public struct HairColorReference: EntitySubtype {
|
||||
public let id: HairColorIdentifier
|
||||
}
|
||||
|
||||
public struct EyeColorReference: EntitySubtype {
|
||||
public let id: EyeColorIdentifier
|
||||
}
|
||||
|
||||
public struct PactCategoryReference: EntitySubtype {
|
||||
public let id: PactCategoryIdentifier
|
||||
}
|
||||
|
||||
public struct PactDomainReference: EntitySubtype {
|
||||
public let id: PactDomainIdentifier
|
||||
}
|
||||
|
||||
public struct PatronReference: EntitySubtype {
|
||||
public let id: PatronIdentifier
|
||||
}
|
||||
|
||||
public struct AnimistTribeReference: EntitySubtype {
|
||||
public let id: AnimistTribeIdentifier
|
||||
}
|
||||
|
||||
public struct ElementReference: EntitySubtype {
|
||||
public let id: ElementIdentifier
|
||||
}
|
||||
|
||||
public struct WeaponReference: EntitySubtype {
|
||||
public let id: WeaponIdentifier
|
||||
}
|
||||
|
||||
public struct ArmorReference: EntitySubtype {
|
||||
public let id: ArmorIdentifier
|
||||
}
|
||||
|
||||
public struct TraditionReference: EntitySubtype {
|
||||
public let id: TraditionIdentifier
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// _SkillCheck.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// The attributes' identifiers of the skill check.
|
||||
public typealias SkillCheck = [AttributeReference]
|
||||
|
||||
/// A specific value that represents a penalty for the associated skill check.
|
||||
public enum SkillCheckPenalty: String, EntitySubtype {
|
||||
case spirit = "Spirit"
|
||||
case halfOfSpirit = "HalfOfSpirit"
|
||||
case toughness = "Toughness"
|
||||
case higherOfSpiritAndToughness = "HigherOfSpiritAndToughness"
|
||||
case summoningDifficulty = "SummoningDifficulty"
|
||||
case creationDifficulty = "CreationDifficulty"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// _Spellwork.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
/// The tradition(s) the ritual is available for. It may be *generally*
|
||||
/// available to all traditions or it may be only familiar in specific
|
||||
/// traditions.
|
||||
@DiscriminatedEnum
|
||||
public enum Traditions: EntitySubtype {
|
||||
case general
|
||||
case specific(SpecificTraditions)
|
||||
}
|
||||
|
||||
/// A list of specific traditions.
|
||||
public typealias SpecificTraditions = [MagicalTraditionIdentifier]
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// EquipmentPackage.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct EquipmentPackage: LocalizableEntity {
|
||||
/// The equipment package's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// All items in the package. You have to provide the item (template)
|
||||
/// identifier and you can optionally provide the number of how often an item
|
||||
/// is included in the package.
|
||||
public let items: [EquipmentPackageItem]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<EquipmentPackageTranslation>
|
||||
}
|
||||
|
||||
public struct EquipmentPackageItem: EntitySubtype {
|
||||
/// The item's identifier.
|
||||
public let id: EquipmentIdentifier
|
||||
|
||||
/// The number of how often the item is included in the package.
|
||||
public let number: Int?
|
||||
}
|
||||
|
||||
public struct EquipmentPackageTranslation: EntitySubtype {
|
||||
/// The name of the equipment package.
|
||||
public let name: NonEmptyString
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// Ammunition.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Ammunition: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<AmmunitionTranslation>
|
||||
}
|
||||
|
||||
public struct AmmunitionTranslation: EntitySubtype {
|
||||
/// The name of the item.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// An auxiliary name or label of the item, if available.
|
||||
public let secondaryName: NonEmptyString?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case secondaryName = "secondary_name"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Animal.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Animal: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DefaultItemTranslation>
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// AnimalCare.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct AnimalCare: LocalizableEntity {
|
||||
/// Values depending on whether the animal care is feed.
|
||||
public let type: AnimalCareType
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DefaultItemTranslation>
|
||||
}
|
||||
|
||||
/// Values depending on whether the animal care is feed.
|
||||
@DiscriminatedEnum
|
||||
public enum AnimalCareType: EntitySubtype {
|
||||
case general(GeneralAnimalCare)
|
||||
case feed(AnimalFeed)
|
||||
}
|
||||
|
||||
public struct GeneralAnimalCare: EntitySubtype {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: Weight
|
||||
}
|
||||
|
||||
public struct AnimalFeed: EntitySubtype {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: AnimalFeedCost
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum AnimalFeedCost: EntitySubtype {
|
||||
case perWeek(FixedCost)
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// Armor.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Armor: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: Weight
|
||||
|
||||
/// The complexity of crafting the item.
|
||||
public let complexity: Complexity
|
||||
|
||||
/// The PRO value.
|
||||
public let protection: Protection
|
||||
|
||||
/// The ENC value.
|
||||
public let encumbrance: Encumbrance
|
||||
|
||||
/// Does the armor have additional penalties (MOV -1, INI -1)?
|
||||
public let hasAdditionalPenalties: HasAdditionalPenalties
|
||||
|
||||
/// The armor type.
|
||||
public let armorType: ArmorTypeReference
|
||||
|
||||
/// Specify if armor is only available for a specific hit zone.
|
||||
public let hitZone: HitZone?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ArmorTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case weight = "weight"
|
||||
case complexity = "complexity"
|
||||
case protection = "protection"
|
||||
case encumbrance = "encumbrance"
|
||||
case hasAdditionalPenalties = "has_additional_penalties"
|
||||
case armorType = "armor_type"
|
||||
case hitZone = "hit_zone"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ArmorTranslation: EntitySubtype {
|
||||
/// The name of the item.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// An auxiliary name or label of the item, if available.
|
||||
public let secondaryName: NonEmptyString?
|
||||
|
||||
/// Note text.
|
||||
public let note: NonEmptyMarkdown?
|
||||
|
||||
/// Special rules text.
|
||||
public let rules: NonEmptyMarkdown?
|
||||
|
||||
/// The armor advantage text.
|
||||
public let advantage: NonEmptyMarkdown?
|
||||
|
||||
/// The armor disadvantage text.
|
||||
public let disadvantage: NonEmptyMarkdown?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case secondaryName = "secondary_name"
|
||||
case note = "note"
|
||||
case rules = "rules"
|
||||
case advantage = "advantage"
|
||||
case disadvantage = "disadvantage"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SecondaryArmor: EntitySubtype {
|
||||
/// The PRO value.
|
||||
public let protection: Protection
|
||||
|
||||
/// The ENC value.
|
||||
public let encumbrance: Encumbrance
|
||||
|
||||
/// Does the armor have additional penalties (MOV -1, INI -1)?
|
||||
public let hasAdditionalPenalties: HasAdditionalPenalties
|
||||
|
||||
/// The armor type.
|
||||
public let armorType: ArmorTypeReference
|
||||
|
||||
/// Specify if armor is only available for a specific hit zone.
|
||||
public let hitZone: HitZone?
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<SecondaryArmorTranslation>?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case protection = "protection"
|
||||
case encumbrance = "encumbrance"
|
||||
case hasAdditionalPenalties = "has_additional_penalties"
|
||||
case armorType = "armor_type"
|
||||
case hitZone = "hit_zone"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct SecondaryArmorTranslation: EntitySubtype {
|
||||
/// The armor advantage text.
|
||||
public let advantage: NonEmptyMarkdown?
|
||||
|
||||
/// The armor disadvantage text.
|
||||
public let disadvantage: NonEmptyMarkdown?
|
||||
}
|
||||
|
||||
/// The PRO value.
|
||||
public typealias Protection = Int
|
||||
|
||||
/// The ENC value.
|
||||
public typealias Encumbrance = Int
|
||||
|
||||
/// Does the armor have additional penalties (MOV -1, INI -1)?
|
||||
public typealias HasAdditionalPenalties = Bool
|
||||
|
||||
/// The armor type.
|
||||
public struct ArmorTypeReference: EntitySubtype {
|
||||
/// The armor type's identifier.
|
||||
public let id: Int
|
||||
}
|
||||
|
||||
/// Specify if armor is only available for a specific hit zone.
|
||||
@DiscriminatedEnum
|
||||
public enum HitZone: EntitySubtype {
|
||||
case head(HeadHitZone)
|
||||
case torso
|
||||
case arms
|
||||
case legs
|
||||
}
|
||||
|
||||
public struct HeadHitZone: EntitySubtype {
|
||||
/// In some cases, multiple armors for the same hit zone can be combined.
|
||||
/// They're listed at the item that can be combined with others.
|
||||
public let combinationPossibilities: HeadHitZoneCombinationPossibilities?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case combinationPossibilities = "combination_possibilities"
|
||||
}
|
||||
}
|
||||
|
||||
public struct HeadHitZoneCombinationPossibilities: EntitySubtype {
|
||||
/// A list of armors that can be combined with this armor.
|
||||
public let armors: [ArmorReference]
|
||||
|
||||
/// The PRO value that is added to the PRO value of the other armor instead
|
||||
/// of adding the normale PRO value.
|
||||
public let protection: Int?
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// BandageOrRemedy.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct BandageOrRemedy: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: Weight
|
||||
|
||||
/// The complexity of crafting the item.
|
||||
public let complexity: Complexity?
|
||||
|
||||
/// The structure points of the item. Use an array if the item consists of
|
||||
/// multiple components that have individual structure points.
|
||||
public let structurePoints: StructurePoints?
|
||||
|
||||
/// The item can also be used either as an improvised weapon or as an armor,
|
||||
/// although this is not the primary use case of the item.
|
||||
public let combatUse: CombatUse?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DefaultItemTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case weight = "weight"
|
||||
case complexity = "complexity"
|
||||
case structurePoints = "structure_points"
|
||||
case combatUse = "combat_use"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// Book.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Book: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: Weight
|
||||
|
||||
/// The complexity of crafting the item.
|
||||
public let complexity: Complexity
|
||||
|
||||
/// The structure points of the item. Use an array if the item consists of
|
||||
/// multiple components that have individual structure points.
|
||||
public let structurePoints: StructurePoints
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<BookTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case weight = "weight"
|
||||
case complexity = "complexity"
|
||||
case structurePoints = "structure_points"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct BookTranslation: EntitySubtype {
|
||||
/// The name of the item.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// An auxiliary name or label of the item, if available.
|
||||
public let secondaryName: NonEmptyString?
|
||||
|
||||
/// The language the book is written in.
|
||||
public let language: NonEmptyString
|
||||
|
||||
/// The script that was used for the book.
|
||||
public let script: NonEmptyString
|
||||
|
||||
/// Note text.
|
||||
public let note: NonEmptyMarkdown?
|
||||
|
||||
/// Special rules text.
|
||||
public let rules: NonEmptyMarkdown?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case secondaryName = "secondary_name"
|
||||
case language = "language"
|
||||
case script = "script"
|
||||
case note = "note"
|
||||
case rules = "rules"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// CeremonialItem.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct CeremonialItem: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: Weight
|
||||
|
||||
/// The complexity of crafting the item.
|
||||
public let complexity: Complexity?
|
||||
|
||||
/// The structure points of the item. Use an array if the item consists of
|
||||
/// multiple components that have individual structure points.
|
||||
public let structurePoints: StructurePoints
|
||||
|
||||
/// The deity associated with the equipment item.
|
||||
public let associatedTradition: BlessedTraditionReference
|
||||
|
||||
/// The item can also be used either as an improvised weapon or as an armor,
|
||||
/// although this is not the primary use case of the item.
|
||||
public let combatUse: CombatUse?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DefaultItemTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case weight = "weight"
|
||||
case complexity = "complexity"
|
||||
case structurePoints = "structure_points"
|
||||
case associatedTradition = "associated_tradition"
|
||||
case combatUse = "combat_use"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Clothes.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias Clothes = DefaultItem
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Container.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias Container = DefaultItem
|
||||
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// Elixir.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Elixir: LocalizableEntity {
|
||||
/// The elixir's identifier. An unique, increasing integer.
|
||||
public let id: Int
|
||||
|
||||
/// The cost per ingredient level in silverthalers.
|
||||
public let costPerIngredientLevel: Double
|
||||
|
||||
/// The laboratory level needed to brew the elixir.
|
||||
public let laboratory: LaboratoryLevel
|
||||
|
||||
/// The brewing difficulty, which represents the challenge of creating an
|
||||
/// elixir.
|
||||
public let brewingDifficulty: Int
|
||||
|
||||
/// AP value and prerequisites of the elixir recipe’s trade secret.
|
||||
public let tradeSecret: RecipeTradeSecret
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<ElixirTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case id = "id"
|
||||
case costPerIngredientLevel = "cost_per_ingredient_level"
|
||||
case laboratory = "laboratory"
|
||||
case brewingDifficulty = "brewing_difficulty"
|
||||
case tradeSecret = "trade_secret"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
public struct ElixirTranslation: EntitySubtype {
|
||||
/// The name of the elixir.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// A list of alternative names.
|
||||
public let alternativeNames: [AlternativeName]?
|
||||
|
||||
/// A list of typical ingredients.
|
||||
public let typicalIngredients: [NonEmptyString]
|
||||
|
||||
/// Prerequsites for the brewing process, if any.
|
||||
public let brewingProcessPrerequisites: NonEmptyMarkdown?
|
||||
|
||||
/// The list of effects for each quality level. The first element
|
||||
/// represents QL 1, the second element QL 2, and so on.
|
||||
public let qualityLevels: [NonEmptyMarkdown]
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case alternativeNames = "alternative_names"
|
||||
case typicalIngredients = "typical_ingredients"
|
||||
case brewingProcessPrerequisites = "brewing_process_prerequisites"
|
||||
case qualityLevels = "quality_levels"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// EquipmentOfBlessedOnes.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct EquipmentOfBlessedOnes: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The structure points of the item. Use an array if the item consists of
|
||||
/// multiple components that have individual structure points.
|
||||
public let structurePoints: StructurePoints
|
||||
|
||||
/// The deity associated with the equipment item.
|
||||
public let associatedTradition: [BlessedTraditionReference]
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DefaultItemTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case structurePoints = "structure_points"
|
||||
case associatedTradition = "associated_tradition"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// GemOrPreciousStone.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct GemOrPreciousStone: LocalizableEntity {
|
||||
/// The cost in silverthalers per 10 karat.
|
||||
public let cost: Cost
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<GemOrPreciousStoneTranslation>
|
||||
}
|
||||
|
||||
public struct GemOrPreciousStoneTranslation: EntitySubtype {
|
||||
/// The name of the item.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// An auxiliary name or label of the item, if available.
|
||||
public let secondaryName: NonEmptyString?
|
||||
|
||||
/// The color of the gem or stone.
|
||||
public let color: NonEmptyString
|
||||
|
||||
/// Note text.
|
||||
public let note: NonEmptyMarkdown?
|
||||
|
||||
/// Special rules text.
|
||||
public let rules: NonEmptyMarkdown?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case secondaryName = "secondary_name"
|
||||
case color = "color"
|
||||
case note = "note"
|
||||
case rules = "rules"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// IlluminationLightSource.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct IlluminationLightSource: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: Cost
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: Weight
|
||||
|
||||
/// The complexity of crafting the item.
|
||||
public let complexity: Complexity?
|
||||
|
||||
/// The structure points of the item. Use an array if the item consists of
|
||||
/// multiple components that have individual structure points.
|
||||
public let structurePoints: StructurePoints
|
||||
|
||||
/// The burning time is the time how long the light source can be lit. After
|
||||
/// that time you have to use a new light source.
|
||||
public let burningTime: BurningTime
|
||||
|
||||
/// The item can also be used either as an improvised weapon or as an armor,
|
||||
/// although this is not the primary use case of the item.
|
||||
public let combatUse: CombatUse?
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<DefaultItemTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case weight = "weight"
|
||||
case complexity = "complexity"
|
||||
case structurePoints = "structure_points"
|
||||
case burningTime = "burning_time"
|
||||
case combatUse = "combat_use"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
@DiscriminatedEnum
|
||||
public enum BurningTime: EntitySubtype {
|
||||
case unlimited
|
||||
case limited(LimitedBurningTime)
|
||||
}
|
||||
|
||||
public struct LimitedBurningTime: EntitySubtype {
|
||||
/// The (unitless) time value.
|
||||
public let value: Double
|
||||
|
||||
/// The time unit.
|
||||
public let unit: LimitedBurningTimeUnit
|
||||
}
|
||||
|
||||
public enum LimitedBurningTimeUnit: String, EntitySubtype {
|
||||
case hours = "Hours"
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// IlluminationRefillsOrSupplies.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias IlluminationRefillsOrSupplies = DefaultItem
|
||||
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// Jewelry.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public struct Jewelry: LocalizableEntity {
|
||||
/// The cost in silverthalers.
|
||||
public let cost: JewelryMaterialDifference<Cost>
|
||||
|
||||
/// The weight in kg.
|
||||
public let weight: JewelryMaterialDifference<Weight>
|
||||
|
||||
/// The complexity of crafting the item.
|
||||
public let complexity: Complexity
|
||||
|
||||
/// The structure points of the item. Use an array if the item consists of
|
||||
/// multiple components that have individual structure points.
|
||||
public let structurePoints: StructurePoints
|
||||
|
||||
public let src: PublicationRefs
|
||||
|
||||
/// All translations for the entry, identified by IETF language tag (BCP47).
|
||||
public let translations: LocaleMap<JewelryTranslation>
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case cost = "cost"
|
||||
case weight = "weight"
|
||||
case complexity = "complexity"
|
||||
case structurePoints = "structure_points"
|
||||
case src = "src"
|
||||
case translations = "translations"
|
||||
}
|
||||
}
|
||||
|
||||
/// Jewelry has different cost based on the material.
|
||||
public struct JewelryMaterialDifference<T: EntitySubtype>: EntitySubtype {
|
||||
public let bronze: T
|
||||
|
||||
public let silver: T
|
||||
|
||||
public let gold: T
|
||||
}
|
||||
|
||||
public struct JewelryTranslation: EntitySubtype {
|
||||
/// The name of the item.
|
||||
public let name: NonEmptyString
|
||||
|
||||
/// An auxiliary name or label of the item, if available.
|
||||
public let secondaryName: NonEmptyString?
|
||||
|
||||
/// Note text.
|
||||
public let note: NonEmptyMarkdown?
|
||||
|
||||
/// Special rules text.
|
||||
public let rules: NonEmptyMarkdown?
|
||||
|
||||
public let errata: Errata?
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case name = "name"
|
||||
case secondaryName = "secondary_name"
|
||||
case note = "note"
|
||||
case rules = "rules"
|
||||
case errata = "errata"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Liebesspielzeug.swift
|
||||
// OptolithDatabase
|
||||
//
|
||||
// Generated on 16.11.2024
|
||||
//
|
||||
|
||||
import DiscriminatedEnum
|
||||
|
||||
public typealias Liebesspielzeug = DefaultItem
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user