mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +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",
|
"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."
|
"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": {
|
"unconscious": {
|
||||||
"name": "Unconcious",
|
"name": "Unconscious",
|
||||||
"description": "Your character can’t move or act while unconscious, they can’t be targeted by an attack."
|
"description": "Your character can’t move or act while unconscious, they can’t be targeted by an attack."
|
||||||
},
|
},
|
||||||
"vulnerable": {
|
"vulnerable": {
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
: this.document.system.actions?.get(actionId);
|
: this.document.system.actions?.get(actionId);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
const description = doc.system?.description ?? doc.description;
|
const description = game.i18n.localize(doc.system?.description ?? doc.description);
|
||||||
const isAction = !!actionId;
|
const isAction = !!actionId;
|
||||||
descriptionElement.innerHTML = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
descriptionElement.innerHTML = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||||
description,
|
description,
|
||||||
|
|
|
||||||
|
|
@ -183,11 +183,11 @@ export const conditions = {
|
||||||
icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp',
|
icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp',
|
||||||
description: 'DAGGERHEART.CONFIG.Condition.restrained.description'
|
description: 'DAGGERHEART.CONFIG.Condition.restrained.description'
|
||||||
},
|
},
|
||||||
unconcious: {
|
unconscious: {
|
||||||
id: 'unconcious',
|
id: 'unconscious',
|
||||||
name: 'DAGGERHEART.CONFIG.Condition.unconcious.name',
|
name: 'DAGGERHEART.CONFIG.Condition.unconscious.name',
|
||||||
icon: 'icons/magic/control/sleep-bubble-purple.webp',
|
icon: 'icons/magic/control/sleep-bubble-purple.webp',
|
||||||
description: 'DAGGERHEART.CONFIG.Condition.unconcious.description'
|
description: 'DAGGERHEART.CONFIG.Condition.unconscious.description'
|
||||||
},
|
},
|
||||||
dead: {
|
dead: {
|
||||||
id: 'dead',
|
id: 'dead',
|
||||||
|
|
|
||||||
|
|
@ -159,25 +159,28 @@ export default class DamageRoll extends DHRoll {
|
||||||
if (config.data?.parent) {
|
if (config.data?.parent) {
|
||||||
if (config.data.parent.appliedEffects) {
|
if (config.data.parent.appliedEffects) {
|
||||||
// Bardic Rally
|
// Bardic Rally
|
||||||
mods.rally = {
|
const rallyChoices = config.data?.parent?.appliedEffects.reduce((a, c) => {
|
||||||
label: 'DAGGERHEART.CLASS.Feature.rallyDice',
|
|
||||||
values: config.data?.parent?.appliedEffects.reduce((a, c) => {
|
|
||||||
const change = c.changes.find(ch => ch.key === 'system.bonuses.rally');
|
const change = c.changes.find(ch => ch.key === 'system.bonuses.rally');
|
||||||
if (change) a.push({ value: c.id, label: change.value });
|
if (change) a.push({ value: c.id, label: change.value });
|
||||||
return a;
|
return a;
|
||||||
}, []),
|
}, [])
|
||||||
value: null,
|
if(rallyChoices.length) {
|
||||||
beforeCrit: true,
|
mods.rally = {
|
||||||
callback: part => {
|
label: 'DAGGERHEART.CLASS.Feature.rallyDice',
|
||||||
const rallyFaces = config.modifiers.rally.values.find(
|
values: rallyChoices,
|
||||||
r => r.value === config.modifiers.rally.value
|
value: null,
|
||||||
)?.label;
|
beforeCrit: true,
|
||||||
part.roll.terms.push(
|
callback: part => {
|
||||||
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
const rallyFaces = config.modifiers.rally.values.find(
|
||||||
...this.parse(`1${rallyFaces}`)
|
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);
|
const item = config.data.parent.items?.get(config.source.item);
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ export const registerRollDiceHooks = () => {
|
||||||
|
|
||||||
if (updates.length) {
|
if (updates.length) {
|
||||||
const target = actor.system.partner ?? actor;
|
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(() => {
|
setTimeout(() => {
|
||||||
target.modifyResource(updates);
|
target.modifyResource(updates);
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<input type="text" value="{{extraFormula}}" name="roll.{{ @index }}.extraFormula" placeholder="Situational Bonus">
|
<input type="text" value="{{extraFormula}}" name="roll.{{ @index }}.extraFormula" placeholder="Situational Bonus">
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#if @root.modifiers}}
|
{{#unless (empty @root.modifiers)}}
|
||||||
<fieldset class="modifier-container two-columns">
|
<fieldset class="modifier-container two-columns">
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
|
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
|
||||||
{{#each @root.modifiers}}
|
{{#each @root.modifiers}}
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{/if}}
|
{{/unless}}
|
||||||
<div class="damage-section-controls">
|
<div class="damage-section-controls">
|
||||||
{{#if directDamage}}
|
{{#if directDamage}}
|
||||||
<select class="roll-mode-select" name="selectedRollMode">
|
<select class="roll-mode-select" name="selectedRollMode">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue