Fix shield definition

This commit is contained in:
LeRatierBretonnien 2024-12-21 20:56:39 +01:00
parent 98242fe0a0
commit 43c00f2214
4 changed files with 14 additions and 4 deletions

View File

@ -338,6 +338,9 @@
},
"Shield": {
"FIELDS": {
"hascover": {
"label": "Provides cover"
},
"equipped": {
"label": "Equipped"
},

View File

@ -8,7 +8,8 @@ export default class LethalFantasyShield extends foundry.abstract.TypeDataModel
schema.description = new fields.HTMLField({ required: true, textSearch: true })
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.hascover = new fields.BooleanField({ required: true, initial: false })
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 })

View File

@ -6,7 +6,7 @@
"download": "#{DOWNLOAD}#",
"url": "#{URL}#",
"license": "LICENSE",
"version": "12.0.7",
"version": "12.0.8",
"authors": [
{
"name": "Uberwald",

View File

@ -11,15 +11,21 @@
<div class="shift-right">&nbsp;
</div>
{{formField systemFields.hascover value=system.hascover}}
{{#if system.hascover}}
<label>Cover vs ranged attacks</label>
<div class="shift-right">
<label>Standing </label>
<div class="flexrow">{{formField systemFields.standing.fields.min value=system.standing.min}} &nbsp;...&nbsp;30</div>
<div class="flexrow">{{formField systemFields.standing.fields.min value=system.standing.min}} &nbsp;...&nbsp;30
</div>
</div>
<div class="shift-right">
<label>Crouching</label>
<div class="flexrow">{{formField systemFields.crouching.fields.min value=system.crouching.min}} &nbsp;...&nbsp;30</div>
<div class="flexrow">{{formField systemFields.crouching.fields.min value=system.crouching.min}}
&nbsp;...&nbsp;30</div>
</div>
{{/if}}
</div>
<div class="align-top">