mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Added all armors
This commit is contained in:
parent
fd59a8f76e
commit
136f507b4e
43 changed files with 3028 additions and 113 deletions
|
|
@ -71,13 +71,14 @@ export default class DHArmor extends AttachableItem {
|
|||
for (var feature of added) {
|
||||
const featureData = armorFeatures[feature.value];
|
||||
if (featureData.effects?.length > 0) {
|
||||
const embeddedItems = await this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||
{
|
||||
name: game.i18n.localize(featureData.label),
|
||||
description: game.i18n.localize(featureData.description),
|
||||
changes: featureData.effects.flatMap(x => x.changes)
|
||||
}
|
||||
]);
|
||||
const embeddedItems = await this.parent.createEmbeddedDocuments(
|
||||
'ActiveEffect',
|
||||
featureData.effects.map(effect => ({
|
||||
...effect,
|
||||
name: game.i18n.localize(effect.name),
|
||||
description: game.i18n.localize(effect.description)
|
||||
}))
|
||||
);
|
||||
feature.effectIds = embeddedItems.map(x => x.id);
|
||||
}
|
||||
|
||||
|
|
@ -93,6 +94,7 @@ export default class DHArmor extends AttachableItem {
|
|||
description: game.i18n.localize(effect.description)
|
||||
}))
|
||||
);
|
||||
feature.effectIds = [...(feature.effectIds ?? []), ...embeddedEffects.map(x => x.id)];
|
||||
|
||||
const cls = game.system.api.models.actions.actionsTypes[action.type];
|
||||
const actionId = foundry.utils.randomID();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue