
So I am trying to automate the ST deficit for my melee weapon repeating rows. The esl value is not being calculated. // Update Lines on Melee
on('change:repeating_melee remove:repeating_melee change:total_melee_mod', function () {
TAS.repeating('melee')
.attrs('total_melee_mod', 'current_strength')
.fields('esl', 'skill', 'min_st', 'stdeficit')
.each(function(r,a){
var deficit = a.I.current_strength - r.I.min_st;
r.D[0].stdeficit = Math.max(0, deficit);
r.D[0].esl = r.I.skill + r.I.stdficit + a.I.total_melee_mod;
})
.execute();
});