mounts: remove food temporarily. merging to master so we can run schema

migration and start with item translations. This commit will be reverted
when mounts is fully merged
This commit is contained in:
Tyler Renelle
2013-11-14 12:40:08 -08:00
parent a52eaee62f
commit bf8c0dd9dc
2 changed files with 20 additions and 28 deletions
+12 -12
View File
@@ -119,7 +119,7 @@ randomDrop = (user, delta, priority, streak = 0, options={}) ->
date: +moment().subtract('d', 1) # trick - set it to yesterday on first run, that way they can get drops today
count: 0
reachedDropLimit = (helpers.daysSince(user.items.lastDrop.date, user.preferences) is 0) and (user.items.lastDrop.count >= 5)
reachedDropLimit = (helpers.daysSince(user.items.lastDrop.date, user.preferences) is 0) and (user.items.lastDrop.count >= 2)
return if reachedDropLimit
# % chance of getting a pet or meat
@@ -132,16 +132,16 @@ randomDrop = (user, delta, priority, streak = 0, options={}) ->
# If they got a drop: 50% chance of egg, 50% Hatching Potion. If hatchingPotion, broken down further even further
rarity = Math.random()
# Food: 40% chance
if rarity > .6
drop = helpers.randomVal _.omit(items.items.food, 'Saddle')
user.items.food[drop.name] ?= 0
user.items.food[drop.name]+= 1
drop.type = 'Food'
drop.dialog = "You've found a #{drop.text} Food! #{drop.notes}"
# # Food: 40% chance
# if rarity > .6
# drop = helpers.randomVal _.omit(items.items.food, 'Saddle')
# user.items.food[drop.name] ?= 0
# user.items.food[drop.name]+= 1
# drop.type = 'Food'
# drop.dialog = "You've found a #{drop.text} Food! #{drop.notes}"
# Eggs: 30% chance
else if rarity > .3
if rarity > .5
drop = helpers.randomVal eggs
user.items.eggs[drop.name] ?= 0
user.items.eggs[drop.name]++
@@ -152,11 +152,11 @@ randomDrop = (user, delta, priority, streak = 0, options={}) ->
else
acceptableDrops =
# Very Rare: 10% (of 30%)
if rarity < .03 then ['Golden']
if rarity < .05 then ['Golden']
# Rare: 20% (of 30%)
else if rarity < .06 then ['Zombie', 'CottonCandyPink', 'CottonCandyBlue']
else if rarity < .1 then ['Zombie', 'CottonCandyPink', 'CottonCandyBlue']
# Uncommon: 30% (of 30%)
else if rarity < .09 then ['Red', 'Shade', 'Skeleton']
else if rarity < .15 then ['Red', 'Shade', 'Skeleton']
# Common: 40% (of 30%)
else ['Base', 'White', 'Desert']