[Bug] Companion Trait Useage (#357)

* Removed trait useage for companion attack

* Fixes companion attack.roll.bonus

* More fixes

* Corrected companion resource change on duality

* .

* Added Dead/Unconcious
This commit is contained in:
WBHarry 2025-07-16 01:53:37 +02:00 committed by GitHub
parent f2176c6238
commit 5635bcaf7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 36 additions and 25 deletions

View file

@ -190,7 +190,12 @@ export const registerRollDiceHooks = () => {
if (config.roll.isCritical) updates.push({ key: 'stress', value: -1 });
if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: 1 });
if (updates.length) actor.modifyResource(updates);
if (updates.length) {
const target = actor.system.partner ?? actor;
if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) {
target.modifyResource(updates);
}
}
if (!config.roll.hasOwnProperty('success') && !config.targets?.length) return;