Changed how levels are handled

This commit is contained in:
Thaum
2015-03-02 19:38:53 +00:00
parent 80d44ff310
commit 88dbaccfc5
14 changed files with 110 additions and 66 deletions

View File

@@ -433,8 +433,8 @@ Characters.helpers({
var mod = +getMod(this.attributeValue(attribute));
return 10 + mod;
},
level: function(){
xpLevel: function(){
var xp = this.experience();
var xpTable = [0, 300, 900, 2700, 6500, 14000, 23000, 34000, 48000, 64000,
85000, 100000, 120000, 140000, 165000, 195000, 225000, 265000,
@@ -447,6 +447,14 @@ Characters.helpers({
if(xp > 355000) return 20;
return 0;
},
level: function(){
var level = 0;
Classes.find({charId: this._id}).forEach(function(cls){
level += cls.level;
})
return level;
},
experience: function(){
var xp = 0;