Spell slots are now available in calculations

closes #11
This commit is contained in:
Stefan Zermatten
2017-07-13 10:56:42 +02:00
parent 99c72d1e10
commit 089feae26f

View File

@@ -11,7 +11,7 @@
evaluate = function(charId, string, opts){
var spellListId = opts && opts.spellListId;
if (!string) return string;
string = string.replace(/\b[a-z]+\b/gi, function(sub){
string = string.replace(/\b[a-z,1-9]+\b/gi, function(sub){
//fields
if (Schemas.Character.schema(sub)){
return Characters.calculate.fieldValue(charId, sub);