diff --git a/public/js/controllers/footerCtrl.js b/public/js/controllers/footerCtrl.js index df7990b651..6541f6f70f 100644 --- a/public/js/controllers/footerCtrl.js +++ b/public/js/controllers/footerCtrl.js @@ -62,4 +62,9 @@ habitrpg.controller("FooterCtrl", ['$scope', '$rootScope', 'User', '$http', 'Not 'stats.mp': User.user.stats.mp + 10000 }); } + $scope.addOneLevel = function(){ + User.set({ + 'stats.exp': User.user.stats.exp + (Math.round(((Math.pow(User.user.stats.lvl, 2) * 0.25) + (10 * User.user.stats.lvl) + 139.75) / 10) * 10) + }); + } }]) \ No newline at end of file diff --git a/src/models/user.js b/src/models/user.js index 2a284eda3b..0e5e2fa86a 100644 --- a/src/models/user.js +++ b/src/models/user.js @@ -223,6 +223,7 @@ var UserSchema = new Schema({ timezoneOffset: Number, language: String, automaticAllocation: Boolean, + allocationMode: {type:String, enum: ['flat','classbased','taskbased'], 'default': 'flat'}, costume: Boolean, sleep: {type: Boolean, 'default': false}, stickyHeader: {type: Boolean, 'default': true}, @@ -255,6 +256,12 @@ var UserSchema = new Schema({ stealth: {type: Number, 'default': 0}, streaks: {type: Boolean, 'default': false}, snowball: {type: Boolean, 'default': false} + }, + training: { + int: {type: Number, 'default': 0}, + per: {type: Number, 'default': 0}, + str: {type: Number, 'default': 0}, + con: {type: Number, 'default': 0} } }, tags: [ diff --git a/views/options/profile.jade b/views/options/profile.jade index 552e63d2a9..53972570e5 100644 --- a/views/options/profile.jade +++ b/views/options/profile.jade @@ -149,8 +149,21 @@ script(id='partials/options.profile.stats.html', type='text/ng-template') fieldset.auto-allocate label.checkbox input(type='checkbox', ng-model='user.preferences.automaticAllocation', ng-change='set({"preferences.automaticAllocation": user.preferences.automaticAllocation?true: false})') - | Automatic Allocation - i.icon-question-sign(popover-trigger='mouseenter', popover-placement='bottom', popover="When 'automatic' is checked, your points will be allocated to the stat representing your task focus (see Task > Edit). When unchecked, you'll have one point to allocate each level. The system makes a suggestion, but you can ignore the suggestion.") + | Automatic Allocation  + i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Places points into attributes according to your preferences, when you level up.") + form(ng-show='user.preferences.automaticAllocation') + label.radio + input(type='radio', name='allocationMode', value='flat', ng-model='user.preferences.allocationMode', ng-change='set({"preferences.allocationMode": "flat"})') + | Distribute attribute points evenly  + i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Assigns the same number of points to each attribute.") + label.radio + input(type='radio', name='allocationMode', value='classbased', ng-model='user.preferences.allocationMode', ng-change='set({"preferences.allocationMode": "classbased"})') + | Distribute attribute points based on Class  + i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Assigns more points to the attributes important to your Class.") + label.radio + input(type='radio', name='allocationMode', value='taskbased', ng-model='user.preferences.allocationMode', ng-change='set({"preferences.allocationMode": "taskbased"})') + | Distribute attribute points based on task activity  + i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Assigns points based on the Physical (STR), Mental (INT), Social (CON), and Other (PER) categories associated with the tasks you complete.") table.table.table-striped tr td diff --git a/views/shared/footer.jade b/views/shared/footer.jade index d1558e502a..a878dff7e2 100644 --- a/views/shared/footer.jade +++ b/views/shared/footer.jade @@ -73,5 +73,7 @@ footer.footer(ng-controller='FooterCtrl') a.btn(ng-click='addTenGems()')=env.t('debugGems') li a.btn(ng-click='addLevelsAndGold()')=env.t('debugLevel') + li + a.btn(ng-click='addOneLevel()') +1 Level div(ng-init='deferredScripts()')