Upgrade armors
This commit is contained in:
parent
27c420200e
commit
4e6abebd70
43
lang/en.json
43
lang/en.json
@ -83,6 +83,37 @@
|
||||
},
|
||||
"app": {
|
||||
"label": "Appearance"
|
||||
}
|
||||
},
|
||||
"saves": {
|
||||
"will": {
|
||||
"label": "Will"
|
||||
},
|
||||
"dodge": {
|
||||
"label": "Dodge"
|
||||
},
|
||||
"toughness": {
|
||||
"label": "Toughness"
|
||||
},
|
||||
"contagion": {
|
||||
"label": "Contagion"
|
||||
},
|
||||
"poison": {
|
||||
"label": "Poison"
|
||||
},
|
||||
"pain": {
|
||||
"label": "Pain"
|
||||
}
|
||||
},
|
||||
"challenges": {
|
||||
"str": {
|
||||
"label": "Strength"
|
||||
},
|
||||
"agility": {
|
||||
"label": "Agility"
|
||||
},
|
||||
"dying": {
|
||||
"label": "Dying"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -176,6 +207,9 @@
|
||||
"mace": "Mace"
|
||||
},
|
||||
"FIELDS": {
|
||||
"equipped": {
|
||||
"label": "Equipped"
|
||||
},
|
||||
"weaponType": {
|
||||
"label": "Type"
|
||||
},
|
||||
@ -259,6 +293,12 @@
|
||||
"heavy": "Heavy"
|
||||
},
|
||||
"FIELDS": {
|
||||
"equipped": {
|
||||
"label": "Equipped?"
|
||||
},
|
||||
"isHelmet": {
|
||||
"label": "Is Helmet?"
|
||||
},
|
||||
"armorType": {
|
||||
"label": "Category"
|
||||
},
|
||||
@ -287,6 +327,9 @@
|
||||
},
|
||||
"Shield": {
|
||||
"FIELDS": {
|
||||
"equipped": {
|
||||
"label": "Equipped"
|
||||
},
|
||||
"defense": {
|
||||
"label": "Defense"
|
||||
},
|
||||
|
@ -33,7 +33,7 @@ export const CHARACTERISTICS = Object.freeze({
|
||||
},
|
||||
})
|
||||
|
||||
export const SAVES = Object.freeze({
|
||||
export const CHALLENGES = Object.freeze({
|
||||
str: {
|
||||
id: "str",
|
||||
label: "LETHALFANTASY.Character.str.label"
|
||||
@ -45,7 +45,10 @@ export const SAVES = Object.freeze({
|
||||
dying: {
|
||||
id: "dying",
|
||||
label: "LETHALFANTASY.Character.dying.label"
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
export const SAVES = Object.freeze({
|
||||
will: {
|
||||
id: "will",
|
||||
label: "LETHALFANTASY.Character.will.label"
|
||||
@ -57,5 +60,17 @@ export const SAVES = Object.freeze({
|
||||
toughness: {
|
||||
id: "toughness",
|
||||
label: "LETHALFANTASY.Character.toughness.label"
|
||||
},
|
||||
contagion: {
|
||||
id: "contagion",
|
||||
label: "LETHALFANTASY.Character.contagion.label"
|
||||
},
|
||||
poison: {
|
||||
id: "poison",
|
||||
label: "LETHALFANTASY.Character.poison.label"
|
||||
},
|
||||
pain: {
|
||||
id: "pain",
|
||||
label: "LETHALFANTASY.Character.pain.label"
|
||||
}
|
||||
})
|
||||
|
@ -71,6 +71,7 @@ export const SYSTEM = {
|
||||
CHARACTERISTICS_TABLES: CHARACTERISTICS.TABLES,
|
||||
CHARACTERISTICS_MAJOR: CHARACTERISTICS.MAJOR,
|
||||
SAVES: CHARACTER.SAVES,
|
||||
CHALLENGES: CHARACTER.CHALLENGES,
|
||||
SKILL_CATEGORY: SKILL.CATEGORY,
|
||||
ARMOR_TYPE: ARMOR.TYPE,
|
||||
EQUIPMENT_CATEGORY: EQUIPMENT.CATEGORY,
|
||||
|
@ -8,11 +8,13 @@ export default class LethalFantasyArmor extends foundry.abstract.TypeDataModel {
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
schema.armorType = new fields.StringField({ required: true, initial: "light", choices: SYSTEM.ARMOR_TYPE })
|
||||
schema.defense = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: -50 })
|
||||
schema.maximumMovement = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.maximumMovement = new fields.StringField({ ...requiredInteger, required: true, initial: "" })
|
||||
schema.hp = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.damageReduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
|
||||
schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.equipped = new fields.BooleanField({ required: true, initial: false })
|
||||
schema.isHelmet = new fields.BooleanField({ required: true, initial: false })
|
||||
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
|
||||
|
@ -29,7 +29,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
}, {}),
|
||||
)
|
||||
|
||||
// Carac
|
||||
// Save
|
||||
const saveField = (label) => {
|
||||
const schema = {
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
@ -42,6 +42,21 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
return obj
|
||||
}, {}),
|
||||
)
|
||||
|
||||
// Challenges
|
||||
const challengeField = (label) => {
|
||||
const schema = {
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
}
|
||||
return new fields.SchemaField(schema, { label })
|
||||
}
|
||||
schema.challenges = new fields.SchemaField(
|
||||
Object.values(SYSTEM.CHALLENGES).reduce((obj, save) => {
|
||||
obj[save.id] = challengeField(save.label)
|
||||
return obj
|
||||
}, {}),
|
||||
)
|
||||
|
||||
schema.hp = new fields.SchemaField({
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
@ -80,8 +95,25 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
schema.developmentPoints = new fields.SchemaField({
|
||||
total: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
remaining: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
})
|
||||
schema.spellMiraclePoints = new fields.SchemaField({
|
||||
total: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
used: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
})
|
||||
|
||||
const moneyField = (label) => {
|
||||
const schema = {
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
}
|
||||
return new fields.SchemaField(schema, { label })
|
||||
}
|
||||
schema.moneys = new fields.SchemaField(
|
||||
Object.values(SYSTEM.MONEY).reduce((obj, save) => {
|
||||
obj[save.id] = moneyField(save.label)
|
||||
return obj
|
||||
}, {}),
|
||||
)
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ export default class LethalFantasyShield extends foundry.abstract.TypeDataModel
|
||||
schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
|
||||
schema.equipped = new fields.BooleanField({ required: true, initial: false })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
@ -43,7 +43,8 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel {
|
||||
schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
|
||||
|
||||
schema.equipped = new fields.BooleanField({ required: true, initial: false })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
"download": "#{DOWNLOAD}#",
|
||||
"url": "#{URL}#",
|
||||
"license": "LICENSE",
|
||||
"version": "12.0.2",
|
||||
"version": "12.0.3",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald",
|
||||
|
@ -11,6 +11,9 @@
|
||||
{{formField systemFields.damageReduction value=system.damageReduction}}
|
||||
{{formField systemFields.encLoad value=system.encLoad}}
|
||||
|
||||
{{formField systemFields.isHelmet value=system.isHelmet}}
|
||||
{{formField systemFields.equipped value=system.equipped}}
|
||||
|
||||
{{formField systemFields.cost value=system.cost}}
|
||||
{{formField systemFields.money value=system.money localize=true}}
|
||||
|
||||
|
@ -36,6 +36,8 @@
|
||||
{{formField systemFields.autodestruction.fields.slashing value=system.autodestruction.slashing}}
|
||||
{{formField systemFields.autodestruction.fields.piercing value=system.autodestruction.piercing}}
|
||||
</div>
|
||||
|
||||
{{formField systemFields.equipped value=system.equipped}}
|
||||
|
||||
{{formField systemFields.encLoad value=system.encLoad}}
|
||||
|
||||
|
@ -55,6 +55,8 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{formField systemFields.equipped value=system.equipped}}
|
||||
|
||||
{{formField systemFields.encLoad value=system.encLoad}}
|
||||
|
||||
{{formField systemFields.cost value=system.cost}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user