mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-05 06:32:31 +00:00
7 lines
357 B
JavaScript
7 lines
357 B
JavaScript
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
const limitMeterValue = function({trigger,attributes,sections}){
|
|
const [section,id,field] = k.parseTriggerName(trigger.name);
|
|
return Math.min(attributes[`${section}_${id}_${field}`],attributes[`${section}_${id}_${field}_max`])
|
|
};
|
|
k.registerFuncs({limitMeterValue}); |