new style for character sheets

This commit is contained in:
moliloo 2025-06-20 02:24:42 -03:00
parent f133b3b966
commit 970de74929
42 changed files with 2392 additions and 110 deletions

View file

@ -13,10 +13,43 @@ export default class RegisterHandlebarsHelpers {
signedNumber: this.signedNumber,
length: this.length,
switch: this.switch,
case: this.case
case: this.case,
eq: this.eq,
ne: this.ne,
lt: this.lt,
gt: this.gt,
lte: this.lte,
gte: this.gte,
and: this.and,
or: this.or
});
}
static eq(v1, v2) {
return v1 === v2;
}
static ne(v1, v2) {
return v1 !== v2;
}
static lt(v1, v2) {
return v1 < v2;
}
static gt(v1, v2) {
return v1 > v2;
}
static lte(v1, v2) {
return v1 <= v2;
}
static gte(v1, v2) {
return v1 >= v2;
}
static and() {
return Array.prototype.every.call(arguments, Boolean);
}
static or() {
return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
}
static times(nr, block) {
var accum = '';
for (var i = 0; i < nr; ++i) accum += block.fn(i);
@ -101,7 +134,7 @@ export default class RegisterHandlebarsHelpers {
}
static debug(a) {
console.log(JSON.stringify(a));
console.log(a);
return a;
}
}