mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-16 08:52:17 +00:00
revert to using egg.name
This commit is contained in:
parent
2879b050a0
commit
80afa45b2b
2 changed files with 3 additions and 3 deletions
|
|
@ -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', ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue