diff --git a/lang/en.json b/lang/en.json index a6fa661c..857a9387 100755 --- a/lang/en.json +++ b/lang/en.json @@ -611,7 +611,7 @@ }, "stress": { "name": "Stress", - "stress": "STR" + "abbreviation": "STR" }, "hope": { "name": "Hope", @@ -619,33 +619,39 @@ }, "armorStack": { "name": "Armor Stack", - "stress": "AS" + "abbreviation": "AS" } }, "Range": { "self": { "name": "Self", - "description": "means yourself." + "description": "means yourself.", + "short": "Self" }, "melee": { "name": "Melee", - "description": "means a character is within touching distance of the target. PCs can generally touch targets up to a few feet away from them, but melee range may be greater for especially large NPCs." + "description": "means a character is within touching distance of the target. PCs can generally touch targets up to a few feet away from them, but melee range may be greater for especially large NPCs.", + "short": "Melee" }, "veryClose": { "name": "Very Close", - "description": "means a distance where one can see fine details of a target- within moments of reaching, if need be. This is usually anywhere from about 5-10 feet away. While in danger, a PC can usually get to anything that’s very close as part of any other action they take. Anything on a battle map that is within the shortest length of a game card (~2-3 inches) can usually be considered very close." + "description": "means a distance where one can see fine details of a target- within moments of reaching, if need be. This is usually anywhere from about 5-10 feet away. While in danger, a PC can usually get to anything that’s very close as part of any other action they take. Anything on a battle map that is within the shortest length of a game card (~2-3 inches) can usually be considered very close.", + "short": "V. Close" }, "close": { "name": "Close", - "description": "means a distance where one can see prominent details of a target-- across a room or to a neighboring market stall, generally about 10-30 feet away. While in danger, a PC can usually get to anything that’s close as part of any other action they take. Anything on a battle map that is within the length of a standard pen or pencil (~5-6 inches) can usually be considered close." + "description": "means a distance where one can see prominent details of a target-- across a room or to a neighboring market stall, generally about 10-30 feet away. While in danger, a PC can usually get to anything that’s close as part of any other action they take. Anything on a battle map that is within the length of a standard pen or pencil (~5-6 inches) can usually be considered close.", + "short": "Close" }, "far": { "name": "Far", - "description": "means a distance where one can see the appearance of a person or object, but probably not in great detail-- across a small battlefield or down a large corridor. This is usually about 30-100 feet away. While under danger, a PC will likely have to make an Agility check to get here safely. Anything on a battle map that is within the length of a standard piece of paper (~10-11 inches) can usually be considered far." + "description": "means a distance where one can see the appearance of a person or object, but probably not in great detail-- across a small battlefield or down a large corridor. This is usually about 30-100 feet away. While under danger, a PC will likely have to make an Agility check to get here safely. Anything on a battle map that is within the length of a standard piece of paper (~10-11 inches) can usually be considered far.", + "short": "Far" }, "veryFar": { "name": "Very Far", - "description": "means a distance where you can see the shape of a person or object, but probably not make outany details-- across a large battlefield or down a long street, generally about 100-300 feet away. While under danger, a PC likely has to make an Agility check to get here safely. Anything on a battle map that is beyond far distance, but still within sight of the characters can usually be considered very far." + "description": "means a distance where you can see the shape of a person or object, but probably not make outany details-- across a large battlefield or down a long street, generally about 100-300 feet away. While under danger, a PC likely has to make an Agility check to get here safely. Anything on a battle map that is beyond far distance, but still within sight of the characters can usually be considered very far.", + "short": "V. Far" } }, "RollTypes": { @@ -1098,6 +1104,7 @@ "range": "Range", "stress": "Stress", "take": "Take", + "target": "Target", "title": "Title", "type": "Type", "unarmored": "Unarmored", diff --git a/module/applications/sheets-configs/action-config.mjs b/module/applications/sheets-configs/action-config.mjs index c5c70557..0beb8d79 100644 --- a/module/applications/sheets-configs/action-config.mjs +++ b/module/applications/sheets-configs/action-config.mjs @@ -108,7 +108,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { context.config = CONFIG.DH; if (!!this.action.effects) context.effects = this.action.effects.map(e => this.action.item.effects.get(e._id)); if (this.action.damage?.hasOwnProperty('includeBase') && this.action.type === 'attack') - context.hasBaseDamage = !!this.action.parent.damage; + context.hasBaseDamage = !!this.action.parent.attack; context.getRealIndex = this.getRealIndex.bind(this); context.getEffectDetails = this.getEffectDetails.bind(this); context.disableOption = this.disableOption.bind(this); diff --git a/module/applications/sheets/api/base-item.mjs b/module/applications/sheets/api/base-item.mjs index 5e7e8d59..e7d9b54b 100644 --- a/module/applications/sheets/api/base-item.mjs +++ b/module/applications/sheets/api/base-item.mjs @@ -35,7 +35,7 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) { /** @inheritdoc */ static TABS = { primary: { - tabs: [{ id: 'description' }, { id: 'actions' }, { id: 'settings' }], + tabs: [{ id: 'description' }, { id: 'settings' }, { id: 'actions' }], initial: 'description', labelPrefix: 'DAGGERHEART.GENERAL.Tabs' } diff --git a/module/applications/sheets/items/weapon.mjs b/module/applications/sheets/items/weapon.mjs index fdce55fc..d5d09dab 100644 --- a/module/applications/sheets/items/weapon.mjs +++ b/module/applications/sheets/items/weapon.mjs @@ -31,13 +31,12 @@ export default class WeaponSheet extends DHBaseItemSheet { /**@inheritdoc */ async _preparePartContext(partId, context) { super._preparePartContext(partId, context); - switch (partId) { case 'settings': context.features = this.document.system.features.map(x => x.value); + context.systemFields.attack.fields = this.document.system.attack.schema.fields; break; } - return context; } diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index d8edf388..d17c26dc 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -79,7 +79,9 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo action = actor.system.attack?._id === actionId ? actor.system.attack - : item?.system?.actions?.find(a => a._id === actionId); + : item.system.attack?._id === actionId + ? item.system.attack + : item?.system?.actions?.find(a => a._id === actionId); return action; } diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 1299dccb..64b856a0 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -58,12 +58,14 @@ export const damageTypes = { physical: { id: 'physical', label: 'DAGGERHEART.CONFIG.DamageType.physical.name', - abbreviation: 'DAGGERHEART.CONFIG.DamageType.physical.abbreviation' + abbreviation: 'DAGGERHEART.CONFIG.DamageType.physical.abbreviation', + icon: ["fa-hand-fist"] }, magical: { id: 'magical', label: 'DAGGERHEART.CONFIG.DamageType.magical.name', - abbreviation: 'DAGGERHEART.CONFIG.DamageType.magical.abbreviation' + abbreviation: 'DAGGERHEART.CONFIG.DamageType.magical.abbreviation', + icon: ["fa-wand-sparkles"] } }; @@ -344,26 +346,26 @@ export const refreshTypes = { }; export const abilityCosts = { + hp: { + id: 'hp', + label: 'DAGGERHEART.CONFIG.HealingType.hitPoints.name', + group: 'Global' + }, + stress: { + id: 'stress', + label: 'DAGGERHEART.CONFIG.HealingType.stress.name', + group: 'Global' + }, hope: { id: 'hope', label: 'Hope', group: 'TYPES.Actor.character' }, - stress: { - id: 'stress', - label: 'DAGGERHEART.CONFIG.HealingType.Stress.Name', - group: 'TYPES.Actor.character' - }, armor: { id: 'armor', label: 'Armor Stack', group: 'TYPES.Actor.character' }, - hp: { - id: 'hp', - label: 'DAGGERHEART.CONFIG.HealingType.HitPoints.Name', - group: 'TYPES.Actor.character' - }, prayer: { id: 'prayer', label: 'Prayer Dice', diff --git a/module/data/action/actionDice.mjs b/module/data/action/actionDice.mjs index cb430d63..8b5bbe40 100644 --- a/module/data/action/actionDice.mjs +++ b/module/data/action/actionDice.mjs @@ -31,7 +31,8 @@ export class DHActionRollData extends foundry.abstract.DataModel { label: 'Should be' }), treshold: new fields.NumberField({ initial: 1, integer: true, min: 1, label: 'Treshold' }) - }) + }), + useDefault: new fields.BooleanField({ initial: false }) }; } @@ -47,7 +48,6 @@ export class DHActionRollData extends foundry.abstract.DataModel { formula = `${multiplier}${this.diceRolling.dice}cs${CONFIG.DH.ACTIONS.diceCompare[this.diceRolling.compare].operator}${this.diceRolling.treshold}`; break; default: - // formula = `${(!!this.parent?.actor?.system?.attack ? `@attackBonus` : `@traits.${this.trait}.total`)}`; formula = ''; break; } diff --git a/module/data/action/attackAction.mjs b/module/data/action/attackAction.mjs index c7cc83ca..9c1c49f8 100644 --- a/module/data/action/attackAction.mjs +++ b/module/data/action/attackAction.mjs @@ -14,9 +14,15 @@ export default class DHAttackAction extends DHDamageAction { prepareData() { super.prepareData(); - if (this.damage.includeBase && !!this.item?.system?.damage) { - const baseDamage = this.getParentDamage(); - this.damage.parts.unshift(new DHDamageData(baseDamage)); + if(!!this.item?.system?.attack) { + if (this.damage.includeBase) { + const baseDamage = this.getParentDamage(); + this.damage.parts.unshift(new DHDamageData(baseDamage)); + } + if(this.roll.useDefault) { + this.roll.trait = this.item.system.attack.roll.trait; + this.roll.type = 'weapon'; + } } } @@ -24,10 +30,10 @@ export default class DHAttackAction extends DHDamageAction { return { value: { multiplier: 'prof', - dice: this.item?.system?.damage.dice, - bonus: this.item?.system?.damage.bonus ?? 0 + dice: this.item?.system?.attack.damage.parts[0].value.dice, + bonus: this.item?.system?.attack.damage.parts[0].value.bonus ?? 0 }, - type: this.item?.system?.damage.type, + type: this.item?.system?.attack.damage.parts[0].type, base: true }; } diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 55f08d9a..ae0b7ccc 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -156,17 +156,22 @@ export default class DHBaseAction extends foundry.abstract.DataModel { static getSourceConfig(parent) { const updateSource = {}; updateSource.img ??= parent?.img ?? parent?.system?.img; - if (parent?.system?.trait) { - updateSource['roll'] = { - type: this.getRollType(parent), - trait: parent.system.trait - }; - } - if (parent?.type === 'weapon' && !!this.schema.fields.damage) { + if (parent?.type === 'weapon') { updateSource['damage'] = { includeBase: true }; - } - if (parent?.system?.range) { - updateSource['range'] = parent?.system?.range; + updateSource['range'] = parent?.system?.attack?.range; + updateSource['roll'] = { + useDefault: true + } + } else { + if (parent?.system?.trait) { + updateSource['roll'] = { + type: this.getRollType(parent), + trait: parent.system.trait + }; + } + if (parent?.system?.range) { + updateSource['range'] = parent?.system?.range; + } } return updateSource; } diff --git a/module/data/actor/adversary.mjs b/module/data/actor/adversary.mjs index db7d2ca1..f2f31b6c 100644 --- a/module/data/actor/adversary.mjs +++ b/module/data/actor/adversary.mjs @@ -61,7 +61,9 @@ export default class DhpAdversary extends BaseDataActor { damage: { parts: [ { - multiplier: 'flat' + value: { + multiplier: 'flat' + } } ] } diff --git a/module/data/item/base.mjs b/module/data/item/base.mjs index 1a250327..d0e05eb8 100644 --- a/module/data/item/base.mjs +++ b/module/data/item/base.mjs @@ -42,6 +42,10 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel { return this.parent.actor; } + get actionsList() { + return this.actions; + } + /** * Obtain a data object used to evaluate any dice rolls associated with this Item Type * @param {object} [options] - Options which modify the getRollData method. diff --git a/module/data/item/weapon.mjs b/module/data/item/weapon.mjs index e6cfcbf0..3fb562e0 100644 --- a/module/data/item/weapon.mjs +++ b/module/data/item/weapon.mjs @@ -11,7 +11,7 @@ export default class DHWeapon extends BaseDataItem { hasDescription: true, isQuantifiable: true, isInventoryItem: true, - hasInitialAction: true + // hasInitialAction: true }); } @@ -25,19 +25,8 @@ export default class DHWeapon extends BaseDataItem { //SETTINGS secondary: new fields.BooleanField({ initial: false }), - trait: new fields.StringField({ required: true, choices: CONFIG.DH.ACTOR.abilities, initial: 'agility' }), - range: new fields.StringField({ required: true, choices: CONFIG.DH.GENERAL.range, initial: 'melee' }), burden: new fields.StringField({ required: true, choices: CONFIG.DH.GENERAL.burden, initial: 'oneHanded' }), - //DAMAGE - damage: new fields.SchemaField({ - dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6' }), - bonus: new fields.NumberField({ nullable: true, initial: null }), - type: new fields.StringField({ - required: true, - choices: CONFIG.DH.GENERAL.damageTypes, - initial: 'physical' - }) - }), + features: new fields.ArrayField( new fields.SchemaField({ value: new fields.StringField({ @@ -49,10 +38,42 @@ export default class DHWeapon extends BaseDataItem { actionIds: new fields.ArrayField(new fields.StringField({ required: true })) }) ), + attack: new ActionField({ + initial: { + name: 'Attack', + img: 'icons/skills/melee/blood-slash-foam-red.webp', + _id: foundry.utils.randomID(), + systemPath: 'attack', + type: 'attack', + range: 'melee', + target: { + type: 'any', + amount: 1 + }, + roll: { + trait: 'agility', + type: 'weapon' + }, + damage: { + parts: [ + { + value: { + multiplier: 'prof', + dice: "d8" + } + } + ] + } + } + }), actions: new fields.ArrayField(new ActionField()) }; } + get actionsList() { + return [this.attack, ...this.actions]; + } + async _preUpdate(changes, options, user) { const allowed = await super._preUpdate(changes, options, user); if (allowed === false) return false; diff --git a/module/documents/item.mjs b/module/documents/item.mjs index 21674009..d3a22ad7 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -77,10 +77,10 @@ export default class DHItem extends foundry.documents.Item { }); } - async selectActionDialog() { + async selectActionDialog(prevEvent) { const content = await foundry.applications.handlebars.renderTemplate( 'systems/daggerheart/templates/dialogs/actionSelect.hbs', - { actions: this.system.actions } + { actions: this.system.actionsList } ), title = 'Select Action'; @@ -89,19 +89,23 @@ export default class DHItem extends foundry.documents.Item { content, ok: { label: title, - callback: (event, button, dialog) => - this.system.actions.find(a => a._id === button.form.elements.actionId.value) + callback: (event, button, dialog) => { + Object.defineProperty(prevEvent, "shiftKey", { + get() { return event.shiftKey; }, + }); + return this.system.actionsList.find(a => a._id === button.form.elements.actionId.value) + } } }); } async use(event) { - const actions = this.system.actions; + const actions = this.system.actionsList; if (actions?.length) { let action = actions[0]; if (actions.length > 1 && !event?.shiftKey) { // Actions Choice Dialog - action = await this.selectActionDialog(); + action = await this.selectActionDialog(event); } if (action) return action.use(event); } diff --git a/styles/daggerheart.css b/styles/daggerheart.css index f15583d2..b64cd424 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -5776,10 +5776,14 @@ body.theme-light.application.daggerheart.dialog { outline: 2px solid light-dark(#222, #efe6d8); } .application.dh-style fieldset[disabled], +.application.dh-style fieldset.child-disabled .form-group, .application.dh-style fieldset select[disabled], .application.dh-style fieldset input[disabled] { opacity: 0.5; } +.application.dh-style fieldset.child-disabled .form-group { + pointer-events: none; +} .application.dh-style fieldset .nest-inputs { display: flex; align-items: center; @@ -6384,6 +6388,7 @@ body.theme-light.application.daggerheart.dialog { justify-content: center; align-items: center; font-size: 12px; + gap: 4px; } .application.daggerheart.dh-style .inventory-item .controls { display: flex; diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index 2adc28c4..03772bfb 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -214,11 +214,16 @@ } &[disabled], + &.child-disabled .form-group, select[disabled], input[disabled] { opacity: 0.5; } + &.child-disabled .form-group { + pointer-events: none; + } + .nest-inputs { display: flex; align-items: center; diff --git a/styles/less/global/inventory-item.less b/styles/less/global/inventory-item.less index 8d521c82..24e53165 100644 --- a/styles/less/global/inventory-item.less +++ b/styles/less/global/inventory-item.less @@ -53,6 +53,7 @@ justify-content: center; align-items: center; font-size: 12px; + gap: 4px; } } } diff --git a/templates/actionTypes/damage.hbs b/templates/actionTypes/damage.hbs index 26964a4a..59519e6d 100644 --- a/templates/actionTypes/damage.hbs +++ b/templates/actionTypes/damage.hbs @@ -4,20 +4,20 @@ Damage {{#unless (eq path 'system.attack.')}}{{/unless}} - {{#unless @root.isNPC}} + {{#unless (or @root.isNPC path)}} {{#if @root.hasBaseDamage}} {{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" classes="checkbox" }} {{/if}} {{/unless}} {{#each source.parts as |dmg index|}} - {{#if @root.isNPC}} + {{#if (or @root.isNPC ../path)}} {{formField ../fields.value.fields.custom.fields.enabled value=dmg.value.custom.enabled name=(concat ../path "damage.parts." index ".value.custom.enabled") classes="checkbox"}} {{#if dmg.value.custom.enabled}} {{formField ../fields.value.fields.custom.fields.formula value=dmg.value.custom.formula name=(concat ../path "damage.parts." index ".value.custom.formula") localize=true}} {{else}}
- {{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" classes="inline-child" }} + {{#if @root.isNPC}}{{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" classes="inline-child" }}{{/if}} {{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice") classes="inline-child"}} {{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true classes="inline-child"}}
diff --git a/templates/actionTypes/part/damage-part.hbs b/templates/actionTypes/part/damage-part.hbs new file mode 100644 index 00000000..e69de29b diff --git a/templates/actionTypes/roll.hbs b/templates/actionTypes/roll.hbs index 6d56162a..874d09f2 100644 --- a/templates/actionTypes/roll.hbs +++ b/templates/actionTypes/roll.hbs @@ -1,5 +1,8 @@ -
- Roll +
+ + Roll + {{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip="Use default Item values" tooltipDirection="UP")}}{{/if}} + {{#if @root.isNPC}} {{formField fields.bonus label="Bonus" name="roll.bonus" value=source.bonus}} {{formField fields.advState label= "Advantage State" name="roll.advState" value=source.advState localize=true}} diff --git a/templates/sheets/global/partials/inventory-item.hbs b/templates/sheets/global/partials/inventory-item.hbs index 06bc1228..efb546eb 100644 --- a/templates/sheets/global/partials/inventory-item.hbs +++ b/templates/sheets/global/partials/inventory-item.hbs @@ -11,21 +11,28 @@ {{#if isSidebar}}
- {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.trait '.name')}} - {{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.range '.name')}} + {{!-- {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.short')}} --}} + {{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.short')}} - - {{item.system.damage.value}} - ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' item.system.damage.type '.abbreviation')}}) + {{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}} + {{!-- ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' item.system.attack.damage.parts.0.type '.abbreviation')}}) --}} + {{#with (lookup @root.config.GENERAL.damageTypes item.system.attack.damage.parts.0.type)}} + {{#each icon}} + + {{/each}} + {{/with}}
{{else}}
- {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.trait '.name')}} - {{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.range '.name')}} + {{localize (concat 'DAGGERHEART.CONFIG.Traits.' item.system.attack.roll.trait '.name')}}
- {{item.system.damage.value}} - ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' item.system.damage.type '.abbreviation')}}) + {{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}} +
+
+ {{item.system.attack.damage.parts.0.value.dice}}{{#if item.system.attack.damage.parts.0.value.bonus}} + {{item.system.attack.damage.parts.0.value.bonus}}{{/if}} + ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' item.system.attack.damage.parts.0.type '.abbreviation')}})
{{localize (concat 'DAGGERHEART.CONFIG.Burden.' item.system.burden)}} diff --git a/templates/sheets/items/weapon/header.hbs b/templates/sheets/items/weapon/header.hbs index f381de0a..74613699 100644 --- a/templates/sheets/items/weapon/header.hbs +++ b/templates/sheets/items/weapon/header.hbs @@ -10,13 +10,12 @@

{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon"}}

{{/if}}

- {{localize (concat 'DAGGERHEART.CONFIG.Traits.' source.system.trait '.short')}} + {{localize (concat 'DAGGERHEART.CONFIG.Traits.' source.system.attack.roll.trait '.short')}} - - {{localize (concat 'DAGGERHEART.CONFIG.Range.' source.system.range '.name')}} + {{localize (concat 'DAGGERHEART.CONFIG.Range.' source.system.attack.range '.name')}} - - {{log this}} - {{source.system.damage.dice}} + {{source.system.damage.bonus}} - ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' source.system.damage.type '.abbreviation')}}) + {{source.system.attack.damage.parts.0.value.dice}}{{#if source.system.attack.damage.parts.0.value.bonus}} + {{source.system.attack.damage.parts.0.value.bonus}}{{/if}} + ({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' source.system.attack.damage.parts.0.type '.abbreviation')}}) - {{localize (concat 'DAGGERHEART.CONFIG.Burden.' source.system.burden)}}

diff --git a/templates/sheets/items/weapon/settings.hbs b/templates/sheets/items/weapon/settings.hbs index 5fe0b9bd..d3d3a9ba 100644 --- a/templates/sheets/items/weapon/settings.hbs +++ b/templates/sheets/items/weapon/settings.hbs @@ -10,21 +10,26 @@ {{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}} {{formField systemFields.secondary value=source.system.secondary}} {{localize "DAGGERHEART.GENERAL.Trait.single"}} - {{formField systemFields.trait value=source.system.trait localize=true}} + {{formInput systemFields.attack.fields.roll.fields.trait value=document.system.attack.roll.trait name="system.attack.roll.trait" label="DAGGERHEART.GENERAL.Trait.single" localize=true}} {{localize "DAGGERHEART.GENERAL.range"}} - {{formField systemFields.range value=source.system.range localize=true}} + {{formInput systemFields.attack.fields.range value=document.system.attack.range label="Range" name="system.attack.range" localize=true}} {{localize "DAGGERHEART.GENERAL.burden"}} {{formField systemFields.burden value=source.system.burden localize=true}}
- {{localize "DAGGERHEART.GENERAL.title"}} - {{localize "DAGGERHEART.GENERAL.Dice.single"}} - {{formGroup systemFields.damage.fields.dice value=source.system.damage.dice}} - {{localize "DAGGERHEART.GENERAL.bonus"}} - {{formGroup systemFields.damage.fields.bonus value=source.system.damage.bonus}} - {{localize "DAGGERHEART.GENERAL.type"}} - {{formGroup systemFields.damage.fields.type value=source.system.damage.type localize=true}} + {{#with systemFields.attack.fields.damage.fields.parts.element.fields as | fields | }} + {{#with (lookup ../document.system.attack.damage.parts 0) as | source | }} + {{localize "DAGGERHEART.GENERAL.title"}} + {{localize "DAGGERHEART.GENERAL.Dice.single"}} + {{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.0.value.dice"}} + {{localize "DAGGERHEART.GENERAL.bonus"}} + {{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.0.value.bonus" localize=true}} + {{localize "DAGGERHEART.GENERAL.type"}} + {{formInput fields.type value=source.type name="system.attack.damage.parts.0.type" localize=true}} + + {{/with}} + {{/with}}
{{localize "TYPES.Item.feature"}} diff --git a/templates/ui/chat/damage-roll.hbs b/templates/ui/chat/damage-roll.hbs index f1fbb6c1..1d1a8c93 100644 --- a/templates/ui/chat/damage-roll.hbs +++ b/templates/ui/chat/damage-roll.hbs @@ -4,7 +4,7 @@
- +
\ No newline at end of file