mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 07:36:26 +01:00
Fix bardic rally showing in damage dialog when it should not (#783)
This commit is contained in:
parent
080b6bc2da
commit
df5373cd20
2 changed files with 21 additions and 18 deletions
|
|
@ -159,13 +159,15 @@ 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;
|
||||
}, []),
|
||||
}, [])
|
||||
if(rallyChoices.length) {
|
||||
mods.rally = {
|
||||
label: 'DAGGERHEART.CLASS.Feature.rallyDice',
|
||||
values: rallyChoices,
|
||||
value: null,
|
||||
beforeCrit: true,
|
||||
callback: part => {
|
||||
|
|
@ -179,6 +181,7 @@ export default class DamageRoll extends DHRoll {
|
|||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const item = config.data.parent.items?.get(config.source.item);
|
||||
if (item) {
|
||||
|
|
|
|||
|
|
@ -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