mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Add custom formula to weapon base attack
This commit is contained in:
parent
b3c0344b91
commit
7ffcfe8a1a
3 changed files with 25 additions and 10 deletions
|
|
@ -64,6 +64,14 @@
|
|||
"exactHint": "The Character's Tier is used if empty",
|
||||
"label": "Beastform"
|
||||
},
|
||||
"damage": {
|
||||
"multiplier": "Multiplier",
|
||||
"flatMultiplier": "Flat Multiplier"
|
||||
},
|
||||
"general": {
|
||||
"customFormula": "Custom Formula",
|
||||
"formula": "Formula"
|
||||
},
|
||||
"displayInChat": "Display in chat"
|
||||
},
|
||||
"RollField": {
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
|||
multiplier: new fields.StringField({
|
||||
choices: CONFIG.DH.GENERAL.multiplierTypes,
|
||||
initial: 'prof',
|
||||
label: 'Multiplier'
|
||||
label: "DAGGERHEART.ACTIONS.Config.damage.multiplier"
|
||||
}),
|
||||
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }),
|
||||
dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: 'Dice' }),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }),
|
||||
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: "DAGGERHEART.ACTIONS.Config.damage.flatMultiplier" }),
|
||||
dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: "DAGGERHEART.GENERAL.Dice.single" }),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: "DAGGERHEART.GENERAL.bonus" }),
|
||||
custom: new fields.SchemaField({
|
||||
enabled: new fields.BooleanField({ label: 'Custom Formula' }),
|
||||
formula: new FormulaField({ label: 'Formula', initial: '' })
|
||||
enabled: new fields.BooleanField({ label: "DAGGERHEART.ACTIONS.Config.general.customFormula" }),
|
||||
formula: new FormulaField({ label: "DAGGERHEART.ACTIONS.Config.general.formula", initial: '' })
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,17 @@
|
|||
{{#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.damage"}}</legend>
|
||||
<span>{{localize "DAGGERHEART.ACTIONS.Config.general.customFormula"}}</span>
|
||||
{{formInput fields.value.fields.custom.fields.enabled value=source.value.custom.enabled name="system.attack.damage.parts.0.value.custom.enabled"}}
|
||||
{{#if source.value.custom.enabled}}
|
||||
<span>{{localize "DAGGERHEART.ACTIONS.Config.general.formula"}}</span>
|
||||
{{formInput fields.value.fields.custom.fields.formula value=source.value.custom.formula name="system.attack.damage.parts.0.value.custom.formula"}}
|
||||
{{else}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.Dice.single"}}</span>
|
||||
{{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.0.value.dice"}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.bonus"}}</span>
|
||||
{{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.0.value.bonus" localize=true}}
|
||||
{{/if}}
|
||||
<span>{{localize "DAGGERHEART.GENERAL.type"}}</span>
|
||||
{{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}}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue