autoAllocate: small tweak to taskbased to make it more apparent which is kicking

This commit is contained in:
Tyler Renelle 2014-01-04 17:32:14 -07:00
parent 2721800f37
commit fdd856c2f8

View file

@ -31,9 +31,18 @@ user =
armor: 'armor_warrior_4'
shield: 'shield_warrior_4'
head: 'head_warrior_4'
habits: [{value:1,type:'habit'}]
dailys: []
todos: []
habits: [
# we're gonna change this habit's attribute to mess with taskbased allo. Add the others to make sure our _.reduce is legit
{id:'a',value:1,type:'habit',attribute:'str'}
]
dailys: [
{id:'b',value:1,type:'daily',attribute:'str'}
]
todos: [
{id:'c',value:1,type:'todo',attribute:'con'}
{id:'d',value:1,type:'todo',attribute:'per'}
{id:'e',value:1,type:'todo',attribute:'int'}
]
rewards: []
modes =
@ -65,6 +74,7 @@ _.times [20], (lvl) ->
_.each $w('flat classbased_warrior classbased_rogue classbased_wizard classbased_healer taskbased'), (mode) ->
u = modes[mode] #local var
u.stats.exp = shared.tnl(lvl)+1 # level up
_.merge u.stats, {per:0,con:0,int:0,str:0} if mode is 'taskbased' # if task-based, clear stat so we can see clearly which stat got +1
u.habits[0].attribute = u.fns.randomVal({str:'str',int:'int',per:'per',con:'con'})
u.ops.score {params:{id:u.habits[0].id},direction:'up'}
u.fns.updateStats(u.stats) # trigger stats update