@@ -86,7 +86,7 @@ export function initConfig() {
86
86
target = item . labels ?. target || "-" ;
87
87
range = item . labels ?. range || "-" ;
88
88
properties = [ ] ;
89
- dt = item . labels ?. damageTypes ?. split ( ", " ) ;
89
+ dt = item ? .labels ?. damages ?. map ( d => d . damageType ) ;
90
90
damageTypes = dt && dt . length ? dt : [ ] ;
91
91
materialComponents = "" ;
92
92
@@ -140,9 +140,9 @@ export function initConfig() {
140
140
value : item . labels . toHit ,
141
141
} ) ;
142
142
}
143
- if ( item ?. labels ?. derivedDamage ?. length ) {
143
+ if ( item ?. labels ?. damages ?. length ) {
144
144
let dmgString = "" ;
145
- item . labels . derivedDamage . forEach ( ( dDmg ) => {
145
+ item . labels . damages . forEach ( ( dDmg ) => {
146
146
dmgString += dDmg . formula + " " + getDamageTypeIcon ( dDmg . damageType ) + " " ;
147
147
} ) ;
148
148
details . push ( {
@@ -158,6 +158,7 @@ export function initConfig() {
158
158
}
159
159
160
160
function getDamageTypeIcon ( damageType ) {
161
+ damageType ??= "" ;
161
162
switch ( damageType . toLowerCase ( ) ) {
162
163
case "acid" :
163
164
return '<i class="fas fa-flask"></i>' ;
@@ -188,7 +189,7 @@ export function initConfig() {
188
189
case "healing" :
189
190
return '<i class="fas fa-heart"></i>' ;
190
191
default :
191
- return "" ;
192
+ return '<i class="fas fa-sparkles"></i>' ;
192
193
}
193
194
}
194
195
@@ -777,6 +778,13 @@ export function initConfig() {
777
778
const used = await this . item . use ( { event, legacy : false } , { event } ) ;
778
779
if ( used ) {
779
780
DND5eItemButton . consumeActionEconomy ( this . activity ) ;
781
+ const useOtherItem = this . activity ?. consumption ?. targets ?. find ( t => t . type === "itemUses" ) ;
782
+ if ( useOtherItem ) {
783
+ const otherItem = this . actor . items . get ( useOtherItem . target ) ;
784
+ const allConnectedItems = this . actor . items . filter ( i => i . system . activities ?. find ( a => a . consumption ?. targets ?. find ( t => t . type === "itemUses" && t . target === otherItem . id ) ) ) ;
785
+ ui . ARGON . updateItemButtons ( allConnectedItems ) ;
786
+ }
787
+ this . render ( true )
780
788
}
781
789
}
782
790
0 commit comments