[
  {
    "type": "jmath_function",
    "id": "dreamer_level",
    "num_args": 1,
    "return": "(u_val('intelligence') + u_val('perception')) * (_0)"
  },
  {
    "type": "jmath_function",
    "id": "eater_level",
    "num_args": 1,
    "return": "(u_val('strength') + u_val('dexterity')) * (_0)"
  },
  {
    "type": "jmath_function",
    "id": "spell_time",
    "num_args": 1,
    "//": "used to transform the variable time (the smallest measure is 1 second) to the spell time (the smallest measure is 1 move, 1 second = 100 moves)",
    "return": "_0 * 100"
  },
  {
    "type": "jmath_function",
    "id": "spell_exp",
    "num_args": 1,
    "//": "accept a spell level, return the amount of XP spell required at this level.",
    "return": "2.71828182^(0.146661*(_0+62.5))-6200"
  },
  {
    "type": "jmath_function",
    "id": "spell_exp_diff",
    "num_args": 1,
    "//": "accept the spell level, return a difference in experience between spell's current level and the next level",
    "return": "spell_exp(_0 + 1) - spell_exp(_0)"
  },
  {
    "type": "jmath_function",
    "id": "spell_train_factor",
    "num_args": 1,
    "//": "accept the spell _cost, return how much spellcasts required to level the spell",
    "//2": "formula assumes 1000 (plus 500 for eaters) as half of player's default mana pool, and 40 is flat modifier to prevent cheap spells cost ungodly lot of time and micromanagement to level them",
    "return": "(( u_has_trait('EATER')*500)+1000)/(_0 > 0 ? _0 + 40 : 0)"
  },
  {
    "type": "jmath_function",
    "id": "int_to_level",
    "num_args": 1,
    "return": "(u_val('intelligence') * 1.5) * (_0)"
  },
  {
    "type": "jmath_function",
    "id": "dex_to_level",
    "num_args": 1,
    "return": "(u_val('dexterity') * 1.5) * (_0)"
  },
  {
    "type": "jmath_function",
    "id": "per_to_level",
    "num_args": 1,
    "return": "(u_val('perception') * 1.5) * (_0)"
  },
  {
    "type": "jmath_function",
    "id": "str_to_level",
    "num_args": 1,
    "return": "(u_val('strength') * 1.5) * (_0)"
  },
  {
    "type": "jmath_function",
    "id": "scaling_factor",
    "num_args": 1,
    "return": "( ( _0 + 10) / 20 )"
  }
]
