diff --git a/module/config/system.mjs b/module/config/system.mjs index 9ed5a0f..1246cd2 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -49,6 +49,24 @@ export const MONEY = { } } +export const DICE_VALUES = { + "d3": "D3", + "d4": "D4", + "d6": "D6", + "d8": "D8", + "d10": "D10", + "d12": "D12", + "d20": "D20" +} + +export const DEFENSE_DICE_VALUES = { + "d3": "D3", + "d4": "D4", + "d6": "D6", + "d8": "D8", + "d10": "D10" +} + export const ASCII = ` ······················································································································ : : @@ -78,7 +96,8 @@ export const SYSTEM = { SPELL_RANGE: SPELL.RANGE, WEAPON_TYPE: WEAPON.WEAPON_TYPE, WEAPON_CLASS: WEAPON.WEAPON_CLASS, - COMBAT_PROGRESSION_DICE: WEAPON.COMBAT_PROGRESSION_DICE, + COMBAT_PROGRESSION_DICE: DICE_VALUES, + SHIELD_DEFENSE_DICE: DEFENSE_DICE_VALUES, MONEY, ASCII, ROLL_TYPE, diff --git a/module/config/weapon.mjs b/module/config/weapon.mjs index 8d45485..553588a 100644 --- a/module/config/weapon.mjs +++ b/module/config/weapon.mjs @@ -4,16 +4,6 @@ export const WEAPON_TYPE = { "ranged": "LETHALFANTASY.Weapon.WeaponType.ranged" } -export const COMBAT_PROGRESSION_DICE = { - "d3": "D3", - "d4": "D4", - "d6": "D6", - "d8": "D8", - "d10": "D10", - "d12": "D12", - "d20": "D20" -} - export const WEAPON_CLASS = { "longblade": "LETHALFANTASY.Weapon.WeaponClass.longblade", "shortblade": "LETHALFANTASY.Weapon.WeaponClass.shortblade", diff --git a/module/models/shield.mjs b/module/models/shield.mjs index 8ed321e..e7c9fad 100644 --- a/module/models/shield.mjs +++ b/module/models/shield.mjs @@ -6,8 +6,9 @@ export default class LethalFantasyShield extends foundry.abstract.TypeDataModel const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.defense = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: -50 }) + schema.defense = new fields.StringField({required: true, initial: "d4", choices: SYSTEM.SHIELD_DEFENSE_DICE}) schema.movementreduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) + schema.standing = new fields.SchemaField({ min: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }), max: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) diff --git a/system.json b/system.json index 47aa1e5..d3f0ba4 100644 --- a/system.json +++ b/system.json @@ -6,7 +6,7 @@ "download": "#{DOWNLOAD}#", "url": "#{URL}#", "license": "LICENSE", - "version": "12.0.6", + "version": "12.0.7", "authors": [ { "name": "Uberwald", diff --git a/templates/shield.hbs b/templates/shield.hbs index 728c12b..055571b 100644 --- a/templates/shield.hbs +++ b/templates/shield.hbs @@ -2,24 +2,24 @@
{{formInput fields.name value=source.name}} -
- + +
- {{formField systemFields.defense value=system.defense}} - {{formField systemFields.movementreduction value=system.movementreduction}} - - -
- {{formField systemFields.standing.fields.min value=system.standing.min}} - {{formField systemFields.standing.fields.max value=system.standing.min}} -
+ {{formField systemFields.defense value=system.defense}} +
  +
+ + +
+ +
{{formField systemFields.standing.fields.min value=system.standing.min}}  ... 30
+
+
-
- {{formField systemFields.crouching.fields.min value=system.crouching.min}} - {{formField systemFields.crouching.fields.max value=system.crouching.min}} -
+
{{formField systemFields.crouching.fields.min value=system.crouching.min}}  ... 30
+
@@ -36,7 +36,7 @@ {{formField systemFields.autodestruction.fields.slashing value=system.autodestruction.slashing}} {{formField systemFields.autodestruction.fields.piercing value=system.autodestruction.piercing}}
- + {{formField systemFields.equipped value=system.equipped}} {{formField systemFields.encLoad value=system.encLoad}} @@ -51,11 +51,11 @@
{{localize "LETHALFANTASY.Label.description"}} {{formInput - systemFields.description - enriched=enrichedDescription - value=system.description - name="system.description" - toggled="false" + systemFields.description + enriched=enrichedDescription + value=system.description + name="system.description" + toggled="false" }}
\ No newline at end of file