mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
Merge remote-tracking branch 'origin/sabe/attributes' into develop
Conflicts: views/shared/footer.jade
This commit is contained in:
commit
3a5eda1e98
4 changed files with 29 additions and 2 deletions
|
|
@ -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)
|
||||
});
|
||||
}
|
||||
}])
|
||||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()')
|
||||
|
|
|
|||
Loading…
Reference in a new issue