mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
Merge branch 'main' into release
This commit is contained in:
commit
af5d3d4568
4 changed files with 3 additions and 11 deletions
|
|
@ -682,8 +682,6 @@ export default class DhCharacter extends BaseDataActor {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.companion.system.attack.roll.bonus = this.traits.instinct.value;
|
||||
}
|
||||
|
||||
this.resources.hope.value = Math.min(baseHope, this.resources.hope.max);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ export default class DhCompanion extends BaseDataActor {
|
|||
if (selection.data[0] === 'damage') {
|
||||
this.attack.damage.parts[0].value.dice = adjustDice(this.attack.damage.parts[0].value.dice);
|
||||
} else {
|
||||
this.attack.range = adjustRange(this.attack.range);
|
||||
this.attack.range = adjustRange(this.attack.range).id;
|
||||
}
|
||||
break;
|
||||
case 'stress':
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default class DhScene extends Scene {
|
|||
|
||||
if (changes.flags?.daggerheart) {
|
||||
if (this._source.flags.daggerheart) {
|
||||
const unregisterTriggerData = this._source.flags.daggerheart.sceneEnvironments.reduce(
|
||||
const unregisterTriggerData = (this._source.flags.daggerheart.sceneEnvironments ?? []).reduce(
|
||||
(acc, env) => {
|
||||
if (!changes.flags.daggerheart.sceneEnvironments.includes(env)) acc.sceneEnvironments.push(env);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,7 @@
|
|||
"name": "Spend Hope",
|
||||
"img": "icons/skills/melee/maneuver-sword-katana-yellow.webp",
|
||||
"range": "",
|
||||
"triggers": [
|
||||
{
|
||||
"trigger": "postDamageReduction",
|
||||
"triggeringActorType": "other",
|
||||
"command": "/* Check if sufficient hope */\nif (this.actor.system.resources.hope.value < 2) return;\n\n/* Check if hit point damage was dealt */\nconst hpDamage = damageUpdates.find(u => u.key === CONFIG.DH.GENERAL.healingTypes.hitPoints.id);\nif (hpDamage.value < 0) return;\n\n/* Dialog to give player choice */\nconst confirmed = await foundry.applications.api.DialogV2.confirm({\n window: { title: this.item?.name ?? '' },\n content: game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerTexts.ferocityContent', { bonus: hpDamage.value }),\n});\n\nif (!confirmed) return;\n\n/* Create the effect */\nthis.actor.createEmbeddedDocuments('ActiveEffect', [{\n name: this.item.name,\n img: 'icons/skills/melee/maneuver-sword-katana-yellow.webp',\n description: game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerTexts.ferocityEffectDescription', { bonus: hpDamage.value }),\n changes: [{ key: 'system.evasion', mode: 2, value: hpDamage.value }]\n}]);\n\n/* Update hope */\nreturn { updates: [{ \n originActor: this.actor, \n updates: [{\n key: CONFIG.DH.GENERAL.healingTypes.hope.id,\n value: -2,\n total: 2\n }] \n}]}"
|
||||
}
|
||||
]
|
||||
"triggers": []
|
||||
}
|
||||
},
|
||||
"attribution": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue