mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Merge branch 'main' of https://github.com/Foundryborne/daggerheart
This commit is contained in:
commit
58a44515a3
8 changed files with 15 additions and 16 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 = {
|
||||
|
|
|
|||
8
styles/less/sheets/actors/actor-sheet-shared.less
Normal file
8
styles/less/sheets/actors/actor-sheet-shared.less
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
.application.sheet.daggerheart.actor.dh-style {
|
||||
.portrait img, .profile {
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
object-position: top center;
|
||||
}
|
||||
}
|
||||
|
|
@ -53,9 +53,6 @@
|
|||
|
||||
img {
|
||||
height: 275px;
|
||||
width: 275px;
|
||||
object-fit: cover;
|
||||
object-position: top center;
|
||||
}
|
||||
|
||||
.death-roll-btn {
|
||||
|
|
|
|||
|
|
@ -56,9 +56,6 @@
|
|||
|
||||
img {
|
||||
height: 275px;
|
||||
width: 275px;
|
||||
object-fit: cover;
|
||||
object-position: top center;
|
||||
}
|
||||
|
||||
.death-roll-btn {
|
||||
|
|
|
|||
|
|
@ -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%);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue