mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
Merge branch 'main' into feature/635-allow-weapon-direct-damage
This commit is contained in:
commit
f87dfe477a
7 changed files with 9 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
||||||
};
|
};
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return game.i18n.localize(`DAGGERHEART.EFFECTS.ApplyLocations.${this.config.isHealing ? 'healing' : 'damage'}Roll.name`);
|
return game.i18n.localize(`DAGGERHEART.EFFECTS.ApplyLocations.${this.config.hasHealing ? 'healing' : 'damage'}Roll.name`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
|
|
@ -46,7 +46,7 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
||||||
context.config = CONFIG.DH;
|
context.config = CONFIG.DH;
|
||||||
context.title = this.config.title ?? this.title;
|
context.title = this.config.title ?? this.title;
|
||||||
context.formula = this.roll.constructFormula(this.config);
|
context.formula = this.roll.constructFormula(this.config);
|
||||||
context.isHealing = this.config.isHealing;
|
context.hasHealing = this.config.hasHealing;
|
||||||
context.directDamage = this.config.directDamage;
|
context.directDamage = this.config.directDamage;
|
||||||
context.selectedRollMode = this.config.selectedRollMode;
|
context.selectedRollMode = this.config.selectedRollMode;
|
||||||
context.rollModes = Object.entries(CONFIG.Dice.rollModes).map(([action, { label, icon }]) => ({
|
context.rollModes = Object.entries(CONFIG.Dice.rollModes).map(([action, { label, icon }]) => ({
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,11 @@ export default class DamageRoll extends DHRoll {
|
||||||
|
|
||||||
applyBaseBonus(part) {
|
applyBaseBonus(part) {
|
||||||
const modifiers = [],
|
const modifiers = [],
|
||||||
type = this.options.messageType ?? (this.options.isHealing ? 'healing' : 'damage'),
|
type = this.options.messageType ?? (this.options.hasHealing ? 'healing' : 'damage'),
|
||||||
options = part ?? this.options;
|
options = part ?? this.options;
|
||||||
|
|
||||||
modifiers.push(...this.getBonus(`${type}`, `${type.capitalize()} Bonus`));
|
modifiers.push(...this.getBonus(`${type}`, `${type.capitalize()} Bonus`));
|
||||||
if (!this.options.isHealing) {
|
if (!this.options.hasHealing) {
|
||||||
options.damageTypes?.forEach(t => {
|
options.damageTypes?.forEach(t => {
|
||||||
modifiers.push(...this.getBonus(`${type}.${t}`, `${t.capitalize()} ${type.capitalize()} Bonus`));
|
modifiers.push(...this.getBonus(`${type}.${t}`, `${t.capitalize()} ${type.capitalize()} Bonus`));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
},
|
},
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Spears",
|
"name": "Spears",
|
||||||
|
"img": "icons/weapons/polearms/spear-flared-worn.webp",
|
||||||
"range": "veryClose",
|
"range": "veryClose",
|
||||||
"roll": {
|
"roll": {
|
||||||
"bonus": 0,
|
"bonus": 0,
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@
|
||||||
"description": "<p>An undead figure wearing a heavy leather coat, with searching eyes and a casually cruel demeanor.</p>",
|
"description": "<p>An undead figure wearing a heavy leather coat, with searching eyes and a casually cruel demeanor.</p>",
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Tear at Flesh",
|
"name": "Tear at Flesh",
|
||||||
|
"img": "icons/skills/melee/strike-slashes-red.webp",
|
||||||
"roll": {
|
"roll": {
|
||||||
"bonus": 5,
|
"bonus": 5,
|
||||||
"type": "attack"
|
"type": "attack"
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@
|
||||||
"motivesAndTactics": "Move through solid objects, rally troops, rehash old battles",
|
"motivesAndTactics": "Move through solid objects, rally troops, rehash old battles",
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Longbow",
|
"name": "Longbow",
|
||||||
|
"img": "icons/weapons/bows/longbow-recurve-skull-brown.webp",
|
||||||
"damage": {
|
"damage": {
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@
|
||||||
"description": "<p>A dust-covered golden construct with boxy limbs and a huge mace for a hand.</p>",
|
"description": "<p>A dust-covered golden construct with boxy limbs and a huge mace for a hand.</p>",
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Charged Mace",
|
"name": "Charged Mace",
|
||||||
|
"img": "icons/weapons/maces/shortmace-ornate-gold.webp",
|
||||||
"range": "veryClose",
|
"range": "veryClose",
|
||||||
"roll": {
|
"roll": {
|
||||||
"bonus": 3,
|
"bonus": 3,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
{{#with (lookup @root.config.GENERAL.healingTypes applyTo)}}
|
{{#with (lookup @root.config.GENERAL.healingTypes applyTo)}}
|
||||||
{{localize label}}
|
{{localize label}}
|
||||||
{{/with}}
|
{{/with}}
|
||||||
{{#unless @root.isHealing}}
|
{{#unless @root.hasHealing}}
|
||||||
{{#if damageTypes}}
|
{{#if damageTypes}}
|
||||||
{{#each damageTypes as | type | }}
|
{{#each damageTypes as | type | }}
|
||||||
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
{{#with (lookup @root.config.GENERAL.damageTypes type)}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue