diff --git a/rpg-docs/lib/functions/evaluate.js b/rpg-docs/lib/functions/evaluate.js index 552f6944..9fce8c79 100644 --- a/rpg-docs/lib/functions/evaluate.js +++ b/rpg-docs/lib/functions/evaluate.js @@ -1,3 +1,12 @@ +// if we want to add more functions, consider pulling out into its own file +(function() { + math.import({ + "if": function(pred, a, b) { + return (!!(pred)) ? a : b; + } + }); +})(); + //evaluates a calculation string evaluate = function(charId, string){ if (!string) return string;