Merge branch 'hotfix' into bug/745-perm-view-button

This commit is contained in:
Dapoolp 2025-08-10 19:04:30 +02:00
commit e0ac0b81e1
6 changed files with 29 additions and 26 deletions

View file

@ -823,8 +823,8 @@
"name": "Restrained",
"description": "When an effect makes a creature Restrained, it means they cannot move until this condition is cleared.\nThey can still take actions from their current position."
},
"unconcious": {
"name": "Unconcious",
"unconscious": {
"name": "Unconscious",
"description": "Your character cant move or act while unconscious, they cant be targeted by an attack."
},
"vulnerable": {

View file

@ -419,7 +419,7 @@ export default function DHApplicationMixin(Base) {
: this.document.system.actions?.get(actionId);
if (!doc) return;
const description = doc.system?.description ?? doc.description;
const description = game.i18n.localize(doc.system?.description ?? doc.description);
const isAction = !!actionId;
descriptionElement.innerHTML = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
description,

View file

@ -183,11 +183,11 @@ export const conditions = {
icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp',
description: 'DAGGERHEART.CONFIG.Condition.restrained.description'
},
unconcious: {
id: 'unconcious',
name: 'DAGGERHEART.CONFIG.Condition.unconcious.name',
unconscious: {
id: 'unconscious',
name: 'DAGGERHEART.CONFIG.Condition.unconscious.name',
icon: 'icons/magic/control/sleep-bubble-purple.webp',
description: 'DAGGERHEART.CONFIG.Condition.unconcious.description'
description: 'DAGGERHEART.CONFIG.Condition.unconscious.description'
},
dead: {
id: 'dead',

View file

@ -159,25 +159,28 @@ export default class DamageRoll extends DHRoll {
if (config.data?.parent) {
if (config.data.parent.appliedEffects) {
// Bardic Rally
mods.rally = {
label: 'DAGGERHEART.CLASS.Feature.rallyDice',
values: config.data?.parent?.appliedEffects.reduce((a, c) => {
const rallyChoices = config.data?.parent?.appliedEffects.reduce((a, c) => {
const change = c.changes.find(ch => ch.key === 'system.bonuses.rally');
if (change) a.push({ value: c.id, label: change.value });
return a;
}, []),
value: null,
beforeCrit: true,
callback: part => {
const rallyFaces = config.modifiers.rally.values.find(
r => r.value === config.modifiers.rally.value
)?.label;
part.roll.terms.push(
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
...this.parse(`1${rallyFaces}`)
);
}
};
}, [])
if(rallyChoices.length) {
mods.rally = {
label: 'DAGGERHEART.CLASS.Feature.rallyDice',
values: rallyChoices,
value: null,
beforeCrit: true,
callback: part => {
const rallyFaces = config.modifiers.rally.values.find(
r => r.value === config.modifiers.rally.value
)?.label;
part.roll.terms.push(
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
...this.parse(`1${rallyFaces}`)
);
}
};
}
}
const item = config.data.parent.items?.get(config.source.item);

View file

@ -238,7 +238,7 @@ export const registerRollDiceHooks = () => {
if (updates.length) {
const target = actor.system.partner ?? actor;
if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) {
if (!['dead', 'unconscious'].some(x => actor.statuses.has(x))) {
setTimeout(() => {
target.modifyResource(updates);
}, 50);

View file

@ -24,7 +24,7 @@
<input type="text" value="{{extraFormula}}" name="roll.{{ @index }}.extraFormula" placeholder="Situational Bonus">
</div>
{{/each}}
{{#if @root.modifiers}}
{{#unless (empty @root.modifiers)}}
<fieldset class="modifier-container two-columns">
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
{{#each @root.modifiers}}
@ -39,7 +39,7 @@
{{/if}}
{{/each}}
</fieldset>
{{/if}}
{{/unless}}
<div class="damage-section-controls">
{{#if directDamage}}
<select class="roll-mode-select" name="selectedRollMode">