mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Feature/253 weapon attack action (#290)
* Step #1 * Add Attack to Weapon & Override settings to Roll
This commit is contained in:
parent
52be430eff
commit
7d7fb88035
23 changed files with 168 additions and 91 deletions
23
lang/en.json
23
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",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
action =
|
||||
actor.system.attack?._id === actionId
|
||||
? actor.system.attack
|
||||
: item.system.attack?._id === actionId
|
||||
? item.system.attack
|
||||
: item?.system?.actions?.find(a => a._id === actionId);
|
||||
return action;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,20 +14,26 @@ export default class DHAttackAction extends DHDamageAction {
|
|||
|
||||
prepareData() {
|
||||
super.prepareData();
|
||||
if (this.damage.includeBase && !!this.item?.system?.damage) {
|
||||
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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getParentDamage() {
|
||||
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
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,18 +156,23 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
|
|||
static getSourceConfig(parent) {
|
||||
const updateSource = {};
|
||||
updateSource.img ??= parent?.img ?? parent?.system?.img;
|
||||
if (parent?.type === 'weapon') {
|
||||
updateSource['damage'] = { includeBase: true };
|
||||
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?.type === 'weapon' && !!this.schema.fields.damage) {
|
||||
updateSource['damage'] = { includeBase: true };
|
||||
}
|
||||
if (parent?.system?.range) {
|
||||
updateSource['range'] = parent?.system?.range;
|
||||
}
|
||||
}
|
||||
return updateSource;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,8 +61,10 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
damage: {
|
||||
parts: [
|
||||
{
|
||||
value: {
|
||||
multiplier: 'flat'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
gap: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@
|
|||
Damage
|
||||
{{#unless (eq path 'system.attack.')}}<a><i class="fa-solid fa-plus icon-button" data-action="addDamage"></i></a>{{/unless}}
|
||||
</legend>
|
||||
{{#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"}}
|
||||
<input type="hidden" name="{{../path}}damage.parts.{{index}}.value.multiplier" value="{{dmg.value.multiplier}}">
|
||||
{{#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}}
|
||||
<div class="nest-inputs">
|
||||
{{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"}}
|
||||
</div>
|
||||
|
|
|
|||
0
templates/actionTypes/part/damage-part.hbs
Normal file
0
templates/actionTypes/part/damage-part.hbs
Normal file
|
|
@ -1,5 +1,8 @@
|
|||
<fieldset class="one-column">
|
||||
<legend>Roll</legend>
|
||||
<fieldset class="one-column{{#if source.useDefault}} child-disabled{{/if}}">
|
||||
<legend>
|
||||
Roll
|
||||
{{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip="Use default Item values" tooltipDirection="UP")}}{{/if}}
|
||||
</legend>
|
||||
{{#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}}
|
||||
|
|
|
|||
|
|
@ -11,21 +11,28 @@
|
|||
{{#if isSidebar}}
|
||||
<div class="item-labels">
|
||||
<div class="label">
|
||||
{{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')}}
|
||||
<span> - </span>
|
||||
{{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}}
|
||||
<i class="fa-solid {{this}}"></i>
|
||||
{{/each}}
|
||||
{{/with}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="tag">
|
||||
{{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')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{item.system.damage.value}}
|
||||
({{localize (concat 'DAGGERHEART.CONFIG.DamageType.' item.system.damage.type '.abbreviation')}})
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' item.system.attack.range '.name')}}
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{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')}})
|
||||
</div>
|
||||
<div class="tag">
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Burden.' item.system.burden)}}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,12 @@
|
|||
<h3>{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon"}}</h3>
|
||||
{{/if}}
|
||||
<h3>
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' source.system.trait '.short')}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' source.system.attack.roll.trait '.short')}}
|
||||
<span>-</span>
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' source.system.range '.name')}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Range.' source.system.attack.range '.name')}}
|
||||
<span>-</span>
|
||||
{{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')}})
|
||||
<span>-</span>
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.Burden.' source.system.burden)}}
|
||||
</h3>
|
||||
|
|
|
|||
|
|
@ -10,21 +10,26 @@
|
|||
<span>{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}}</span>
|
||||
{{formField systemFields.secondary value=source.system.secondary}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.Trait.single"}}</span>
|
||||
{{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}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.range"}}</span>
|
||||
{{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}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.burden"}}</span>
|
||||
{{formField systemFields.burden value=source.system.burden localize=true}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="two-columns">
|
||||
{{#with systemFields.attack.fields.damage.fields.parts.element.fields as | fields | }}
|
||||
{{#with (lookup ../document.system.attack.damage.parts 0) as | source | }}
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.title"}}</legend>
|
||||
<span>{{localize "DAGGERHEART.GENERAL.Dice.single"}}</span>
|
||||
{{formGroup systemFields.damage.fields.dice value=source.system.damage.dice}}
|
||||
{{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.0.value.dice"}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.bonus"}}</span>
|
||||
{{formGroup systemFields.damage.fields.bonus value=source.system.damage.bonus}}
|
||||
{{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.0.value.bonus" localize=true}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.type"}}</span>
|
||||
{{formGroup systemFields.damage.fields.type value=source.system.damage.type localize=true}}
|
||||
{{formInput fields.type value=source.type name="system.attack.damage.parts.0.type" localize=true}}
|
||||
<input type="hidden" name="system.attack.damage.parts.0.value.multiplier" value="{{source.value.multiplier}}">
|
||||
{{/with}}
|
||||
{{/with}}
|
||||
</fieldset>
|
||||
<fieldset class="two-columns">
|
||||
<legend>{{localize "TYPES.Item.feature"}}</legend>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="dice-result">
|
||||
<div class="dice-actions">
|
||||
<button class="damage-button" data-target-hit="true" {{#if (eq targets.length 0)}}disabled{{/if}}>{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamageToTargets"}}</button>
|
||||
<button class="damage-button">{{localize "DAGGERHEART.Chat.DamageRoll.DealDamage"}}</button>
|
||||
<button class="damage-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue