semi-idle-arpg/analytics/leveling-sim.gd

24 lines
553 B
GDScript

extends SceneTree
func level_eqn(experience):
return log(0.2 * experience + 5) + 1
func experience_eqn(level):
# return 5 * exp(level - 1) - 5
return 100 * (level - 1)**3
func kill_eqn(level):
var avg_difficulty = 2
# var experience_per_kill = ((level / 10) + 1) ** avg_difficulty ** 3
var experience_per_kill = ((level - 1)/10) + 1 * avg_difficulty
return experience_eqn(level) / experience_per_kill
func _init() -> void:
for level in range(1, 101):
print("%s: %s" % [level, kill_eqn(level)])
quit()