mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 23:43:37 +02:00
[V14] Armor System ArmorScore (#1744)
* Readded so that armor items have their system defined armor instead of using an ActiveEffect * Consolidate armor source retrieval * Fix regression with updating armor when sources are disabled * Simplify armor pip update * Use helper in damage reduction dialog * . * Corrected SRD Armor Items --------- Co-authored-by: Carlos Fernandez <cfern1990@gmail.com>
This commit is contained in:
parent
50dcbf4396
commit
33fb7bcc69
45 changed files with 365 additions and 1535 deletions
|
|
@ -34,13 +34,6 @@ export default class ArmorSheet extends ItemAttachmentSheet(DHBaseItemSheet) {
|
|||
...super.PARTS
|
||||
};
|
||||
|
||||
_attachPartListeners(partId, htmlElement, options) {
|
||||
super._attachPartListeners(partId, htmlElement, options);
|
||||
|
||||
for (const element of htmlElement.querySelectorAll('.base-score-input'))
|
||||
element.addEventListener('change', this.updateArmorEffect.bind(this));
|
||||
}
|
||||
|
||||
/**@inheritdoc */
|
||||
async _preparePartContext(partId, context) {
|
||||
await super._preparePartContext(partId, context);
|
||||
|
|
@ -48,11 +41,6 @@ export default class ArmorSheet extends ItemAttachmentSheet(DHBaseItemSheet) {
|
|||
switch (partId) {
|
||||
case 'settings':
|
||||
context.features = this.document.system.armorFeatures.map(x => x.value);
|
||||
context.armorScore = this.document.system.armorData.max;
|
||||
break;
|
||||
case 'effects':
|
||||
context.effects.actives = context.effects.actives.filter(x => !x.system.armorData);
|
||||
context.effects.inactives = context.effects.inactives.filter(x => !x.system.armorData);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue