revert to using egg.name
This commit is contained in:
+2
-2
@@ -143,8 +143,8 @@ randomDrop = (user, delta, priority, streak = 0, options={}) ->
|
||||
# Eggs: 30% chance
|
||||
if rarity > .5
|
||||
drop = helpers.randomVal eggs
|
||||
user.items.eggs[drop.text] ?= 0
|
||||
user.items.eggs[drop.text]++
|
||||
user.items.eggs[drop.name] ?= 0
|
||||
user.items.eggs[drop.name]++
|
||||
drop.type = 'Egg'
|
||||
drop.dialog = "You've found a #{drop.text} Egg! #{drop.notes}"
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ describe 'User', ->
|
||||
it 'gets a bear cub egg', ->
|
||||
sinon.stub(Math, 'random', cycle [0, 0.55])
|
||||
algos.score(user, user.dailys[0], 'up')
|
||||
expect(user.items.eggs).to.eql {'Bear Cub': 1}
|
||||
expect(user.items.eggs).to.eql {'BearCub': 1}
|
||||
expect(user.items.hatchingPotions).to.eql {}
|
||||
|
||||
it 'does not get a drop', ->
|
||||
|
||||
Reference in New Issue
Block a user