mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Merge branch 'hotfix' into bug/745-perm-view-button
This commit is contained in:
commit
e0ac0b81e1
6 changed files with 29 additions and 26 deletions
|
|
@ -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 can’t move or act while unconscious, they can’t be targeted by an attack."
|
||||
},
|
||||
"vulnerable": {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue