Skip to content
mpetrovic edited this page Apr 17, 2011 · 3 revisions

Component

This Character levels up. This component stores the growth formula for a given character. It also stores the XP table. This is just a simple array of Level => XP reach next. Eg. 1 = 101 means a level 1 character requires 101 XP to hit level 2.

The only stats that grow on level are HP, MP, Atk and Def.

Properties:

  • tendencies -- how a base stat grows. Should probably be a callback that takes the next level and returns the difference. one for each stat that grows.
Methods:
  • growth_for(stat, level) -- runs the callback for a given stat and returns the diff
  • level_up()
Clone this wiki locally