mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Added effect enricher
This commit is contained in:
parent
6772a8fbd8
commit
d3836fbeeb
8 changed files with 77 additions and 44 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { rollCommandToJSON } from '../helpers/utils.mjs';
|
||||
|
||||
export default function DhDamageEnricher(match, _options) {
|
||||
const parts = match[1].split('|').map(x => x.trim());
|
||||
|
||||
|
|
@ -25,8 +23,7 @@ export default function DhDamageEnricher(match, _options) {
|
|||
return getDamageMessage(value, type, match[0]);
|
||||
}
|
||||
|
||||
export function getDamageMessage(damage, type, defaultElement) {
|
||||
const dualityElement = document.createElement('span');
|
||||
function getDamageMessage(damage, type, defaultElement) {
|
||||
const typeIcons = type
|
||||
.replace('[', '')
|
||||
.replace(']', '')
|
||||
|
|
@ -41,6 +38,7 @@ export function getDamageMessage(damage, type, defaultElement) {
|
|||
|
||||
const iconNodes = typeIcons.map(x => `<i class="fa-solid ${x}"></i>`).join('');
|
||||
|
||||
const dualityElement = document.createElement('span');
|
||||
dualityElement.innerHTML = `
|
||||
<button class="enriched-damage-button"
|
||||
data-value="${damage}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue