Talk:How do stats increase at level up?

From OHRRPGCE-Wiki
Jump to navigation Jump to search

S'orlok Reaves: So, just to double-check, following your example, if I'm at level 28, and I have a helmet that gives me +40 of a stat, then I'll have 178 in that stat. If I level up, I'll now have 186, and if I then de-equip that helmet, I'll have 146. Right? (I'm assuming that the "old level up" bit is OFF) Base stats: (for reference) lvl 28 = 138 lvl 29 = 146


Mike C.: That's the idea.

Source Code[edit]

FreeBasic[edit]

FUNCTION atlevel (byval lev as integer, byval a0 as integer, byval aMax as integer) as integer
 'Stat at a given level, according to an arbitrary curve between two points.
  IF lev < 0 THEN RETURN 0
  RETURN (.8 + lev / 50) * lev * ((aMax - a0) / 275.222) + a0 + .1
END FUNCTION

Python 2.7[edit]

def calcstat(level, a0, a99):
    return int( (.8 + level / 50.0) * level * ((a99 - a0) / 275.222) + a0 + .1 )