mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fix/941 companion hope ranger (#950)
* Temp ActionField attack type missing * Move missing attack type to getModel * Fix Companion not updating Partner resources
This commit is contained in:
parent
006f9dde1f
commit
841819ee89
2 changed files with 5 additions and 4 deletions
|
|
@ -208,8 +208,9 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
}
|
||||
|
||||
async consume(config, successCost = false) {
|
||||
const usefulResources = {
|
||||
...foundry.utils.deepClone(this.actor.system.resources),
|
||||
const actor= this.actor.system.partner ?? this.actor,
|
||||
usefulResources = {
|
||||
...foundry.utils.deepClone(actor.system.resources),
|
||||
fear: {
|
||||
value: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Resources.Fear),
|
||||
max: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear,
|
||||
|
|
@ -246,7 +247,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
}
|
||||
}, []);
|
||||
|
||||
await (this.actor.system.partner ?? this.actor).modifyResource(resources);
|
||||
await actor.modifyResource(resources);
|
||||
if (
|
||||
config.uses?.enabled &&
|
||||
((!successCost && (!config.uses?.consumeOnSuccess || config.roll?.success)) ||
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ export default class DhpActor extends Actor {
|
|||
}
|
||||
|
||||
async modifyResource(resources) {
|
||||
if (!resources.length) return;
|
||||
if (!resources?.length) return;
|
||||
|
||||
if (resources.find(r => r.key === 'stress')) this.convertStressDamageToHP(resources);
|
||||
let updates = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue