mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 20:51: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) {
|
async consume(config, successCost = false) {
|
||||||
const usefulResources = {
|
const actor= this.actor.system.partner ?? this.actor,
|
||||||
...foundry.utils.deepClone(this.actor.system.resources),
|
usefulResources = {
|
||||||
|
...foundry.utils.deepClone(actor.system.resources),
|
||||||
fear: {
|
fear: {
|
||||||
value: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.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,
|
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 (
|
if (
|
||||||
config.uses?.enabled &&
|
config.uses?.enabled &&
|
||||||
((!successCost && (!config.uses?.consumeOnSuccess || config.roll?.success)) ||
|
((!successCost && (!config.uses?.consumeOnSuccess || config.roll?.success)) ||
|
||||||
|
|
|
||||||
|
|
@ -631,7 +631,7 @@ export default class DhpActor extends Actor {
|
||||||
}
|
}
|
||||||
|
|
||||||
async modifyResource(resources) {
|
async modifyResource(resources) {
|
||||||
if (!resources.length) return;
|
if (!resources?.length) return;
|
||||||
|
|
||||||
if (resources.find(r => r.key === 'stress')) this.convertStressDamageToHP(resources);
|
if (resources.find(r => r.key === 'stress')) this.convertStressDamageToHP(resources);
|
||||||
let updates = {
|
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 {
|
img {
|
||||||
height: 275px;
|
height: 275px;
|
||||||
width: 275px;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: top center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.death-roll-btn {
|
.death-roll-btn {
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,6 @@
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 275px;
|
height: 275px;
|
||||||
width: 275px;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: top center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.death-roll-btn {
|
.death-roll-btn {
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,6 @@
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
width: 235px;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: top center;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
width: 235px;
|
|
||||||
height: 235px;
|
height: 235px;
|
||||||
object-fit: cover;
|
|
||||||
object-position: top center;
|
|
||||||
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import './actors/actor-sheet-shared.less';
|
||||||
|
|
||||||
@import './actors/adversary/actions.less';
|
@import './actors/adversary/actions.less';
|
||||||
@import './actors/adversary/header.less';
|
@import './actors/adversary/header.less';
|
||||||
@import './actors/adversary/sheet.less';
|
@import './actors/adversary/sheet.less';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue