Fixes #411
This commit is contained in:
+392
@@ -0,0 +1,392 @@
|
||||
export interface RawHero {
|
||||
/**
|
||||
* A date in milliseconds with the `H_` prefix.
|
||||
*/
|
||||
id: string
|
||||
|
||||
/**
|
||||
* The name of the hero.
|
||||
*/
|
||||
name: string
|
||||
|
||||
/**
|
||||
* The client version the hero was created with.
|
||||
*/
|
||||
dateCreated: string
|
||||
|
||||
/**
|
||||
* The date of creation.
|
||||
*/
|
||||
dateModified: string
|
||||
|
||||
/**
|
||||
* The date of last modification.
|
||||
*/
|
||||
clientVersion: string
|
||||
|
||||
/**
|
||||
* The locale the hero was created with.
|
||||
*/
|
||||
locale?: string
|
||||
|
||||
/**
|
||||
* A path to an image or a base64-encoded image.
|
||||
*/
|
||||
avatar?: string
|
||||
|
||||
/**
|
||||
* The adventure points.
|
||||
*/
|
||||
ap: {
|
||||
/**
|
||||
* The amount of total AP.
|
||||
*/
|
||||
total: number
|
||||
}
|
||||
|
||||
/**
|
||||
* The selected race's ID.
|
||||
*/
|
||||
r?: string
|
||||
|
||||
/**
|
||||
* The selected race variant's ID.
|
||||
*/
|
||||
rv?: string
|
||||
|
||||
/**
|
||||
* The selected culture's ID.
|
||||
*/
|
||||
c?: string
|
||||
|
||||
/**
|
||||
* Has the cultural package been activated?
|
||||
*/
|
||||
isCulturalPackageActive?: boolean
|
||||
|
||||
/**
|
||||
* The selected profession's ID.
|
||||
*/
|
||||
p?: string
|
||||
|
||||
/**
|
||||
* The changed profession name for a Custom Profession.
|
||||
*/
|
||||
professionName?: string
|
||||
|
||||
/**
|
||||
* The selected profession variant's ID.
|
||||
*/
|
||||
pv?: string
|
||||
|
||||
/**
|
||||
* The selected sex.
|
||||
*/
|
||||
sex: "m" | "f"
|
||||
|
||||
/**
|
||||
* The rules defined for this hero.
|
||||
*/
|
||||
rules: {
|
||||
/**
|
||||
* Optional Rule Higher Parade Values. `0` means inactive.
|
||||
*/
|
||||
higherParadeValues: number
|
||||
|
||||
/**
|
||||
* Optional Rule Attribute Value Limit.
|
||||
*/
|
||||
attributeValueLimit: boolean
|
||||
|
||||
/**
|
||||
* If all rule books except those with adult content are enabled.
|
||||
*/
|
||||
enableAllRuleBooks?: boolean
|
||||
|
||||
/**
|
||||
* Explicitly enabled rule books.
|
||||
*/
|
||||
enabledRuleBooks?: string[]
|
||||
|
||||
/**
|
||||
* Optional Rule Language Specializations
|
||||
*/
|
||||
enableLanguageSpecializations: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* The creation phase. `1` is RCP selection, `2` standard hero creation and
|
||||
* `3` after hero creation.
|
||||
*/
|
||||
phase: number
|
||||
|
||||
/**
|
||||
* The selected experience level's ID.
|
||||
*/
|
||||
el: string
|
||||
|
||||
/**
|
||||
* Personal Data
|
||||
*/
|
||||
pers: {
|
||||
family?: string
|
||||
placeofbirth?: string
|
||||
dateofbirth?: string
|
||||
age?: string
|
||||
haircolor?: number
|
||||
eyecolor?: number
|
||||
size?: string
|
||||
weight?: string
|
||||
title?: string
|
||||
socialstatus?: number
|
||||
characteristics?: string
|
||||
otherinfo?: string
|
||||
cultureAreaKnowledge?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* A dictionary of active advantages, disadvantages and special abilities,
|
||||
* where the key is the ID of the entry and the value are the options.
|
||||
*/
|
||||
activatable: {
|
||||
[id: string]: {
|
||||
sid?: string | number
|
||||
sid2?: string | number
|
||||
sid3?: string | number
|
||||
tier?: number
|
||||
cost?: number
|
||||
}[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Attributes and energy settings. Either the older version with attribute
|
||||
* values as tuples or the newer version with objects as attribute values and
|
||||
* a separate value for the selected attribute with adjustment.
|
||||
*/
|
||||
attr: {
|
||||
/**
|
||||
* An array of attribute tuples. The first elememt is the ID, the second the
|
||||
* value and the third the attribute adjustment.
|
||||
*/
|
||||
values: [string, number, number][]
|
||||
lp: number
|
||||
ae: number
|
||||
kp: number
|
||||
permanentLP?: {
|
||||
lost: number
|
||||
}
|
||||
permanentAE: {
|
||||
lost: number
|
||||
redeemed: number
|
||||
}
|
||||
permanentKP: {
|
||||
lost: number
|
||||
redeemed: number
|
||||
}
|
||||
} | {
|
||||
/**
|
||||
* The list of attributes and their values.
|
||||
*/
|
||||
values: { id: string; value: number }[]
|
||||
attributeAdjustmentSelected: string
|
||||
lp: number
|
||||
ae: number
|
||||
kp: number
|
||||
permanentLP?: {
|
||||
lost: number
|
||||
}
|
||||
permanentAE: {
|
||||
lost: number
|
||||
redeemed: number
|
||||
}
|
||||
permanentKP: {
|
||||
lost: number
|
||||
redeemed: number
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A dictionary of active skills, where the key is the ID of the skill and the
|
||||
* value is the SR.
|
||||
*/
|
||||
talents: { [id: string]: number }
|
||||
|
||||
/**
|
||||
* A dictionary of active combat techniques, where the key is the ID of the
|
||||
* combat technique and the value is the CtR.
|
||||
*/
|
||||
ct: { [id: string]: number }
|
||||
|
||||
/**
|
||||
* A dictionary of active spells, where the key is the ID of the spell and the
|
||||
* value is the SR. A spell listed here is always activated, all others are
|
||||
* inactive.
|
||||
*/
|
||||
spells: { [id: string]: number }
|
||||
|
||||
/**
|
||||
* Activated cantrips by ID.
|
||||
*/
|
||||
cantrips: string[]
|
||||
|
||||
/**
|
||||
* A dictionary of active liturgical chants, where the key is the ID of the
|
||||
* liturgical chant and the value is the SR. A liturgical chant listed here is
|
||||
* always activated, all others are inactive.
|
||||
*/
|
||||
liturgies: { [id: string]: number }
|
||||
|
||||
/**
|
||||
* Activated blessings by ID.
|
||||
*/
|
||||
blessings: string[]
|
||||
|
||||
/**
|
||||
* The belongings of the hero.
|
||||
*/
|
||||
belongings: {
|
||||
/**
|
||||
* A dictionary of items, where the key is the ID of the item and the value
|
||||
* are the item's values.
|
||||
*/
|
||||
items: {
|
||||
[id: string]: {
|
||||
id: string
|
||||
price?: number
|
||||
weight?: number
|
||||
template?: string
|
||||
imp?: number
|
||||
gr: number
|
||||
combatTechnique?: string
|
||||
damageDiceNumber?: number
|
||||
damageDiceSides?: number
|
||||
damageFlat?: number
|
||||
primaryThreshold?: {
|
||||
/**
|
||||
* May be either `string` (before `1.3.0-alpha.2`) or
|
||||
* `string | [string, string]`.
|
||||
*/
|
||||
primary?: string | [string, string]
|
||||
threshold: number | number[]
|
||||
}
|
||||
at?: number
|
||||
pa?: number
|
||||
reach?: number
|
||||
length?: number
|
||||
|
||||
/**
|
||||
* May be either `string | number` (before `1.1.0-alpha.9`), `string`
|
||||
* (before `1.3.0-alpha.2`) or `number | number[]`.
|
||||
*/
|
||||
stp?: string | number | number[]
|
||||
range?: number[]
|
||||
|
||||
/**
|
||||
* May be either `string | number` (before `1.1.0-alpha.9`), `string`
|
||||
* (before `1.3.0-alpha.2`) or `number | number[]`.
|
||||
*/
|
||||
reloadTime?: string | number | number[]
|
||||
ammunition?: string
|
||||
pro?: number
|
||||
enc?: number
|
||||
addPenalties?: boolean
|
||||
isParryingWeapon?: boolean
|
||||
isTwoHandedWeapon?: boolean
|
||||
armorType?: number
|
||||
iniMod?: number
|
||||
movMod?: number
|
||||
stabilityMod?: number
|
||||
name: string
|
||||
amount: number
|
||||
isTemplateLocked: boolean
|
||||
loss?: number
|
||||
forArmorZoneOnly?: boolean
|
||||
where?: string
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A dictionary of hit zone armors, where the key is the ID of the hit zone
|
||||
* armor and the value are the hit zone armor's values.
|
||||
*/
|
||||
armorZones?: {
|
||||
[id: string]: {
|
||||
id: string
|
||||
name: string
|
||||
head?: string
|
||||
headLoss?: number
|
||||
leftArm?: string
|
||||
leftArmLoss?: number
|
||||
rightArm?: string
|
||||
rightArmLoss?: number
|
||||
torso?: string
|
||||
torsoLoss?: number
|
||||
leftLeg?: string
|
||||
leftLegLoss?: number
|
||||
rightLeg?: string
|
||||
rightLegLoss?: number
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The money of the hero.
|
||||
*/
|
||||
purse: {
|
||||
d: string
|
||||
s: string
|
||||
h: string
|
||||
k: string
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A dictionary of pets, where the key is the ID of the pet and the value are
|
||||
* the pet's values.
|
||||
*/
|
||||
pets?: {
|
||||
[id: string]: {
|
||||
id: string
|
||||
name: string
|
||||
avatar?: string
|
||||
size?: string
|
||||
type?: string
|
||||
attack?: string
|
||||
dp?: string
|
||||
reach?: string
|
||||
actions?: string
|
||||
talents?: string
|
||||
skills?: string
|
||||
notes?: string
|
||||
spentAp?: string
|
||||
totalAp?: string
|
||||
cou?: string
|
||||
sgc?: string
|
||||
int?: string
|
||||
cha?: string
|
||||
dex?: string
|
||||
agi?: string
|
||||
con?: string
|
||||
str?: string
|
||||
lp?: string
|
||||
ae?: string
|
||||
spi?: string
|
||||
tou?: string
|
||||
pro?: string
|
||||
ini?: string
|
||||
mov?: string
|
||||
at?: string
|
||||
pa?: string
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The pact, if applicable.
|
||||
*/
|
||||
pact?: {
|
||||
category: number
|
||||
level: number
|
||||
type: number
|
||||
domain: number | string
|
||||
name: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,466 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "Schema/Hero/Hero.l10n.schema.json",
|
||||
"$ref": "#/definitions/Hero",
|
||||
"definitions": {
|
||||
"Hero": {
|
||||
"title": "RawHeroBase",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "A date in milliseconds with the \"H_\" prefix.",
|
||||
"type": "string",
|
||||
"pattern": "^H_[1-9]\\d*$"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the hero.",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"clientVersion": {
|
||||
"description": "The client version the hero was created with.",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(\\w+)\\.(0|[1-9]\\d*))?"
|
||||
},
|
||||
"dateCreated": {
|
||||
"description": "The date of creation.",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"format": "date-time"
|
||||
},
|
||||
"dateModified": {
|
||||
"description": "The date of last modification.",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"format": "date-time"
|
||||
},
|
||||
"locale": {
|
||||
"description": "The locale the hero was created with.",
|
||||
"type": "string",
|
||||
"pattern": "^[a-z]\\-[A-Z]$"
|
||||
},
|
||||
"avatar": {
|
||||
"description": "A path to an image or a base64-encoded image.",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"ap": {
|
||||
"description": "A path to an image or a base64-encoded image.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"description": "The amount of total AP.",
|
||||
"type": "number",
|
||||
"minimum": 1
|
||||
}
|
||||
},
|
||||
"required": ["total"]
|
||||
},
|
||||
"r": {
|
||||
"description": "The selected race's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^R_[1-9]\\d*$"
|
||||
},
|
||||
"rv": {
|
||||
"description": "The selected race variant's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^RV_[1-9]\\d*$"
|
||||
},
|
||||
"c": {
|
||||
"description": "The selected culture's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^C_[1-9]\\d*$"
|
||||
},
|
||||
"isCulturalPackageActive": {
|
||||
"description": "Has the cultural package been activated?",
|
||||
"type": "boolean"
|
||||
},
|
||||
"p": {
|
||||
"description": "The selected profession's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^P_[1-9]\\d*$"
|
||||
},
|
||||
"professionName": {
|
||||
"description": "The changed profession name for a Custom Profession.",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"pv": {
|
||||
"description": "The selected profession variant's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^PV_[1-9]\\d*$"
|
||||
},
|
||||
"sex": {
|
||||
"description": "The selected sex.",
|
||||
"type": "string",
|
||||
"enum": ["m", "f"]
|
||||
},
|
||||
"rules": {
|
||||
"description": "The rules defined for this hero.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"higherParadeValues": {
|
||||
"description": "Optional Rule Higher Parade Values. `0` means inactive.",
|
||||
"type": "number",
|
||||
"enum": [0, 2, 4]
|
||||
},
|
||||
"attributeValueLimit": {
|
||||
"description": "Optional Rule Attribute Value Limit.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enableAllRuleBooks": {
|
||||
"description": "If all rule books except those with adult content are enabled.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enabledRuleBooks": {
|
||||
"description": "Explicitly enabled rule books.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A book ID.",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"enableLanguageSpecializations": {
|
||||
"description": "Optional Rule Language Specializations",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"higherParadeValues",
|
||||
"attributeValueLimit",
|
||||
"enableLanguageSpecializations"
|
||||
]
|
||||
},
|
||||
"phase": {
|
||||
"description": "The creation phase. `1` is RCP selection, `2` standard hero creation and `3` after hero creation.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 3
|
||||
},
|
||||
"el": {
|
||||
"description": "The selected experience level's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^EL_[1-9]\\d*$"
|
||||
},
|
||||
"pers": {
|
||||
"description": "Personal Data",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"family": { "type": "string", "minLength": 1 },
|
||||
"placeofbirth": { "type": "string", "minLength": 1 },
|
||||
"dateofbirth": { "type": "string", "minLength": 1 },
|
||||
"age": { "type": "string", "minLength": 1 },
|
||||
"haircolor": { "type": "string", "minLength": 1 },
|
||||
"eyecolor": { "type": "string", "minLength": 1 },
|
||||
"size": { "type": "string", "minLength": 1 },
|
||||
"weight": { "type": "string", "minLength": 1 },
|
||||
"title": { "type": "string", "minLength": 1 },
|
||||
"socialstatus": { "type": "number", "minimum": 1, "maximum": 5 },
|
||||
"characteristics": { "type": "string", "minLength": 1 },
|
||||
"otherinfo": { "type": "string", "minLength": 1 },
|
||||
"cultureAreaKnowledge": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
},
|
||||
"activatable": {
|
||||
"description": "A dictionary of active advantages, disadvantages and special abilities, where the key is the ID of the entry and the value are the options.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^(ADV|DISADV|SA)_[1-9]\\d*$": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sid": {
|
||||
"oneOf": [
|
||||
{ "type": "string", "minLength": 1, "pattern": "^[A-Z]+_[1-9]\\d*$" },
|
||||
{ "type": "integer", "minimum": 1 }
|
||||
]
|
||||
},
|
||||
"sid2": {
|
||||
"oneOf": [
|
||||
{ "type": "string", "minLength": 1, "pattern": "^[A-Z]+_[1-9]\\d*$" },
|
||||
{ "type": "integer", "minimum": 1 }
|
||||
]
|
||||
},
|
||||
"sid3": {
|
||||
"oneOf": [
|
||||
{ "type": "string", "minLength": 1, "pattern": "^[A-Z]+_[1-9]\\d*$" },
|
||||
{ "type": "integer", "minimum": 1 }
|
||||
]
|
||||
},
|
||||
"tier": { "type": "integer", "minimum": 1 },
|
||||
"cost": { "type": "integer", "minimum": 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"attr": {
|
||||
"description": "Attributes and energy settings. Either the older version with attribute values as tuples or the newer version with objects as attribute values and a separate value for the selected attribute with adjustment.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"description": "An array of attribute tuples. The first elememt is the ID, the second the value and the third the attribute adjustment.",
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"description": "The attribute's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^ATTR_[1-9]\\d*$"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 8
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"lp": { "type": "integer", "minimum": 0 },
|
||||
"ae": { "type": "integer", "minimum": 0 },
|
||||
"kp": { "type": "integer", "minimum": 0 },
|
||||
"permanentLP": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lost": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"permanentAE": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lost": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"redeemed": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"permanentKP": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lost": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"redeemed": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"values",
|
||||
"lp",
|
||||
"ae",
|
||||
"kp",
|
||||
"permanentAE",
|
||||
"permanentKP"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"description": "The list of attributes and their values.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The attribute's ID.",
|
||||
"type": "string",
|
||||
"pattern": "^ATTR_[1-9]\\d*$"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"minimum": 8
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"attributeAdjustmentSelected": {
|
||||
"type": "string",
|
||||
"pattern": "^ATTR_[1-9]\\d*$"
|
||||
},
|
||||
"lp": { "type": "integer", "minimum": 0 },
|
||||
"ae": { "type": "integer", "minimum": 0 },
|
||||
"kp": { "type": "integer", "minimum": 0 },
|
||||
"permanentLP": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lost": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"permanentAE": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lost": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"redeemed": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"permanentKP": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lost": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"redeemed": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"values",
|
||||
"attributeAdjustmentSelected",
|
||||
"lp",
|
||||
"ae",
|
||||
"kp",
|
||||
"permanentAE",
|
||||
"permanentKP"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"talents": {
|
||||
"description": "A dictionary of active skills, where the key is the ID of the skill and the value is the SR.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^TAL_[1-9]\\d*$": { "type": "integer", "minimum": 0 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ct": {
|
||||
"description": "A dictionary of active combat techniques, where the key is the ID of the combat technique and the value is the CtR.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^CT_[1-9]\\d*$": { "type": "integer", "minimum": 0 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"spells": {
|
||||
"description": "A dictionary of active spells, where the key is the ID of the spell and the value is the SR. A spell listed here is always activated, all others are inactive.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^CT_[1-9]\\d*$": { "type": "integer", "minimum": 0 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"cantrips": {
|
||||
"description": "Activated cantrips by ID.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^CANTRIP_[1-9]\\d*$"
|
||||
}
|
||||
},
|
||||
"liturgies": {
|
||||
"description": "A dictionary of active liturgical chants, where the key is the ID of the liturgical chant and the value is the SR. A liturgical chant listed here is always activated, all others are inactive.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^LITURGY_[1-9]\\d*$": { "type": "integer", "minimum": 0 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"blessings": {
|
||||
"description": "Activated blessings by ID.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^BLESSING_[1-9]\\d*$"
|
||||
}
|
||||
},
|
||||
"belongings": {
|
||||
"description": "The belongings of the hero.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"description": "A dictionary of items, where the key is the ID of the item and the value are the item's values.",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^ITEM_[1-9]\\d*$": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^ITEM_[1-9]\\d*$"
|
||||
},
|
||||
"price": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"weight": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"items"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"name",
|
||||
"clientVersion",
|
||||
"dateCreated",
|
||||
"dateModified",
|
||||
"ap",
|
||||
"sex",
|
||||
"rules",
|
||||
"phase",
|
||||
"el",
|
||||
"pers",
|
||||
"activatable",
|
||||
"attr",
|
||||
"talents",
|
||||
"ct",
|
||||
"spells",
|
||||
"cantrips",
|
||||
"liturgies",
|
||||
"blessings"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,32 @@
|
||||
type cost =
|
||||
| Flat(int)
|
||||
| PerLevel(list(int));
|
||||
|
||||
type overwritePrerequisite =
|
||||
| Hide
|
||||
| ReplaceWith(string);
|
||||
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
cost,
|
||||
noMaxAPInfluence: bool,
|
||||
isExclusiveToArcaneSpellworks: bool,
|
||||
input: option(string),
|
||||
max: option(int),
|
||||
levels: option(int),
|
||||
select: option(list(SelectOption.t)),
|
||||
rules: string,
|
||||
range: option(string),
|
||||
actions: option(string),
|
||||
prerequisites: Prerequisites.tWithLevelDisAdv,
|
||||
prerequisitesText: option(string),
|
||||
prerequisitesTextIndex: IntMap.t(overwritePrerequisite),
|
||||
prerequisitesTextStart: option(string),
|
||||
prerequisitesTextEnd: option(string),
|
||||
apValue: option(string),
|
||||
apValueAppend: option(string),
|
||||
gr: int,
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,7 @@
|
||||
type t = {
|
||||
id: string,
|
||||
numId: int,
|
||||
name: string,
|
||||
primary: string,
|
||||
aspects: option((int, int)),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,12 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
ic: IC.t,
|
||||
primary: list(string),
|
||||
special: option(string),
|
||||
hasNoParry: bool,
|
||||
bpr: int,
|
||||
gr: int,
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,9 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
description: option(string),
|
||||
levelColumnDescription: option(string),
|
||||
levelDescriptions: (string, string, string, string),
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
'use strict';
|
||||
|
||||
|
||||
var IncreaseSkill = { };
|
||||
|
||||
exports.IncreaseSkill = IncreaseSkill;
|
||||
/* No side effect */
|
||||
@@ -0,0 +1,48 @@
|
||||
type commonProfessionId =
|
||||
| Profession(string)
|
||||
| ProfessionGroup(int);
|
||||
|
||||
type commonProfessions =
|
||||
| All
|
||||
| OneOf(list(commonProfessionId))
|
||||
| ExceptFor(list(commonProfessionId));
|
||||
|
||||
module IncreaseSkill = {
|
||||
type t = {
|
||||
id: string,
|
||||
value: int,
|
||||
};
|
||||
};
|
||||
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
culturalPackageAdventurePoints: int,
|
||||
languages: list(int),
|
||||
scripts: list(int),
|
||||
socialStatus: list(int),
|
||||
areaKnowledge: string,
|
||||
areaKnowledgeShort: string,
|
||||
commonProfessions: (
|
||||
commonProfessions,
|
||||
commonProfessions,
|
||||
commonProfessions,
|
||||
),
|
||||
commonMundaneProfessions: option(string),
|
||||
commonMagicProfessions: option(string),
|
||||
commonBlessedProfessions: option(string),
|
||||
commonAdvantages: list(string),
|
||||
commonAdvantagesText: option(string),
|
||||
commonDisadvantages: list(string),
|
||||
commonDisadvantagesText: option(string),
|
||||
uncommonAdvantages: list(string),
|
||||
uncommonAdvantagesText: option(string),
|
||||
uncommonDisadvantages: list(string),
|
||||
uncommonDisadvantagesText: option(string),
|
||||
commonSkills: list(string),
|
||||
uncommonSkills: list(string),
|
||||
commonNames: string,
|
||||
culturalPackageSkills: list(IncreaseSkill.t),
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,8 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
short: string,
|
||||
calc: string,
|
||||
calcHalfPrimary: option(string),
|
||||
calcNoPrimary: option(string),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,32 @@
|
||||
type cost =
|
||||
| Flat(int)
|
||||
| PerLevel(list(int));
|
||||
|
||||
type overwritePrerequisite =
|
||||
| Hide
|
||||
| ReplaceWith(string);
|
||||
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
cost,
|
||||
noMaxAPInfluence: bool,
|
||||
isExclusiveToArcaneSpellworks: bool,
|
||||
input: option(string),
|
||||
max: option(int),
|
||||
levels: option(int),
|
||||
select: option(list(SelectOption.t)),
|
||||
rules: string,
|
||||
range: option(string),
|
||||
actions: option(string),
|
||||
prerequisites: Prerequisites.tWithLevelDisAdv,
|
||||
prerequisitesText: option(string),
|
||||
prerequisitesTextIndex: IntMap.t(overwritePrerequisite),
|
||||
prerequisitesTextStart: option(string),
|
||||
prerequisitesTextEnd: option(string),
|
||||
apValue: option(string),
|
||||
apValueAppend: option(string),
|
||||
gr: int,
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,5 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
items: StrMap.t(int),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,11 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
ap: int,
|
||||
maxAttributeValue: int,
|
||||
maxSkillRating: int,
|
||||
maxCombatTechniqueRating: int,
|
||||
maxTotalAttributeValues: int,
|
||||
maxSpellsLiturgicalChants: int,
|
||||
maxUnfamiliarSpells: int,
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,9 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
level: int,
|
||||
subject: int,
|
||||
description: string,
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,13 @@
|
||||
type t = {
|
||||
id: string,
|
||||
numId: option(int),
|
||||
name: string,
|
||||
primary: option(string),
|
||||
aeMod: option(float),
|
||||
canLearnCantrips: bool,
|
||||
canLearnSpells: bool,
|
||||
canLearnRituals: bool,
|
||||
allowMultipleTraditions: bool,
|
||||
isDisAdvAPMaxHalved: bool,
|
||||
areDisAdvRequiredApplyToMagActionsOrApps: bool,
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,6 @@
|
||||
type t = {
|
||||
id: int,
|
||||
name: string,
|
||||
types: IntMap.t(string),
|
||||
domains: IntMap.t(string),
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
'use strict';
|
||||
|
||||
|
||||
var NameBySex = { };
|
||||
|
||||
var IncreaseSkillList = { };
|
||||
|
||||
var Variant = { };
|
||||
|
||||
exports.NameBySex = NameBySex;
|
||||
exports.IncreaseSkillList = IncreaseSkillList;
|
||||
exports.Variant = Variant;
|
||||
/* No side effect */
|
||||
@@ -0,0 +1,76 @@
|
||||
module NameBySex = {
|
||||
type t = {
|
||||
m: string,
|
||||
f: string,
|
||||
};
|
||||
};
|
||||
|
||||
module IncreaseSkillList = {
|
||||
type t = {
|
||||
id: list(string),
|
||||
value: int,
|
||||
};
|
||||
};
|
||||
|
||||
type name =
|
||||
| Const(string)
|
||||
| BySex(NameBySex.t);
|
||||
|
||||
type skillIncrease =
|
||||
| Flat(Culture.IncreaseSkill.t)
|
||||
| Selection(IncreaseSkillList.t);
|
||||
|
||||
module Variant = {
|
||||
type t = {
|
||||
id: string,
|
||||
name,
|
||||
ap: int,
|
||||
prerequisites: Prerequisites.tProfession,
|
||||
selections: ProfessionSelectOptions.tForVariant,
|
||||
specialAbilities: list(Prerequisites.ActivatablePrerequisite.t),
|
||||
combatTechniques: list(Culture.IncreaseSkill.t),
|
||||
skills: list(Culture.IncreaseSkill.t),
|
||||
spells: list(skillIncrease),
|
||||
liturgicalChants: list(skillIncrease),
|
||||
blessings: list(string),
|
||||
precedingText: option(string),
|
||||
fullText: option(string),
|
||||
concludingText: option(string),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
};
|
||||
|
||||
type t = {
|
||||
id: string,
|
||||
name,
|
||||
subname: option(name),
|
||||
ap: option(int),
|
||||
prerequisites: Prerequisites.tProfession,
|
||||
prerequisitesStart: option(string),
|
||||
prerequisitesEnd: option(string),
|
||||
selections: ProfessionSelectOptions.t,
|
||||
specialAbilities: list(Prerequisites.ActivatablePrerequisite.t),
|
||||
combatTechniques: list(Culture.IncreaseSkill.t),
|
||||
skills: list(Culture.IncreaseSkill.t),
|
||||
spells: list(skillIncrease),
|
||||
liturgicalChants: list(skillIncrease),
|
||||
blessings: list(string),
|
||||
suggestedAdvantages: list(string),
|
||||
suggestedAdvantagesText: option(string),
|
||||
suggestedDisadvantages: list(string),
|
||||
suggestedDisadvantagesText: option(string),
|
||||
unsuitableAdvantages: list(string),
|
||||
unsuitableAdvantagesText: option(string),
|
||||
unsuitableDisadvantages: list(string),
|
||||
unsuitableDisadvantagesText: option(string),
|
||||
isVariantRequired: bool,
|
||||
variants: list(Variant.t),
|
||||
gr: int,
|
||||
/**
|
||||
* Divides the groups into smaller subgroups, e.g. "Mage", "Blessed One of the
|
||||
* Twelve Gods" or "Fighter".
|
||||
*/
|
||||
subgr: int,
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
'use strict';
|
||||
|
||||
|
||||
var CantripSelection = { };
|
||||
|
||||
var CombatTechniqueSelection = { };
|
||||
|
||||
var CurseSelection = { };
|
||||
|
||||
var LanguageScriptSelection = { };
|
||||
|
||||
var SkillSpecializationSelection = { };
|
||||
|
||||
var SkillSelection = { };
|
||||
|
||||
var TerrainKnowledgeSelection = { };
|
||||
|
||||
exports.CantripSelection = CantripSelection;
|
||||
exports.CombatTechniqueSelection = CombatTechniqueSelection;
|
||||
exports.CurseSelection = CurseSelection;
|
||||
exports.LanguageScriptSelection = LanguageScriptSelection;
|
||||
exports.SkillSpecializationSelection = SkillSpecializationSelection;
|
||||
exports.SkillSelection = SkillSelection;
|
||||
exports.TerrainKnowledgeSelection = TerrainKnowledgeSelection;
|
||||
/* No side effect */
|
||||
@@ -0,0 +1,81 @@
|
||||
module CantripSelection = {
|
||||
type t = {
|
||||
amount: int,
|
||||
sid: list(string),
|
||||
};
|
||||
};
|
||||
|
||||
module CombatTechniqueSelection = {
|
||||
type second = {
|
||||
amount: int,
|
||||
value: int,
|
||||
};
|
||||
|
||||
type t = {
|
||||
amount: int,
|
||||
value: int,
|
||||
second: option(second),
|
||||
sid: list(string),
|
||||
};
|
||||
|
||||
type tForVariant =
|
||||
| Remove
|
||||
| Overwrite(t);
|
||||
};
|
||||
|
||||
module CurseSelection = {
|
||||
type t = int;
|
||||
};
|
||||
|
||||
module LanguageScriptSelection = {
|
||||
type t = int;
|
||||
|
||||
type tForVariant =
|
||||
| Remove
|
||||
| Overwrite(t);
|
||||
};
|
||||
|
||||
module SkillSpecializationSelection = {
|
||||
type t =
|
||||
| Single(string)
|
||||
| OneOf(list(string));
|
||||
};
|
||||
|
||||
module SkillSelection = {
|
||||
type t = {
|
||||
/**
|
||||
* If specified, only choose from skills of the specified group.
|
||||
*/
|
||||
gr: option(int),
|
||||
/**
|
||||
* The AP value the user can spend.
|
||||
*/
|
||||
value: int,
|
||||
};
|
||||
};
|
||||
|
||||
module TerrainKnowledgeSelection = {
|
||||
type t = list(int);
|
||||
};
|
||||
|
||||
type t = {
|
||||
cantrips: option(CantripSelection.t),
|
||||
combatTechniques: option(CombatTechniqueSelection.t),
|
||||
curses: option(CurseSelection.t),
|
||||
languagesScripts: option(LanguageScriptSelection.t),
|
||||
skillSpecialization: option(SkillSpecializationSelection.t),
|
||||
skills: option(SkillSelection.t),
|
||||
terrainKnowledge: option(TerrainKnowledgeSelection.t),
|
||||
guildMageUnfamiliarSpell: bool,
|
||||
};
|
||||
|
||||
type tForVariant = {
|
||||
cantrips: option(CantripSelection.t),
|
||||
combatTechniques: option(CombatTechniqueSelection.tForVariant),
|
||||
curses: option(CurseSelection.t),
|
||||
languagesScripts: option(LanguageScriptSelection.tForVariant),
|
||||
skillSpecialization: option(SkillSpecializationSelection.t),
|
||||
skills: option(SkillSelection.t),
|
||||
terrainKnowledge: option(TerrainKnowledgeSelection.t),
|
||||
guildMageUnfamiliarSpell: bool,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
'use strict';
|
||||
|
||||
|
||||
var Die = { };
|
||||
|
||||
var Variant = { };
|
||||
|
||||
exports.Die = Die;
|
||||
exports.Variant = Variant;
|
||||
/* No side effect */
|
||||
@@ -0,0 +1,63 @@
|
||||
module Die = {
|
||||
type t = {
|
||||
amount: int,
|
||||
sides: int,
|
||||
};
|
||||
};
|
||||
|
||||
module Variant = {
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
commonCultures: list(string),
|
||||
commonAdvantages: list(string),
|
||||
commonAdvantagesText: option(string),
|
||||
commonDisadvantages: list(string),
|
||||
commonDisadvantagesText: option(string),
|
||||
uncommonAdvantages: list(string),
|
||||
uncommonAdvantagesText: option(string),
|
||||
uncommonDisadvantages: list(string),
|
||||
uncommonDisadvantagesText: option(string),
|
||||
hairColors: list(int),
|
||||
eyeColors: list(int),
|
||||
sizeBase: int,
|
||||
sizeRandom: list(Die.t),
|
||||
};
|
||||
};
|
||||
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
ap: int,
|
||||
lp: int,
|
||||
spi: int,
|
||||
tou: int,
|
||||
mov: int,
|
||||
attributeAdjustments: list((string, int)),
|
||||
attributeAdjustmentsSelection: (int, list(string)),
|
||||
attributeAdjustmentsText: string,
|
||||
commonCultures: list(string),
|
||||
automaticAdvantages: list(string),
|
||||
automaticAdvantagesText: option(string),
|
||||
stronglyRecommendedAdvantages: list(string),
|
||||
stronglyRecommendedAdvantagesText: option(string),
|
||||
stronglyRecommendedDisadvantages: list(string),
|
||||
stronglyRecommendedDisadvantagesText: option(string),
|
||||
commonAdvantages: list(string),
|
||||
commonAdvantagesText: option(string),
|
||||
commonDisadvantages: list(string),
|
||||
commonDisadvantagesText: option(string),
|
||||
uncommonAdvantages: list(string),
|
||||
uncommonAdvantagesText: option(string),
|
||||
uncommonDisadvantages: list(string),
|
||||
uncommonDisadvantagesText: option(string),
|
||||
hairColors: option(list(int)),
|
||||
eyeColors: option(list(int)),
|
||||
sizeBase: option(int),
|
||||
sizeRandom: option(list(Die.t)),
|
||||
weightBase: int,
|
||||
weightRandom: list(Die.t),
|
||||
variants: list(Variant.t),
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,5 @@
|
||||
type t = {
|
||||
id: int,
|
||||
name: string,
|
||||
fullName: string,
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -0,0 +1,7 @@
|
||||
type t = {
|
||||
id: string,
|
||||
name: string,
|
||||
description: string,
|
||||
src: list(SourceRef.t),
|
||||
errata: list(Erratum.t),
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
|
||||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Memoizes (only) the most recent parameter passed to the function.
|
||||
*/
|
||||
const memoizeLast = <A, B> (f: (x: A) => B) => {
|
||||
export const memoizeLast = <A, B> (f: (x: A) => B) => {
|
||||
let last: [A, B] | undefined = undefined
|
||||
|
||||
return (x: A): B => {
|
||||
|
||||
@@ -16,8 +16,6 @@ export interface RawHeroBase {
|
||||
}
|
||||
|
||||
export interface RawHero_1_2_0_alpha_11 extends RawHeroBase {
|
||||
readonly id: string
|
||||
readonly name: string
|
||||
readonly locale?: string
|
||||
readonly avatar?: string
|
||||
readonly ap: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { flip, on } from "../../Data/Function"
|
||||
import { flip, ident, on } from "../../Data/Function"
|
||||
import { fmap } from "../../Data/Functor"
|
||||
import { range } from "../../Data/Ix"
|
||||
import { consF, foldr, intercalate, List, map, reverse, setAt, sortBy } from "../../Data/List"
|
||||
import { listToMaybe, mapMaybe, maybe_ } from "../../Data/Maybe"
|
||||
import { consF, foldr, intercalate, List, map, notNull, reverse, setAt, sortBy } from "../../Data/List"
|
||||
import { ensure, listToMaybe, mapMaybe, maybe, maybe_ } from "../../Data/Maybe"
|
||||
import { compare } from "../../Data/Num"
|
||||
import { adjust, adjustDef, foldrWithKey, lookupF, OrderedMap } from "../../Data/OrderedMap"
|
||||
import { empty, insert, OrderedSet, sdelete, toList } from "../../Data/OrderedSet"
|
||||
@@ -86,15 +86,14 @@ const showPages =
|
||||
)
|
||||
|
||||
export const showSources =
|
||||
(staticData: StaticDataRecord) =>
|
||||
(staticData: StaticDataRecord): (xs: List<Record<SourceLinks>>) => string =>
|
||||
pipe (
|
||||
mapMaybe ((x: Record<SourceLinks>) =>
|
||||
pipe_ (
|
||||
x,
|
||||
SLsA.id,
|
||||
lookupF (SDA.books (staticData)),
|
||||
fmap (pipe (BA.name, name => Pair (name, showPages (SLsA.pages (x)))))
|
||||
)),
|
||||
mapMaybe (x => pipe_ (
|
||||
x,
|
||||
SLsA.id,
|
||||
lookupF (SDA.books (staticData)),
|
||||
fmap (pipe (BA.name, name => Pair (name, showPages (SLsA.pages (x)))))
|
||||
)),
|
||||
sortBy (on (compareLocale (staticData)) (fst)),
|
||||
map (x => `${fst (x)} ${snd (x)}`),
|
||||
intercalate ("; ")
|
||||
@@ -117,14 +116,17 @@ export const mergeSourcesWithout:
|
||||
adjust (flip (foldr (sdelete)) (toList (x))) (k)))
|
||||
(foldr (unfoldSources) (OrderedMap.empty) (excludes)),
|
||||
foldrWithKey ((k: string) => (x: OrderedSet<number>) =>
|
||||
consF (SourceLinks ({
|
||||
id: k,
|
||||
pages: pipe_ (
|
||||
x,
|
||||
toList,
|
||||
groupSortInt
|
||||
),
|
||||
})))
|
||||
pipe_ (
|
||||
x,
|
||||
toList,
|
||||
groupSortInt,
|
||||
ensure (notNull),
|
||||
maybe (ident as ident<List<Record<SourceLinks>>>)
|
||||
(pages => consF (SourceLinks ({
|
||||
id: k,
|
||||
pages,
|
||||
})))
|
||||
))
|
||||
(List ())
|
||||
)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Record } from "../../Data/Record"
|
||||
import { MagicalTradition } from "../Models/Wiki/MagicalTradition"
|
||||
import { StaticData } from "../Models/Wiki/WikiModel"
|
||||
import { pipe, pipe_ } from "../Utilities/pipe"
|
||||
import { memoizeLast } from "./Memo"
|
||||
|
||||
const SDA = StaticData.A
|
||||
const MTA = MagicalTradition.A
|
||||
|
||||
@@ -149,6 +149,7 @@ export const HeroCreation: React.FC<HeroCreationProps> = props => {
|
||||
onChange={setName}
|
||||
fullWidth
|
||||
autoFocus
|
||||
everyKeyDown
|
||||
/>
|
||||
<SegmentedControls
|
||||
active={msex}
|
||||
|
||||
+4
-111
@@ -3,123 +3,16 @@
|
||||
|
||||
var $$Map = require("bs-platform/lib/js/map.js");
|
||||
var Curry = require("bs-platform/lib/js/curry.js");
|
||||
var Caml_obj = require("bs-platform/lib/js/caml_obj.js");
|
||||
var Int32 = require("bs-platform/lib/js/int32.js");
|
||||
|
||||
var compare = Caml_obj.caml_compare;
|
||||
|
||||
var Int = {
|
||||
compare: compare
|
||||
};
|
||||
|
||||
var IntMap = $$Map.Make(Int);
|
||||
var IntMap = $$Map.Make({
|
||||
compare: Int32.compare
|
||||
});
|
||||
|
||||
function foldr(f, initial, mp) {
|
||||
return Curry._3(IntMap.fold, f, mp, initial);
|
||||
}
|
||||
|
||||
var empty = IntMap.empty;
|
||||
|
||||
var is_empty = IntMap.is_empty;
|
||||
|
||||
var mem = IntMap.mem;
|
||||
|
||||
var add = IntMap.add;
|
||||
|
||||
var update = IntMap.update;
|
||||
|
||||
var singleton = IntMap.singleton;
|
||||
|
||||
var remove = IntMap.remove;
|
||||
|
||||
var merge = IntMap.merge;
|
||||
|
||||
var union = IntMap.union;
|
||||
|
||||
var compare$1 = IntMap.compare;
|
||||
|
||||
var equal = IntMap.equal;
|
||||
|
||||
var iter = IntMap.iter;
|
||||
|
||||
var fold = IntMap.fold;
|
||||
|
||||
var for_all = IntMap.for_all;
|
||||
|
||||
var exists = IntMap.exists;
|
||||
|
||||
var filter = IntMap.filter;
|
||||
|
||||
var partition = IntMap.partition;
|
||||
|
||||
var cardinal = IntMap.cardinal;
|
||||
|
||||
var bindings = IntMap.bindings;
|
||||
|
||||
var min_binding = IntMap.min_binding;
|
||||
|
||||
var min_binding_opt = IntMap.min_binding_opt;
|
||||
|
||||
var max_binding = IntMap.max_binding;
|
||||
|
||||
var max_binding_opt = IntMap.max_binding_opt;
|
||||
|
||||
var choose = IntMap.choose;
|
||||
|
||||
var choose_opt = IntMap.choose_opt;
|
||||
|
||||
var split = IntMap.split;
|
||||
|
||||
var find = IntMap.find;
|
||||
|
||||
var find_opt = IntMap.find_opt;
|
||||
|
||||
var find_first = IntMap.find_first;
|
||||
|
||||
var find_first_opt = IntMap.find_first_opt;
|
||||
|
||||
var find_last = IntMap.find_last;
|
||||
|
||||
var find_last_opt = IntMap.find_last_opt;
|
||||
|
||||
var map = IntMap.map;
|
||||
|
||||
var mapi = IntMap.mapi;
|
||||
|
||||
exports.Int = Int;
|
||||
exports.IntMap = IntMap;
|
||||
exports.empty = empty;
|
||||
exports.is_empty = is_empty;
|
||||
exports.mem = mem;
|
||||
exports.add = add;
|
||||
exports.update = update;
|
||||
exports.singleton = singleton;
|
||||
exports.remove = remove;
|
||||
exports.merge = merge;
|
||||
exports.union = union;
|
||||
exports.compare = compare$1;
|
||||
exports.equal = equal;
|
||||
exports.iter = iter;
|
||||
exports.fold = fold;
|
||||
exports.for_all = for_all;
|
||||
exports.exists = exists;
|
||||
exports.filter = filter;
|
||||
exports.partition = partition;
|
||||
exports.cardinal = cardinal;
|
||||
exports.bindings = bindings;
|
||||
exports.min_binding = min_binding;
|
||||
exports.min_binding_opt = min_binding_opt;
|
||||
exports.max_binding = max_binding;
|
||||
exports.max_binding_opt = max_binding_opt;
|
||||
exports.choose = choose;
|
||||
exports.choose_opt = choose_opt;
|
||||
exports.split = split;
|
||||
exports.find = find;
|
||||
exports.find_opt = find_opt;
|
||||
exports.find_first = find_first;
|
||||
exports.find_first_opt = find_first_opt;
|
||||
exports.find_last = find_last;
|
||||
exports.find_last_opt = find_last_opt;
|
||||
exports.map = map;
|
||||
exports.mapi = mapi;
|
||||
exports.foldr = foldr;
|
||||
/* IntMap Not a pure module */
|
||||
|
||||
+1
-8
@@ -1,11 +1,4 @@
|
||||
module Int = {
|
||||
type t = int;
|
||||
let compare = compare;
|
||||
};
|
||||
|
||||
module IntMap = Map.Make(Int);
|
||||
|
||||
include IntMap;
|
||||
module IntMap = Map.Make(Int32);
|
||||
|
||||
/**
|
||||
* Right-associative fold of a structure.
|
||||
|
||||
+4
-111
@@ -3,123 +3,16 @@
|
||||
|
||||
var $$Map = require("bs-platform/lib/js/map.js");
|
||||
var Curry = require("bs-platform/lib/js/curry.js");
|
||||
var Caml_obj = require("bs-platform/lib/js/caml_obj.js");
|
||||
var $$String = require("bs-platform/lib/js/string.js");
|
||||
|
||||
var compare = Caml_obj.caml_compare;
|
||||
|
||||
var Str = {
|
||||
compare: compare
|
||||
};
|
||||
|
||||
var StrMap = $$Map.Make(Str);
|
||||
var StrMap = $$Map.Make({
|
||||
compare: $$String.compare
|
||||
});
|
||||
|
||||
function foldr(f, initial, mp) {
|
||||
return Curry._3(StrMap.fold, f, mp, initial);
|
||||
}
|
||||
|
||||
var empty = StrMap.empty;
|
||||
|
||||
var is_empty = StrMap.is_empty;
|
||||
|
||||
var mem = StrMap.mem;
|
||||
|
||||
var add = StrMap.add;
|
||||
|
||||
var update = StrMap.update;
|
||||
|
||||
var singleton = StrMap.singleton;
|
||||
|
||||
var remove = StrMap.remove;
|
||||
|
||||
var merge = StrMap.merge;
|
||||
|
||||
var union = StrMap.union;
|
||||
|
||||
var compare$1 = StrMap.compare;
|
||||
|
||||
var equal = StrMap.equal;
|
||||
|
||||
var iter = StrMap.iter;
|
||||
|
||||
var fold = StrMap.fold;
|
||||
|
||||
var for_all = StrMap.for_all;
|
||||
|
||||
var exists = StrMap.exists;
|
||||
|
||||
var filter = StrMap.filter;
|
||||
|
||||
var partition = StrMap.partition;
|
||||
|
||||
var cardinal = StrMap.cardinal;
|
||||
|
||||
var bindings = StrMap.bindings;
|
||||
|
||||
var min_binding = StrMap.min_binding;
|
||||
|
||||
var min_binding_opt = StrMap.min_binding_opt;
|
||||
|
||||
var max_binding = StrMap.max_binding;
|
||||
|
||||
var max_binding_opt = StrMap.max_binding_opt;
|
||||
|
||||
var choose = StrMap.choose;
|
||||
|
||||
var choose_opt = StrMap.choose_opt;
|
||||
|
||||
var split = StrMap.split;
|
||||
|
||||
var find = StrMap.find;
|
||||
|
||||
var find_opt = StrMap.find_opt;
|
||||
|
||||
var find_first = StrMap.find_first;
|
||||
|
||||
var find_first_opt = StrMap.find_first_opt;
|
||||
|
||||
var find_last = StrMap.find_last;
|
||||
|
||||
var find_last_opt = StrMap.find_last_opt;
|
||||
|
||||
var map = StrMap.map;
|
||||
|
||||
var mapi = StrMap.mapi;
|
||||
|
||||
exports.Str = Str;
|
||||
exports.StrMap = StrMap;
|
||||
exports.empty = empty;
|
||||
exports.is_empty = is_empty;
|
||||
exports.mem = mem;
|
||||
exports.add = add;
|
||||
exports.update = update;
|
||||
exports.singleton = singleton;
|
||||
exports.remove = remove;
|
||||
exports.merge = merge;
|
||||
exports.union = union;
|
||||
exports.compare = compare$1;
|
||||
exports.equal = equal;
|
||||
exports.iter = iter;
|
||||
exports.fold = fold;
|
||||
exports.for_all = for_all;
|
||||
exports.exists = exists;
|
||||
exports.filter = filter;
|
||||
exports.partition = partition;
|
||||
exports.cardinal = cardinal;
|
||||
exports.bindings = bindings;
|
||||
exports.min_binding = min_binding;
|
||||
exports.min_binding_opt = min_binding_opt;
|
||||
exports.max_binding = max_binding;
|
||||
exports.max_binding_opt = max_binding_opt;
|
||||
exports.choose = choose;
|
||||
exports.choose_opt = choose_opt;
|
||||
exports.split = split;
|
||||
exports.find = find;
|
||||
exports.find_opt = find_opt;
|
||||
exports.find_first = find_first;
|
||||
exports.find_first_opt = find_first_opt;
|
||||
exports.find_last = find_last;
|
||||
exports.find_last_opt = find_last_opt;
|
||||
exports.map = map;
|
||||
exports.mapi = mapi;
|
||||
exports.foldr = foldr;
|
||||
/* StrMap Not a pure module */
|
||||
|
||||
+1
-8
@@ -1,11 +1,4 @@
|
||||
module Str = {
|
||||
type t = string;
|
||||
let compare = compare;
|
||||
};
|
||||
|
||||
module StrMap = Map.Make(Str);
|
||||
|
||||
include StrMap;
|
||||
module StrMap = Map.Make(String);
|
||||
|
||||
/**
|
||||
* Right-associative fold of a structure.
|
||||
|
||||
Reference in New Issue
Block a user