mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Merge branch 'main' into feature/death-moves
This commit is contained in:
commit
562c404534
53 changed files with 581 additions and 162 deletions
|
|
@ -526,7 +526,7 @@ export default class DhpActor extends Actor {
|
|||
|
||||
/**@inheritdoc */
|
||||
getRollData() {
|
||||
const rollData = super.getRollData();
|
||||
const rollData = super.getRollData().clone();
|
||||
rollData.name = this.name;
|
||||
rollData.system = this.system.getRollData();
|
||||
rollData.prof = this.system.proficiency ?? 1;
|
||||
|
|
@ -679,6 +679,10 @@ export default class DhpActor extends Actor {
|
|||
return updates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resources are modified asynchronously, so be careful not to update the same resource in
|
||||
* quick succession.
|
||||
*/
|
||||
async modifyResource(resources) {
|
||||
if (!resources?.length) return;
|
||||
|
||||
|
|
@ -761,6 +765,10 @@ export default class DhpActor extends Actor {
|
|||
}
|
||||
|
||||
convertDamageToThreshold(damage) {
|
||||
const massiveDamageEnabled=game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules).massiveDamage.enabled;
|
||||
if (massiveDamageEnabled && damage >= (this.system.damageThresholds.severe * 2)) {
|
||||
return 4;
|
||||
}
|
||||
return damage >= this.system.damageThresholds.severe ? 3 : damage >= this.system.damageThresholds.major ? 2 : 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export default class DhpCombat extends Combat {
|
|||
...effect,
|
||||
name: game.i18n.localize(effect.name),
|
||||
description: game.i18n.localize(effect.description),
|
||||
effectTargetTypes: grouping.effectTargetTypes ?? [],
|
||||
flags: {
|
||||
[`${CONFIG.DH.id}.${CONFIG.DH.FLAGS.combatToggle}`]: {
|
||||
category: toggle.category,
|
||||
|
|
@ -45,11 +46,7 @@ export default class DhpCombat extends Combat {
|
|||
for (let actor of actors) {
|
||||
await actor.createEmbeddedDocuments(
|
||||
'ActiveEffect',
|
||||
effects.map(effect => ({
|
||||
...effect,
|
||||
name: game.i18n.localize(effect.name),
|
||||
description: game.i18n.localize(effect.description)
|
||||
}))
|
||||
effects.filter(x => x.effectTargetTypes.includes(actor.type))
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti
|
|||
{
|
||||
item: item,
|
||||
description: item.system?.enrichedDescription ?? item.enrichedDescription,
|
||||
config: CONFIG.DH
|
||||
config: CONFIG.DH,
|
||||
allDomains: CONFIG.DH.DOMAIN.allDomains()
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue