mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Merged with main
This commit is contained in:
commit
990c73987e
65 changed files with 567 additions and 424 deletions
|
|
@ -51,11 +51,13 @@ export default class DHAttackAction extends DHDamageAction {
|
|||
const labels = [];
|
||||
const { roll, range, damage } = this;
|
||||
|
||||
if (roll.trait) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Traits.${roll.trait}.short`))
|
||||
if (roll.trait) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Traits.${roll.trait}.short`));
|
||||
if (range) labels.push(game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.short`));
|
||||
|
||||
for (const { value, type } of damage.parts) {
|
||||
const str = Roll.replaceFormulaData(value.getFormula(), this.actor?.getRollData() ?? {});
|
||||
const useAltDamage = this.actor?.effects?.find(x => x.type === 'horde')?.active;
|
||||
for (const { value, valueAlt, type } of damage.parts) {
|
||||
const usedValue = useAltDamage ? valueAlt : value;
|
||||
const str = Roll.replaceFormulaData(usedValue.getFormula(), this.actor?.getRollData() ?? {});
|
||||
|
||||
const icons = Array.from(type)
|
||||
.map(t => CONFIG.DH.GENERAL.damageTypes[t]?.icon)
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
dialog: {
|
||||
configure: hasRoll
|
||||
},
|
||||
type: this.type,
|
||||
type: this.roll?.type ?? this.type,
|
||||
hasRoll: hasRoll,
|
||||
hasDamage: this.damage?.parts?.length && this.type !== 'healing',
|
||||
hasHealing: this.damage?.parts?.length && this.type === 'healing',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue