mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Feature] Armor/Weapon Compendiums (#459)
* Fixed localization * . * Added all Secondary Weapons * Added all armors * Added Tier1 weapons * Tier2 Physical * Tier 2 magical * Tier 3 Physical * Tier 3 Magical * Tier 4 Physical * Tier 4 Magical * Added wheelchairs
This commit is contained in:
parent
8e516df7cb
commit
2c4d3bd4a3
277 changed files with 34221 additions and 431 deletions
|
|
@ -118,13 +118,14 @@ export default class DHWeapon extends AttachableItem {
|
|||
for (let weaponFeature of added) {
|
||||
const featureData = CONFIG.DH.ITEM.weaponFeatures[weaponFeature.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)
|
||||
}))
|
||||
);
|
||||
weaponFeature.effectIds = embeddedItems.map(x => x.id);
|
||||
}
|
||||
|
||||
|
|
@ -140,6 +141,10 @@ export default class DHWeapon extends AttachableItem {
|
|||
description: game.i18n.localize(effect.description)
|
||||
}))
|
||||
);
|
||||
weaponFeature.effectIds = [
|
||||
...(weaponFeature.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