Fix: Add missing Handlebars subtract helper

- Added subtract helper: parseInt(a) - parseInt(b)
- Helper is used in partial-active-effects.hbs and partial-item-effects.hbs
- Registered in MournbladeCYD2Utility.init() alongside other helpers
- Added test verification for subtract helper registration

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-07 00:48:55 +02:00
parent 0258c2e8b7
commit 14763cc5b3
2 changed files with 46 additions and 1 deletions
+3
View File
@@ -46,6 +46,9 @@ export class MournbladeCYD2Utility {
Handlebars.registerHelper('mul', function (a, b) {
return parseInt(a) * parseInt(b);
})
Handlebars.registerHelper('subtract', function (a, b) {
return parseInt(a) - parseInt(b);
})
Handlebars.registerHelper('select', function(value, options) {
const html = options.fn(this);
const escaped = String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');