mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
free orb of rebirth for level 100(+) users
Orb of Rebirth now only spits out "not enough gems" if user is under level 100 and has less than 8 gems. It also only charges if the user is below level 100.
This commit is contained in:
parent
e09e9d1c23
commit
1db3b7cf98
1 changed files with 4 additions and 2 deletions
|
|
@ -429,9 +429,11 @@ api.wrap = (user, main=true) ->
|
|||
|
||||
rebirth: (req, cb, ga) ->
|
||||
# Cost is 8 Gems ($2)
|
||||
if user.balance < 2
|
||||
if (user.balance < 2 && user.stats.lvl < 100)
|
||||
return cb? {code:401,message: "Not enough gems."}
|
||||
user.balance -= 2
|
||||
# only charge people if they are under level 100 - ryan
|
||||
if user.stats.lvl < 100
|
||||
user.balance -= 2
|
||||
# Save off user's level, for calculating achievement eligibility later
|
||||
lvl = user.stats.lvl
|
||||
# Turn tasks yellow, zero out streaks
|
||||
|
|
|
|||
Loading…
Reference in a new issue