mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature/Fixes] Adversary Touchups (#359)
* Added support for automatic horde damage * Active effects are shown on the token * Fixed logic * Fixed d20 dice lightmode color
This commit is contained in:
parent
727cb692b4
commit
b40d053201
19 changed files with 134 additions and 24 deletions
|
|
@ -6,6 +6,15 @@ export default class DHDamageAction extends DHBaseAction {
|
|||
getFormulaValue(part, data) {
|
||||
let formulaValue = part.value;
|
||||
if (this.hasRoll && part.resultBased && data.system.roll.result.duality === -1) return part.valueAlt;
|
||||
|
||||
const isAdversary = this.actor.type === 'adversary';
|
||||
if (isAdversary && this.actor.system.type === CONFIG.DH.ACTOR.adversaryTypes.horde.id) {
|
||||
const hasHordeDamage = this.actor.effects.find(
|
||||
x => x.name === game.i18n.localize('DAGGERHEART.CONFIG.AdversaryType.horde.label')
|
||||
);
|
||||
if (hasHordeDamage) return part.valueAlt;
|
||||
}
|
||||
|
||||
return formulaValue;
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +30,7 @@ export default class DHDamageAction extends DHBaseAction {
|
|||
bonusDamage = [];
|
||||
|
||||
if (isNaN(formula)) formula = Roll.replaceFormulaData(formula, this.getRollData(systemData));
|
||||
|
||||
|
||||
const config = {
|
||||
title: game.i18n.format('DAGGERHEART.UI.Chat.damageRoll.title', { damage: this.name }),
|
||||
roll: { formula },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue