mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
Spellcastmodifiers were not being sorted correctly for use
This commit is contained in:
parent
d5621d20ec
commit
1227c8b4cf
2 changed files with 3 additions and 3 deletions
|
|
@ -368,7 +368,7 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
const modifiers = subClasses
|
const modifiers = subClasses
|
||||||
?.map(sc => ({ ...this.traits[sc.system.spellcastingTrait], key: sc.system.spellcastingTrait }))
|
?.map(sc => ({ ...this.traits[sc.system.spellcastingTrait], key: sc.system.spellcastingTrait }))
|
||||||
.filter(x => x);
|
.filter(x => x);
|
||||||
return modifiers.sort((a, b) => a.value - b.value)[0];
|
return modifiers.sort((a, b) => (b.value ?? 0) - (a.value ?? 0))[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
get spellcastModifier() {
|
get spellcastModifier() {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<aside class="character-sidebar-sheet">
|
<aside class="character-sidebar-sheet">
|
||||||
<div class="portrait {{#if isDeath}}death-roll{{/if}}">
|
<div class="portrait {{#if isDeath}}death-roll{{/if}}">
|
||||||
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||||
{{#if document.system.class.subclass.system.spellcastingTrait}}
|
{{#if document.system.spellcastModifierTrait.key}}
|
||||||
<div class="icons-list">
|
<div class="icons-list">
|
||||||
<span class="spellcast-icon {{#if isDeath}}no-label{{/if}}">
|
<span class="spellcast-icon {{#if isDeath}}no-label{{/if}}">
|
||||||
<span class="spellcast-label">
|
<span class="spellcast-label">
|
||||||
{{localize "DAGGERHEART.ITEMS.Subclass.spellcastingTrait"}}:
|
{{localize "DAGGERHEART.ITEMS.Subclass.spellcastingTrait"}}:
|
||||||
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' document.system.class.subclass.system.spellcastingTrait '.short')}}
|
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' document.system.spellcastModifierTrait.key '.short')}}
|
||||||
</span>
|
</span>
|
||||||
<i class="fa-solid fa-wand-sparkles"></i>
|
<i class="fa-solid fa-wand-sparkles"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue