-
-
Notifications
You must be signed in to change notification settings - Fork 4
Bannzeichen #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Bannzeichen #135
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2490ebc
Bannzeichen
Lector cd5ef77
Prettier
Lector 858e911
Added options to Bannzeichen.ts analog to Magical Runes
Lector e331850
corrected copy&paste errors
Lector 6db53cc
Bannzeichen now has a duration and a crafting_time in the translation…
Lector e24b995
prettier
Lector 1b32885
added cost to translation of Bannzeichen.ts
Lector 9388f94
prettier
Lector 7990259
added Bannzeichen to main and index
Lector File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,278 @@ | ||
| import * as DB from "tsondb/schema/dsl" | ||
| import { name_in_library } from "../_Activatable.js" | ||
| import { CheckResultBasedDuration } from "../_ActivatableSkillDuration.js" | ||
| import { ActivatableSkillEffect } from "../_ActivatableSkillEffect.js" | ||
| import { PropertyIdentifier, BannzeichenIdentifier } from "../_Identifier.js" | ||
| import { ImprovementCost } from "../_ImprovementCost.js" | ||
| import { ResponsiveText, ResponsiveTextOptional } from "../_ResponsiveText.js" | ||
| import { SkillCheck } from "../_SkillCheck.js" | ||
| import { NestedTranslationMap } from "../Locale.js" | ||
| import { Errata } from "../source/_Erratum.js" | ||
| import { src } from "../source/_PublicationRef.js" | ||
|
|
||
| export const Bannzeichen = DB.Entity(import.meta.url, { | ||
| name: "Bannzeichen", | ||
| namePlural: "Bannzeichen", | ||
| type: () => | ||
| DB.Object({ | ||
| options: DB.Required({ | ||
| comment: `The options the Bannzeichen has, if any. | ||
|
|
||
| If there are multiple options, the Bannzeichen may be activated for each option, that is, multiple times.`, | ||
| type: DB.ChildEntities(BannzeichenOption), | ||
| }), | ||
| check: DB.Required({ | ||
| comment: "Lists the linked three attributes used to make a skill check.", | ||
| type: DB.IncludeIdentifier(SkillCheck), | ||
| }), | ||
| parameters: DB.Required({ | ||
| comment: "Measurable parameters of a Bannzeichen.", | ||
| type: DB.IncludeIdentifier(BannzeichenPerformanceParameters), | ||
| }), | ||
| property: DB.Required({ | ||
| comment: "The associated property.", | ||
| type: PropertyIdentifier(), | ||
| }), | ||
| improvement_cost: DB.Required({ | ||
| comment: "States which column is used to improve the skill.", | ||
| type: DB.IncludeIdentifier(BannzeichenImprovementCost), | ||
| }), | ||
| src, | ||
| translations: NestedTranslationMap( | ||
| DB.Required, | ||
| "Bannzeichen", | ||
| DB.Object({ | ||
| name: DB.Required({ | ||
| comment: `The Bannzeichen’s name. | ||
|
|
||
| If the Bannzeichen has an option, the option’s name will/should not be included in the name as well as its surrounding parenthesis. It will/should be combined on demand.`, | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| name_in_library, | ||
| native_name: DB.Optional({ | ||
| comment: | ||
| "The native name of the Bannzeichen. It has to be specified unless it is defined by an option.", | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| effect: DB.Required({ | ||
| comment: | ||
| "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.", | ||
| type: DB.IncludeIdentifier(ActivatableSkillEffect), | ||
| }), | ||
| cost: DB.Optional({ | ||
| comment: "The ae-cost of the Bannzeichen", | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| crafting_time: DB.Optional({ | ||
| comment: "The crafting time of the Bannzeichen", | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| duration: DB.Optional({ | ||
| comment: "The duration of the Bannzeichen", | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| errata: DB.Optional({ | ||
| type: DB.IncludeIdentifier(Errata), | ||
| }), | ||
| }), | ||
| ), | ||
| }), | ||
| instanceDisplayName: {}, | ||
| uniqueConstraints: [ | ||
| { | ||
| entityMapKeyPath: "translations", | ||
| keyPathInEntityMap: "name", | ||
| }, | ||
| ], | ||
| }) | ||
|
|
||
| const BannzeichenPerformanceParameters = DB.TypeAlias(import.meta.url, { | ||
| name: "BannzeichenPerformanceParameters", | ||
| comment: "Measurable parameters of a Bannzeichen.", | ||
| type: () => | ||
| DB.Object({ | ||
| cost: DB.Required({ | ||
| comment: "The AE cost.", | ||
| type: DB.IncludeIdentifier(BannzeichenCost), | ||
| }), | ||
| crafting_time: DB.Required({ | ||
| comment: "The crafting time.", | ||
| type: DB.IncludeIdentifier(BannzeichenCraftingTime), | ||
| }), | ||
| duration: DB.Required({ | ||
| comment: "The duration.", | ||
| type: DB.IncludeIdentifier(BannzeichenDuration), | ||
| }), | ||
| }), | ||
| }) | ||
|
|
||
| const BannzeichenCost = DB.Enum(import.meta.url, { | ||
| name: "BannzeichenCost", | ||
| values: () => ({ | ||
| Single: DB.EnumCase({ type: DB.IncludeIdentifier(SingleBannzeichenCost) }), | ||
| Disjunction: DB.EnumCase({ type: DB.IncludeIdentifier(BannzeichenCostDisjunction) }), | ||
| DerivedFromOption: DB.EnumCase({ type: null }), | ||
| }), | ||
| }) | ||
|
|
||
| const SingleBannzeichenCost = DB.TypeAlias(import.meta.url, { | ||
| name: "SingleBannzeichenCost", | ||
| type: () => | ||
| DB.Object({ | ||
| value: DB.Required({ | ||
| comment: "The AE cost value.", | ||
| type: DB.Integer({ minimum: 1 }), | ||
| }), | ||
| translations: NestedTranslationMap( | ||
| DB.Optional, | ||
| "SingleBannzeichenCost", | ||
| DB.Object({ | ||
| note: DB.Required({ | ||
| comment: "A note, appended to the generated string in parenthesis.", | ||
| type: DB.IncludeIdentifier(ResponsiveTextOptional), | ||
| }), | ||
| }), | ||
| ), | ||
| }), | ||
| }) | ||
|
|
||
| const BannzeichenCostDisjunction = DB.TypeAlias(import.meta.url, { | ||
| name: "BannzeichenCostDisjunction", | ||
| type: () => | ||
| DB.Object({ | ||
| list: DB.Required({ | ||
| comment: "A set of possible AE cost values.", | ||
| type: DB.Array(DB.IncludeIdentifier(SingleBannzeichenCost), { | ||
| minItems: 2, | ||
| uniqueItems: true, | ||
| }), | ||
| }), | ||
| }), | ||
| }) | ||
|
|
||
| const BannzeichenCraftingTimePerCountable = DB.TypeAlias(import.meta.url, { | ||
| name: "BannzeichenCraftingTimePerCountable", | ||
| type: () => | ||
| DB.Object({ | ||
| translations: NestedTranslationMap( | ||
| DB.Required, | ||
| "BannzeichenCraftingTimePerCountable", | ||
| DB.Object({ | ||
| countable: DB.Required({ | ||
| comment: "The countable entity name.", | ||
| type: DB.IncludeIdentifier(ResponsiveText), | ||
| }), | ||
| }), | ||
| ), | ||
| }), | ||
| }) | ||
|
|
||
| const BannzeichenCraftingTime = DB.TypeAlias(import.meta.url, { | ||
| name: "BannzeichenCraftingTime", | ||
| type: () => | ||
| DB.Object({ | ||
| value: DB.Required({ | ||
| comment: "The crafting time in actions.", | ||
| type: DB.Integer({ minimum: 1 }), | ||
| }), | ||
| per: DB.Optional({ | ||
| comment: | ||
| "The crafting time has to be per a specific countable entity, e.g. `8 Actions per person`.", | ||
| type: DB.IncludeIdentifier(BannzeichenCraftingTimePerCountable), | ||
| }), | ||
| }), | ||
| }) | ||
|
|
||
| const BannzeichenDuration = DB.TypeAlias(import.meta.url, { | ||
| name: "BannzeichenDuration", | ||
| type: () => | ||
| DB.Object({ | ||
| slow: DB.Required({ | ||
| comment: "The duration on slow Bannzeichen application.", | ||
| type: DB.IncludeIdentifier(CheckResultBasedDuration), | ||
| }), | ||
| fast: DB.Required({ | ||
| comment: "The duration on fast Bannzeichen application.", | ||
| type: DB.IncludeIdentifier(CheckResultBasedDuration), | ||
| }), | ||
| }), | ||
| }) | ||
|
|
||
| const BannzeichenImprovementCost = DB.Enum(import.meta.url, { | ||
| name: "BannzeichenImprovementCost", | ||
| values: () => ({ | ||
| Constant: DB.EnumCase({ type: DB.IncludeIdentifier(ImprovementCost) }), | ||
| DerivedFromOption: DB.EnumCase({ type: null }), | ||
| }), | ||
| }) | ||
|
|
||
| export const BannzeichenOption = DB.Entity(import.meta.url, { | ||
| name: "BannzeichenOption", | ||
| namePlural: "BannzeichenOptions", | ||
| type: () => | ||
| DB.Object({ | ||
| parent: DB.Required({ | ||
| comment: "The Bannzeichen this option belongs to.", | ||
| type: BannzeichenIdentifier(), | ||
| }), | ||
| cost: DB.Optional({ | ||
| comment: "The option-specific AE cost.", | ||
| type: DB.IncludeIdentifier(SingleBannzeichenCost), | ||
| }), | ||
| improvement_cost: DB.Optional({ | ||
| comment: "The option-specific improvement cost.", | ||
| type: DB.IncludeIdentifier(ImprovementCost), | ||
| }), | ||
| suboption: DB.Optional({ | ||
| type: DB.IncludeIdentifier(BannzeichenSuboption), | ||
| }), | ||
| translations: NestedTranslationMap( | ||
| DB.Required, | ||
| "BannzeichenOption", | ||
| DB.Object({ | ||
| name: DB.Required({ | ||
| comment: `The Bannzeichen option’s name. | ||
|
|
||
| The surrounding parenthesis will/should not be included, they will/should be generated.`, | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| native_name: DB.Required({ | ||
| comment: "The native name of the Bannzeichen option.", | ||
| type: DB.String({ minLength: 1 }), | ||
| }), | ||
| }), | ||
| ), | ||
| }), | ||
| parentReferenceKey: "parent", | ||
| instanceDisplayName: {}, | ||
| }) | ||
|
|
||
| const BannzeichenSuboption = DB.Enum(import.meta.url, { | ||
| name: "BannzeichenSuboption", | ||
| values: () => ({ | ||
| Custom: DB.EnumCase({ | ||
| comment: "The sub-option may be defined by the user (as a arbitrary text).", | ||
| type: DB.IncludeIdentifier(CustomBannzeichenSuboption), | ||
| }), | ||
| }), | ||
| }) | ||
|
|
||
| const CustomBannzeichenSuboption = DB.TypeAlias(import.meta.url, { | ||
| name: "CustomBannzeichenSuboption", | ||
| type: () => | ||
| DB.Object({ | ||
| translations: NestedTranslationMap( | ||
| DB.Required, | ||
| "CustomBannzeichenSuboption", | ||
| DB.Object( | ||
| { | ||
| examples: DB.Optional({ | ||
| comment: "One or more examples for the suboption.", | ||
| type: DB.Array(DB.String({ minLength: 1 }), { minItems: 1, uniqueItems: true }), | ||
| }), | ||
| }, | ||
| { minProperties: 1 }, | ||
| ), | ||
| ), | ||
| }), | ||
| }) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.