This commit is contained in:
Dapoolp 2025-08-15 21:39:32 +02:00
commit 58a44515a3
8 changed files with 15 additions and 16 deletions

View file

@ -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)) ||

View file

@ -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 = {

View file

@ -0,0 +1,8 @@
.application.sheet.daggerheart.actor.dh-style {
.portrait img, .profile {
width: 100%;
object-fit: cover;
object-position: top center;
}
}

View file

@ -53,9 +53,6 @@
img {
height: 275px;
width: 275px;
object-fit: cover;
object-position: top center;
}
.death-roll-btn {

View file

@ -56,9 +56,6 @@
img {
height: 275px;
width: 275px;
object-fit: cover;
object-position: top center;
}
.death-roll-btn {

View file

@ -10,9 +10,6 @@
.profile {
height: 235px;
width: 235px;
object-fit: cover;
object-position: top center;
cursor: pointer;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
}

View file

@ -9,10 +9,7 @@
text-align: center;
.profile {
width: 235px;
height: 235px;
object-fit: cover;
object-position: top center;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
cursor: pointer;
}

View file

@ -1,3 +1,5 @@
@import './actors/actor-sheet-shared.less';
@import './actors/adversary/actions.less';
@import './actors/adversary/header.less';
@import './actors/adversary/sheet.less';