mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 20:12:19 +00:00
Merge branch 'master' of github.com:HabitRPG/habitrpg-shared
This commit is contained in:
commit
9e7a02ef78
3 changed files with 292 additions and 8242 deletions
File diff suppressed because one or more lines are too long
8118
browser/browser.js
8118
browser/browser.js
File diff suppressed because it is too large
Load diff
|
|
@ -112,14 +112,14 @@ 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
|
# If they got a drop: 50% chance of egg, 50% Hatching Potion. If hatchingPotion, broken down further even further
|
||||||
rarity = Math.random()
|
rarity = Math.random()
|
||||||
|
|
||||||
# Egg, 40% chance
|
# Egg, 50% chance
|
||||||
if rarity > .6
|
if rarity > .5
|
||||||
drop = helpers.randomVal(pets)
|
drop = helpers.randomVal(pets)
|
||||||
(user.items.eggs ?= []).push drop; paths['items.eggs'] = true
|
(user.items.eggs ?= []).push drop; paths['items.eggs'] = true
|
||||||
drop.type = 'Egg'
|
drop.type = 'Egg'
|
||||||
drop.dialog = "You've found a #{drop.text} Egg! #{drop.notes}"
|
drop.dialog = "You've found a #{drop.text} Egg! #{drop.notes}"
|
||||||
|
|
||||||
# Hatching Potion, 60% chance - break down by rarity even more. FIXME this may not be the best method, so revisit
|
# Hatching Potion, 50% chance - break down by rarity even more. FIXME this may not be the best method, so revisit
|
||||||
else
|
else
|
||||||
acceptableDrops = []
|
acceptableDrops = []
|
||||||
|
|
||||||
|
|
@ -137,13 +137,15 @@ randomDrop = (user, delta, priority, streak = 0, options={}) ->
|
||||||
# Tier 3 (Rare)
|
# Tier 3 (Rare)
|
||||||
else if rarity < .3
|
else if rarity < .3
|
||||||
acceptableDrops = ['Base', 'White', 'Desert', 'Red', 'Shade', 'Skeleton']
|
acceptableDrops = ['Base', 'White', 'Desert', 'Red', 'Shade', 'Skeleton']
|
||||||
|
|
||||||
|
# Commented out for testing with increased egg drop, delete if successful
|
||||||
# Tier 2 (Scarce)
|
# Tier 2 (Scarce)
|
||||||
else if rarity < .4
|
# else if rarity < .4
|
||||||
acceptableDrops = ['Base', 'White', 'Desert']
|
# acceptableDrops = ['Base', 'White', 'Desert']
|
||||||
|
|
||||||
# Tier 1 (Common)
|
# Tier 1 (Common)
|
||||||
else
|
else
|
||||||
acceptableDrops = ['Base']
|
acceptableDrops = ['Base', 'White', 'Desert']
|
||||||
|
|
||||||
acceptableDrops = hatchingPotions.filter (hatchingPotion) ->
|
acceptableDrops = hatchingPotions.filter (hatchingPotion) ->
|
||||||
hatchingPotion.name in acceptableDrops
|
hatchingPotion.name in acceptableDrops
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue