|
|
|
|
@ -162,12 +162,12 @@ describe 'User', ->
|
|
|
|
|
|
|
|
|
|
cron()
|
|
|
|
|
expect(user.stats.buffs.str).to.be 0
|
|
|
|
|
expect(user.achievements.perfect).to.not.be.ok
|
|
|
|
|
expect(user.achievements.perfect).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
user.dailys[0].completed = true
|
|
|
|
|
cron()
|
|
|
|
|
expect(user.stats.buffs.str).to.be 0
|
|
|
|
|
expect(user.achievements.perfect).to.not.be.ok
|
|
|
|
|
expect(user.achievements.perfect).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
_.each user.dailys, (d)->d.completed = true
|
|
|
|
|
cron()
|
|
|
|
|
@ -182,23 +182,25 @@ describe 'User', ->
|
|
|
|
|
expect(user.stats.buffs.str).to.be 1
|
|
|
|
|
expect(user.achievements.perfect).to.be 2
|
|
|
|
|
|
|
|
|
|
describe.skip 'Resting in the Inn', ->
|
|
|
|
|
describe 'Resting in the Inn', ->
|
|
|
|
|
user = null
|
|
|
|
|
cron = null
|
|
|
|
|
|
|
|
|
|
beforeEach ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.preferences.sleep = true
|
|
|
|
|
cron = -> user.lastCron = moment().subtract(1, 'days');user.fns.cron()
|
|
|
|
|
user.dailys = []
|
|
|
|
|
_.times 2, -> user.dailys.push shared.taskDefaults({type:'daily'})
|
|
|
|
|
|
|
|
|
|
it 'remains in the inn on cron', ->
|
|
|
|
|
cron()
|
|
|
|
|
expect(user.preferences.sleep).to.be.ok
|
|
|
|
|
expect(user.preferences.sleep).to.be true
|
|
|
|
|
|
|
|
|
|
it 'resets dailies', ->
|
|
|
|
|
user.dailys[0].completed = true
|
|
|
|
|
cron()
|
|
|
|
|
expect(user.dailys[0].completed).to.not.be.ok
|
|
|
|
|
expect(user.dailys[0].completed).to.be false
|
|
|
|
|
|
|
|
|
|
it 'resets checklist on incomplete dailies', ->
|
|
|
|
|
user.dailys[0].checklist = [
|
|
|
|
|
@ -220,7 +222,7 @@ describe 'User', ->
|
|
|
|
|
]
|
|
|
|
|
cron()
|
|
|
|
|
_.each user.dailys[0].checklist, (box)->
|
|
|
|
|
expect(box.completed).to.not.be.ok
|
|
|
|
|
expect(box.completed).to.be false
|
|
|
|
|
|
|
|
|
|
it 'resets checklist on complete dailies', ->
|
|
|
|
|
user.dailys[0].checklist = [
|
|
|
|
|
@ -243,7 +245,58 @@ describe 'User', ->
|
|
|
|
|
user.dailys[0].completed = true
|
|
|
|
|
cron()
|
|
|
|
|
_.each user.dailys[0].checklist, (box)->
|
|
|
|
|
expect(box.completed).to.not.be.ok
|
|
|
|
|
expect(box.completed).to.be false
|
|
|
|
|
|
|
|
|
|
it 'does not reset checklist on grey incomplete dailies', ->
|
|
|
|
|
yesterday = moment().subtract(1,'days')
|
|
|
|
|
user.dailys[0].repeat[shared.dayMapping[yesterday.day()]] = 0
|
|
|
|
|
user.dailys[0].checklist = [
|
|
|
|
|
{
|
|
|
|
|
"text" : "1",
|
|
|
|
|
"id" : "checklist-one",
|
|
|
|
|
"completed" : true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"text" : "2",
|
|
|
|
|
"id" : "checklist-two",
|
|
|
|
|
"completed" : true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"text" : "3",
|
|
|
|
|
"id" : "checklist-three",
|
|
|
|
|
"completed" : true
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
cron()
|
|
|
|
|
_.each user.dailys[0].checklist, (box)->
|
|
|
|
|
expect(box.completed).to.be true
|
|
|
|
|
|
|
|
|
|
it 'resets checklist on complete grey complete dailies', ->
|
|
|
|
|
yesterday = moment().subtract(1,'days')
|
|
|
|
|
user.dailys[0].repeat[shared.dayMapping[yesterday.day()]] = 0
|
|
|
|
|
user.dailys[0].checklist = [
|
|
|
|
|
{
|
|
|
|
|
"text" : "1",
|
|
|
|
|
"id" : "checklist-one",
|
|
|
|
|
"completed" : true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"text" : "2",
|
|
|
|
|
"id" : "checklist-two",
|
|
|
|
|
"completed" : true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"text" : "3",
|
|
|
|
|
"id" : "checklist-three",
|
|
|
|
|
"completed" : true
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
user.dailys[0].completed = true
|
|
|
|
|
|
|
|
|
|
cron()
|
|
|
|
|
_.each user.dailys[0].checklist, (box)->
|
|
|
|
|
expect(box.completed).to.be false
|
|
|
|
|
|
|
|
|
|
it 'does not damage user for incomplete dailies', ->
|
|
|
|
|
expect(user).toHaveHP 50
|
|
|
|
|
@ -265,7 +318,7 @@ describe 'User', ->
|
|
|
|
|
user.preferences.sleep = false
|
|
|
|
|
cron()
|
|
|
|
|
expect(user.stats.hp).to.be.lessThan 50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe 'Death', ->
|
|
|
|
|
user = undefined
|
|
|
|
|
it 'revives correctly', ->
|
|
|
|
|
@ -427,67 +480,67 @@ describe 'User', ->
|
|
|
|
|
_.each [1..5], (i) ->
|
|
|
|
|
user.ops.buy {params:'#{type}_#{klass}_#{i}'}
|
|
|
|
|
it 'does not get ultimateGear ' + klass, ->
|
|
|
|
|
expect(user.achievements.ultimateGear).to.not.be.ok
|
|
|
|
|
expect(user.achievements.ultimateGear).to.not.be.ok()
|
|
|
|
|
_.each shared.content.gearTypes, (type) ->
|
|
|
|
|
user.ops.buy {params:'#{type}_#{klass}_6'}
|
|
|
|
|
it 'gets ultimateGear ' + klass, ->
|
|
|
|
|
expect(user.achievements.ultimateGear).to.be.ok
|
|
|
|
|
xit 'gets ultimateGear ' + klass, ->
|
|
|
|
|
expect(user.achievements.ultimateGear).to.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does not get beastMaster if user has less than 90 drop pets', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.pets = {'Wolf-White': 1, 'Wolf-Desert': 1, 'Wolf-Red': 1, 'Wolf-Shade': 1, 'Wolf-Skeleton': 1, 'Wolf-Zombie': 1, 'Wolf-CottonCandyPink': 1, 'Wolf-CottonCandyBlue': 1, 'Wolf-Golden': 1, 'TigerCub-Base': 1, 'TigerCub-White': 1, 'TigerCub-Desert': 1, 'TigerCub-Red': 1, 'TigerCub-Shade': 1, 'TigerCub-Skeleton': 1, 'TigerCub-Zombie': 1, 'TigerCub-CottonCandyPink': 1, 'TigerCub-CottonCandyBlue': 1, 'TigerCub-Golden': 1, 'PandaCub-Base': 1, 'PandaCub-White': 1, 'PandaCub-Desert': 1, 'PandaCub-Red': 1, 'PandaCub-Shade': 1, 'PandaCub-Skeleton': 1, 'PandaCub-Zombie': 1, 'PandaCub-CottonCandyPink': 1, 'PandaCub-CottonCandyBlue': 1, 'PandaCub-Golden': 1, 'LionCub-Base': 1, 'LionCub-White': 1, 'LionCub-Desert': 1, 'LionCub-Red': 1, 'LionCub-Shade': 1, 'LionCub-Skeleton': 1, 'LionCub-Zombie': 1, 'LionCub-CottonCandyPink': 1, 'LionCub-CottonCandyBlue': 1, 'LionCub-Golden': 1, 'Fox-Base': 1, 'Fox-White': 1, 'Fox-Desert': 1, 'Fox-Red': 1, 'Fox-Shade': 1, 'Fox-Skeleton': 1, 'Fox-Zombie': 1, 'Fox-CottonCandyPink': 1, 'Fox-CottonCandyBlue': 1, 'Fox-Golden': 1, 'FlyingPig-Base': 1, 'FlyingPig-White': 1, 'FlyingPig-Desert': 1, 'FlyingPig-Red': 1, 'FlyingPig-Shade': 1, 'FlyingPig-Skeleton': 1, 'FlyingPig-Zombie': 1, 'FlyingPig-CottonCandyPink': 1, 'FlyingPig-CottonCandyBlue': 1, 'FlyingPig-Golden': 1, 'Dragon-Base': 1, 'Dragon-White': 1, 'Dragon-Desert': 1, 'Dragon-Red': 1, 'Dragon-Shade': 1, 'Dragon-Skeleton': 1, 'Dragon-Zombie': 1, 'Dragon-CottonCandyPink': 1, 'Dragon-CottonCandyBlue': 1, 'Dragon-Golden': 1, 'Cactus-Base': 1, 'Cactus-White': 1, 'Cactus-Desert': 1, 'Cactus-Red': 1, 'Cactus-Shade': 1, 'Cactus-Skeleton': 1, 'Cactus-Zombie': 1, 'Cactus-CottonCandyPink': 1, 'Cactus-CottonCandyBlue': 1, 'Cactus-Golden': 1, 'BearCub-Base': 1, 'BearCub-White': 1, 'BearCub-Desert': 1, 'BearCub-Red': 1, 'BearCub-Shade': 1, 'BearCub-Skeleton': 1, 'BearCub-Zombie': 1, 'BearCub-CottonCandyPink': 1, 'BearCub-CottonCandyBlue': 1, 'BearCub-Golden': 1 }
|
|
|
|
|
expect(shared.countPets(null,user.items.pets)).to.eql 89
|
|
|
|
|
expect(shared.countPets(_.size(user.items.pets), user.items.pets)).to.eql 89
|
|
|
|
|
expect(user.achievements.beastMaster).to.not.be.ok
|
|
|
|
|
expect(user.achievements.beastMaster).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does not get beastMaster with 89 drop pets + 1 gryphon', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.pets = {'Gryphon-Base': 1, 'Wolf-White': 1, 'Wolf-Desert': 1, 'Wolf-Red': 1, 'Wolf-Shade': 1, 'Wolf-Skeleton': 1, 'Wolf-Zombie': 1, 'Wolf-CottonCandyPink': 1, 'Wolf-CottonCandyBlue': 1, 'Wolf-Golden': 1, 'TigerCub-Base': 1, 'TigerCub-White': 1, 'TigerCub-Desert': 1, 'TigerCub-Red': 1, 'TigerCub-Shade': 1, 'TigerCub-Skeleton': 1, 'TigerCub-Zombie': 1, 'TigerCub-CottonCandyPink': 1, 'TigerCub-CottonCandyBlue': 1, 'TigerCub-Golden': 1, 'PandaCub-Base': 1, 'PandaCub-White': 1, 'PandaCub-Desert': 1, 'PandaCub-Red': 1, 'PandaCub-Shade': 1, 'PandaCub-Skeleton': 1, 'PandaCub-Zombie': 1, 'PandaCub-CottonCandyPink': 1, 'PandaCub-CottonCandyBlue': 1, 'PandaCub-Golden': 1, 'LionCub-Base': 1, 'LionCub-White': 1, 'LionCub-Desert': 1, 'LionCub-Red': 1, 'LionCub-Shade': 1, 'LionCub-Skeleton': 1, 'LionCub-Zombie': 1, 'LionCub-CottonCandyPink': 1, 'LionCub-CottonCandyBlue': 1, 'LionCub-Golden': 1, 'Fox-Base': 1, 'Fox-White': 1, 'Fox-Desert': 1, 'Fox-Red': 1, 'Fox-Shade': 1, 'Fox-Skeleton': 1, 'Fox-Zombie': 1, 'Fox-CottonCandyPink': 1, 'Fox-CottonCandyBlue': 1, 'Fox-Golden': 1, 'FlyingPig-Base': 1, 'FlyingPig-White': 1, 'FlyingPig-Desert': 1, 'FlyingPig-Red': 1, 'FlyingPig-Shade': 1, 'FlyingPig-Skeleton': 1, 'FlyingPig-Zombie': 1, 'FlyingPig-CottonCandyPink': 1, 'FlyingPig-CottonCandyBlue': 1, 'FlyingPig-Golden': 1, 'Dragon-Base': 1, 'Dragon-White': 1, 'Dragon-Desert': 1, 'Dragon-Red': 1, 'Dragon-Shade': 1, 'Dragon-Skeleton': 1, 'Dragon-Zombie': 1, 'Dragon-CottonCandyPink': 1, 'Dragon-CottonCandyBlue': 1, 'Dragon-Golden': 1, 'Cactus-Base': 1, 'Cactus-White': 1, 'Cactus-Desert': 1, 'Cactus-Red': 1, 'Cactus-Shade': 1, 'Cactus-Skeleton': 1, 'Cactus-Zombie': 1, 'Cactus-CottonCandyPink': 1, 'Cactus-CottonCandyBlue': 1, 'Cactus-Golden': 1, 'BearCub-Base': 1, 'BearCub-White': 1, 'BearCub-Desert': 1, 'BearCub-Red': 1, 'BearCub-Shade': 1, 'BearCub-Skeleton': 1, 'BearCub-Zombie': 1, 'BearCub-CottonCandyPink': 1, 'BearCub-CottonCandyBlue': 1, 'BearCub-Golden': 1 }
|
|
|
|
|
expect(shared.countPets(null,user.items.pets)).to.eql 89
|
|
|
|
|
expect(shared.countPets(_.size(user.items.pets), user.items.pets)).to.eql 89
|
|
|
|
|
expect(user.achievements.beastMaster).to.not.be.ok
|
|
|
|
|
expect(user.achievements.beastMaster).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does not get beastMaster with 89 pets + 1 hydra', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.pets = {'Dragon-Hydra': 1, 'Wolf-White': 1, 'Wolf-Desert': 1, 'Wolf-Red': 1, 'Wolf-Shade': 1, 'Wolf-Skeleton': 1, 'Wolf-Zombie': 1, 'Wolf-CottonCandyPink': 1, 'Wolf-CottonCandyBlue': 1, 'Wolf-Golden': 1, 'TigerCub-Base': 1, 'TigerCub-White': 1, 'TigerCub-Desert': 1, 'TigerCub-Red': 1, 'TigerCub-Shade': 1, 'TigerCub-Skeleton': 1, 'TigerCub-Zombie': 1, 'TigerCub-CottonCandyPink': 1, 'TigerCub-CottonCandyBlue': 1, 'TigerCub-Golden': 1, 'PandaCub-Base': 1, 'PandaCub-White': 1, 'PandaCub-Desert': 1, 'PandaCub-Red': 1, 'PandaCub-Shade': 1, 'PandaCub-Skeleton': 1, 'PandaCub-Zombie': 1, 'PandaCub-CottonCandyPink': 1, 'PandaCub-CottonCandyBlue': 1, 'PandaCub-Golden': 1, 'LionCub-Base': 1, 'LionCub-White': 1, 'LionCub-Desert': 1, 'LionCub-Red': 1, 'LionCub-Shade': 1, 'LionCub-Skeleton': 1, 'LionCub-Zombie': 1, 'LionCub-CottonCandyPink': 1, 'LionCub-CottonCandyBlue': 1, 'LionCub-Golden': 1, 'Fox-Base': 1, 'Fox-White': 1, 'Fox-Desert': 1, 'Fox-Red': 1, 'Fox-Shade': 1, 'Fox-Skeleton': 1, 'Fox-Zombie': 1, 'Fox-CottonCandyPink': 1, 'Fox-CottonCandyBlue': 1, 'Fox-Golden': 1, 'FlyingPig-Base': 1, 'FlyingPig-White': 1, 'FlyingPig-Desert': 1, 'FlyingPig-Red': 1, 'FlyingPig-Shade': 1, 'FlyingPig-Skeleton': 1, 'FlyingPig-Zombie': 1, 'FlyingPig-CottonCandyPink': 1, 'FlyingPig-CottonCandyBlue': 1, 'FlyingPig-Golden': 1, 'Dragon-Base': 1, 'Dragon-White': 1, 'Dragon-Desert': 1, 'Dragon-Red': 1, 'Dragon-Shade': 1, 'Dragon-Skeleton': 1, 'Dragon-Zombie': 1, 'Dragon-CottonCandyPink': 1, 'Dragon-CottonCandyBlue': 1, 'Dragon-Golden': 1, 'Cactus-Base': 1, 'Cactus-White': 1, 'Cactus-Desert': 1, 'Cactus-Red': 1, 'Cactus-Shade': 1, 'Cactus-Skeleton': 1, 'Cactus-Zombie': 1, 'Cactus-CottonCandyPink': 1, 'Cactus-CottonCandyBlue': 1, 'Cactus-Golden': 1, 'BearCub-Base': 1, 'BearCub-White': 1, 'BearCub-Desert': 1, 'BearCub-Red': 1, 'BearCub-Shade': 1, 'BearCub-Skeleton': 1, 'BearCub-Zombie': 1, 'BearCub-CottonCandyPink': 1, 'BearCub-CottonCandyBlue': 1, 'BearCub-Golden': 1 }
|
|
|
|
|
expect(shared.countPets(null,user.items.pets)).to.eql 89
|
|
|
|
|
expect(shared.countPets(_.size(user.items.pets), user.items.pets)).to.eql 89
|
|
|
|
|
expect(user.achievements.beastMaster).to.not.be.ok
|
|
|
|
|
expect(user.achievements.beastMaster).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does get beastMaster', ->
|
|
|
|
|
xit 'does get beastMaster', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.pets = {'Wolf-Base': 1, 'Wolf-White': 1, 'Wolf-Desert': 1, 'Wolf-Red': 1, 'Wolf-Shade': 1, 'Wolf-Skeleton': 1, 'Wolf-Zombie': 1, 'Wolf-CottonCandyPink': 1, 'Wolf-CottonCandyBlue': 1, 'Wolf-Golden': 1, 'TigerCub-Base': 1, 'TigerCub-White': 1, 'TigerCub-Desert': 1, 'TigerCub-Red': 1, 'TigerCub-Shade': 1, 'TigerCub-Skeleton': 1, 'TigerCub-Zombie': 1, 'TigerCub-CottonCandyPink': 1, 'TigerCub-CottonCandyBlue': 1, 'TigerCub-Golden': 1, 'PandaCub-Base': 1, 'PandaCub-White': 1, 'PandaCub-Desert': 1, 'PandaCub-Red': 1, 'PandaCub-Shade': 1, 'PandaCub-Skeleton': 1, 'PandaCub-Zombie': 1, 'PandaCub-CottonCandyPink': 1, 'PandaCub-CottonCandyBlue': 1, 'PandaCub-Golden': 1, 'LionCub-Base': 1, 'LionCub-White': 1, 'LionCub-Desert': 1, 'LionCub-Red': 1, 'LionCub-Shade': 1, 'LionCub-Skeleton': 1, 'LionCub-Zombie': 1, 'LionCub-CottonCandyPink': 1, 'LionCub-CottonCandyBlue': 1, 'LionCub-Golden': 1, 'Fox-Base': 1, 'Fox-White': 1, 'Fox-Desert': 1, 'Fox-Red': 1, 'Fox-Shade': 1, 'Fox-Skeleton': 1, 'Fox-Zombie': 1, 'Fox-CottonCandyPink': 1, 'Fox-CottonCandyBlue': 1, 'Fox-Golden': 1, 'FlyingPig-Base': 1, 'FlyingPig-White': 1, 'FlyingPig-Desert': 1, 'FlyingPig-Red': 1, 'FlyingPig-Shade': 1, 'FlyingPig-Skeleton': 1, 'FlyingPig-Zombie': 1, 'FlyingPig-CottonCandyPink': 1, 'FlyingPig-CottonCandyBlue': 1, 'FlyingPig-Golden': 1, 'Dragon-Base': 1, 'Dragon-White': 1, 'Dragon-Desert': 1, 'Dragon-Red': 1, 'Dragon-Shade': 1, 'Dragon-Skeleton': 1, 'Dragon-Zombie': 1, 'Dragon-CottonCandyPink': 1, 'Dragon-CottonCandyBlue': 1, 'Dragon-Golden': 1, 'Cactus-Base': 1, 'Cactus-White': 1, 'Cactus-Desert': 1, 'Cactus-Red': 1, 'Cactus-Shade': 1, 'Cactus-Skeleton': 1, 'Cactus-Zombie': 1, 'Cactus-CottonCandyPink': 1, 'Cactus-CottonCandyBlue': 1, 'Cactus-Golden': 1, 'BearCub-Base': 1, 'BearCub-White': 1, 'BearCub-Desert': 1, 'BearCub-Red': 1, 'BearCub-Shade': 1, 'BearCub-Skeleton': 1, 'BearCub-Zombie': 1, 'BearCub-CottonCandyPink': 1, 'BearCub-CottonCandyBlue': 1, 'BearCub-Golden': 1 }
|
|
|
|
|
expect(shared.countPets(null,user.items.pets)).to.eql 90
|
|
|
|
|
expect(shared.countPets(_.size(user.items.pets), user.items.pets)).to.eql 90
|
|
|
|
|
expect(user.achievements.beastMaster).to.be.ok
|
|
|
|
|
expect(user.achievements.beastMaster).to.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does not get mountMaster if user has less than 90 drop mounts', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.mounts = {'Wolf-White': true, 'Wolf-Desert': true, 'Wolf-Red': true, 'Wolf-Shade': true, 'Wolf-Skeleton': true, 'Wolf-Zombie': true, 'Wolf-CottonCandyPink': true, 'Wolf-CottonCandyBlue': true, 'Wolf-Golden': true, 'TigerCub-Base': true, 'TigerCub-White': true, 'TigerCub-Desert': true, 'TigerCub-Red': true, 'TigerCub-Shade': true, 'TigerCub-Skeleton': true, 'TigerCub-Zombie': true, 'TigerCub-CottonCandyPink': true, 'TigerCub-CottonCandyBlue': true, 'TigerCub-Golden': true, 'PandaCub-Base': true, 'PandaCub-White': true, 'PandaCub-Desert': true, 'PandaCub-Red': true, 'PandaCub-Shade': true, 'PandaCub-Skeleton': true, 'PandaCub-Zombie': true, 'PandaCub-CottonCandyPink': true, 'PandaCub-CottonCandyBlue': true, 'PandaCub-Golden': true, 'LionCub-Base': true, 'LionCub-White': true, 'LionCub-Desert': true, 'LionCub-Red': true, 'LionCub-Shade': true, 'LionCub-Skeleton': true, 'LionCub-Zombie': true, 'LionCub-CottonCandyPink': true, 'LionCub-CottonCandyBlue': true, 'LionCub-Golden': true, 'Fox-Base': true, 'Fox-White': true, 'Fox-Desert': true, 'Fox-Red': true, 'Fox-Shade': true, 'Fox-Skeleton': true, 'Fox-Zombie': true, 'Fox-CottonCandyPink': true, 'Fox-CottonCandyBlue': true, 'Fox-Golden': true, 'FlyingPig-Base': true, 'FlyingPig-White': true, 'FlyingPig-Desert': true, 'FlyingPig-Red': true, 'FlyingPig-Shade': true, 'FlyingPig-Skeleton': true, 'FlyingPig-Zombie': true, 'FlyingPig-CottonCandyPink': true, 'FlyingPig-CottonCandyBlue': true, 'FlyingPig-Golden': true, 'Dragon-Base': true, 'Dragon-White': true, 'Dragon-Desert': true, 'Dragon-Red': true, 'Dragon-Shade': true, 'Dragon-Skeleton': true, 'Dragon-Zombie': true, 'Dragon-CottonCandyPink': true, 'Dragon-CottonCandyBlue': true, 'Dragon-Golden': true, 'Cactus-Base': true, 'Cactus-White': true, 'Cactus-Desert': true, 'Cactus-Red': true, 'Cactus-Shade': true, 'Cactus-Skeleton': true, 'Cactus-Zombie': true, 'Cactus-CottonCandyPink': true, 'Cactus-CottonCandyBlue': true, 'Cactus-Golden': true, 'BearCub-Base': true, 'BearCub-White': true, 'BearCub-Desert': true, 'BearCub-Red': true, 'BearCub-Shade': true, 'BearCub-Skeleton': true, 'BearCub-Zombie': true, 'BearCub-CottonCandyPink': true, 'BearCub-CottonCandyBlue': true, 'BearCub-Golden': true }
|
|
|
|
|
expect(shared.countMounts(null,user.items.mounts)).to.eql 89
|
|
|
|
|
expect(shared.countMounts(_.size(user.items.mounts), user.items.mounts)).to.eql 89
|
|
|
|
|
expect(user.achievements.mountMaster).to.not.be.ok
|
|
|
|
|
expect(user.achievements.mountMaster).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does not get mountMaster with 89 drop pets + 1 gryphon', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.mounts = {'Gryphon-Base': true, 'Wolf-White': true, 'Wolf-Desert': true, 'Wolf-Red': true, 'Wolf-Shade': true, 'Wolf-Skeleton': true, 'Wolf-Zombie': true, 'Wolf-CottonCandyPink': true, 'Wolf-CottonCandyBlue': true, 'Wolf-Golden': true, 'TigerCub-Base': true, 'TigerCub-White': true, 'TigerCub-Desert': true, 'TigerCub-Red': true, 'TigerCub-Shade': true, 'TigerCub-Skeleton': true, 'TigerCub-Zombie': true, 'TigerCub-CottonCandyPink': true, 'TigerCub-CottonCandyBlue': true, 'TigerCub-Golden': true, 'PandaCub-Base': true, 'PandaCub-White': true, 'PandaCub-Desert': true, 'PandaCub-Red': true, 'PandaCub-Shade': true, 'PandaCub-Skeleton': true, 'PandaCub-Zombie': true, 'PandaCub-CottonCandyPink': true, 'PandaCub-CottonCandyBlue': true, 'PandaCub-Golden': true, 'LionCub-Base': true, 'LionCub-White': true, 'LionCub-Desert': true, 'LionCub-Red': true, 'LionCub-Shade': true, 'LionCub-Skeleton': true, 'LionCub-Zombie': true, 'LionCub-CottonCandyPink': true, 'LionCub-CottonCandyBlue': true, 'LionCub-Golden': true, 'Fox-Base': true, 'Fox-White': true, 'Fox-Desert': true, 'Fox-Red': true, 'Fox-Shade': true, 'Fox-Skeleton': true, 'Fox-Zombie': true, 'Fox-CottonCandyPink': true, 'Fox-CottonCandyBlue': true, 'Fox-Golden': true, 'FlyingPig-Base': true, 'FlyingPig-White': true, 'FlyingPig-Desert': true, 'FlyingPig-Red': true, 'FlyingPig-Shade': true, 'FlyingPig-Skeleton': true, 'FlyingPig-Zombie': true, 'FlyingPig-CottonCandyPink': true, 'FlyingPig-CottonCandyBlue': true, 'FlyingPig-Golden': true, 'Dragon-Base': true, 'Dragon-White': true, 'Dragon-Desert': true, 'Dragon-Red': true, 'Dragon-Shade': true, 'Dragon-Skeleton': true, 'Dragon-Zombie': true, 'Dragon-CottonCandyPink': true, 'Dragon-CottonCandyBlue': true, 'Dragon-Golden': true, 'Cactus-Base': true, 'Cactus-White': true, 'Cactus-Desert': true, 'Cactus-Red': true, 'Cactus-Shade': true, 'Cactus-Skeleton': true, 'Cactus-Zombie': true, 'Cactus-CottonCandyPink': true, 'Cactus-CottonCandyBlue': true, 'Cactus-Golden': true, 'BearCub-Base': true, 'BearCub-White': true, 'BearCub-Desert': true, 'BearCub-Red': true, 'BearCub-Shade': true, 'BearCub-Skeleton': true, 'BearCub-Zombie': true, 'BearCub-CottonCandyPink': true, 'BearCub-CottonCandyBlue': true, 'BearCub-Golden': true }
|
|
|
|
|
expect(shared.countMounts(null,user.items.mounts)).to.eql 89
|
|
|
|
|
expect(shared.countMounts(_.size(user.items.mounts), user.items.mounts)).to.eql 89
|
|
|
|
|
expect(user.achievements.mountMaster).to.not.be.ok
|
|
|
|
|
expect(user.achievements.mountMaster).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does not get mountMaster with 89 drop pets + 1 mantis shrimp', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.mounts = {'MantisShrimp-Base': true, 'Wolf-White': true, 'Wolf-Desert': true, 'Wolf-Red': true, 'Wolf-Shade': true, 'Wolf-Skeleton': true, 'Wolf-Zombie': true, 'Wolf-CottonCandyPink': true, 'Wolf-CottonCandyBlue': true, 'Wolf-Golden': true, 'TigerCub-Base': true, 'TigerCub-White': true, 'TigerCub-Desert': true, 'TigerCub-Red': true, 'TigerCub-Shade': true, 'TigerCub-Skeleton': true, 'TigerCub-Zombie': true, 'TigerCub-CottonCandyPink': true, 'TigerCub-CottonCandyBlue': true, 'TigerCub-Golden': true, 'PandaCub-Base': true, 'PandaCub-White': true, 'PandaCub-Desert': true, 'PandaCub-Red': true, 'PandaCub-Shade': true, 'PandaCub-Skeleton': true, 'PandaCub-Zombie': true, 'PandaCub-CottonCandyPink': true, 'PandaCub-CottonCandyBlue': true, 'PandaCub-Golden': true, 'LionCub-Base': true, 'LionCub-White': true, 'LionCub-Desert': true, 'LionCub-Red': true, 'LionCub-Shade': true, 'LionCub-Skeleton': true, 'LionCub-Zombie': true, 'LionCub-CottonCandyPink': true, 'LionCub-CottonCandyBlue': true, 'LionCub-Golden': true, 'Fox-Base': true, 'Fox-White': true, 'Fox-Desert': true, 'Fox-Red': true, 'Fox-Shade': true, 'Fox-Skeleton': true, 'Fox-Zombie': true, 'Fox-CottonCandyPink': true, 'Fox-CottonCandyBlue': true, 'Fox-Golden': true, 'FlyingPig-Base': true, 'FlyingPig-White': true, 'FlyingPig-Desert': true, 'FlyingPig-Red': true, 'FlyingPig-Shade': true, 'FlyingPig-Skeleton': true, 'FlyingPig-Zombie': true, 'FlyingPig-CottonCandyPink': true, 'FlyingPig-CottonCandyBlue': true, 'FlyingPig-Golden': true, 'Dragon-Base': true, 'Dragon-White': true, 'Dragon-Desert': true, 'Dragon-Red': true, 'Dragon-Shade': true, 'Dragon-Skeleton': true, 'Dragon-Zombie': true, 'Dragon-CottonCandyPink': true, 'Dragon-CottonCandyBlue': true, 'Dragon-Golden': true, 'Cactus-Base': true, 'Cactus-White': true, 'Cactus-Desert': true, 'Cactus-Red': true, 'Cactus-Shade': true, 'Cactus-Skeleton': true, 'Cactus-Zombie': true, 'Cactus-CottonCandyPink': true, 'Cactus-CottonCandyBlue': true, 'Cactus-Golden': true, 'BearCub-Base': true, 'BearCub-White': true, 'BearCub-Desert': true, 'BearCub-Red': true, 'BearCub-Shade': true, 'BearCub-Skeleton': true, 'BearCub-Zombie': true, 'BearCub-CottonCandyPink': true, 'BearCub-CottonCandyBlue': true, 'BearCub-Golden': true }
|
|
|
|
|
expect(shared.countMounts(null,user.items.mounts)).to.eql 89
|
|
|
|
|
expect(shared.countMounts(_.size(user.items.mounts), user.items.mounts)).to.eql 89
|
|
|
|
|
expect(user.achievements.mountMaster).to.not.be.ok
|
|
|
|
|
expect(user.achievements.mountMaster).to.not.be.ok()
|
|
|
|
|
|
|
|
|
|
it 'does get mountMaster', ->
|
|
|
|
|
xit 'does get mountMaster', ->
|
|
|
|
|
user = newUser()
|
|
|
|
|
user.items.mounts = {'Wolf-Base': true, 'Wolf-White': true, 'Wolf-Desert': true, 'Wolf-Red': true, 'Wolf-Shade': true, 'Wolf-Skeleton': true, 'Wolf-Zombie': true, 'Wolf-CottonCandyPink': true, 'Wolf-CottonCandyBlue': true, 'Wolf-Golden': true, 'TigerCub-Base': true, 'TigerCub-White': true, 'TigerCub-Desert': true, 'TigerCub-Red': true, 'TigerCub-Shade': true, 'TigerCub-Skeleton': true, 'TigerCub-Zombie': true, 'TigerCub-CottonCandyPink': true, 'TigerCub-CottonCandyBlue': true, 'TigerCub-Golden': true, 'PandaCub-Base': true, 'PandaCub-White': true, 'PandaCub-Desert': true, 'PandaCub-Red': true, 'PandaCub-Shade': true, 'PandaCub-Skeleton': true, 'PandaCub-Zombie': true, 'PandaCub-CottonCandyPink': true, 'PandaCub-CottonCandyBlue': true, 'PandaCub-Golden': true, 'LionCub-Base': true, 'LionCub-White': true, 'LionCub-Desert': true, 'LionCub-Red': true, 'LionCub-Shade': true, 'LionCub-Skeleton': true, 'LionCub-Zombie': true, 'LionCub-CottonCandyPink': true, 'LionCub-CottonCandyBlue': true, 'LionCub-Golden': true, 'Fox-Base': true, 'Fox-White': true, 'Fox-Desert': true, 'Fox-Red': true, 'Fox-Shade': true, 'Fox-Skeleton': true, 'Fox-Zombie': true, 'Fox-CottonCandyPink': true, 'Fox-CottonCandyBlue': true, 'Fox-Golden': true, 'FlyingPig-Base': true, 'FlyingPig-White': true, 'FlyingPig-Desert': true, 'FlyingPig-Red': true, 'FlyingPig-Shade': true, 'FlyingPig-Skeleton': true, 'FlyingPig-Zombie': true, 'FlyingPig-CottonCandyPink': true, 'FlyingPig-CottonCandyBlue': true, 'FlyingPig-Golden': true, 'Dragon-Base': true, 'Dragon-White': true, 'Dragon-Desert': true, 'Dragon-Red': true, 'Dragon-Shade': true, 'Dragon-Skeleton': true, 'Dragon-Zombie': true, 'Dragon-CottonCandyPink': true, 'Dragon-CottonCandyBlue': true, 'Dragon-Golden': true, 'Cactus-Base': true, 'Cactus-White': true, 'Cactus-Desert': true, 'Cactus-Red': true, 'Cactus-Shade': true, 'Cactus-Skeleton': true, 'Cactus-Zombie': true, 'Cactus-CottonCandyPink': true, 'Cactus-CottonCandyBlue': true, 'Cactus-Golden': true, 'BearCub-Base': true, 'BearCub-White': true, 'BearCub-Desert': true, 'BearCub-Red': true, 'BearCub-Shade': true, 'BearCub-Skeleton': true, 'BearCub-Zombie': true, 'BearCub-CottonCandyPink': true, 'BearCub-CottonCandyBlue': true, 'BearCub-Golden': true }
|
|
|
|
|
expect(shared.countMounts(null,user.items.mounts)).to.eql 90
|
|
|
|
|
expect(shared.countMounts(_.size(user.items.mounts), user.items.mounts)).to.eql 90
|
|
|
|
|
expect(user.achievements.mountMaster).to.be.ok
|
|
|
|
|
expect(user.achievements.mountMaster).to.be.ok()
|
|
|
|
|
|
|
|
|
|
describe 'Simple Scoring', ->
|
|
|
|
|
beforeEach ->
|
|
|
|
|
|