mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-02 07:49:39 +00:00
Merge branch 'develop' into api-v3
This commit is contained in:
commit
c02082a200
3 changed files with 14 additions and 7 deletions
|
|
@ -342,7 +342,7 @@
|
|||
"questMonkeyUnlockText": "Unlocks purchasable Monkey eggs in the Market",
|
||||
|
||||
"questSnailText": "The Snail of Drudgery Sludge",
|
||||
"questSnailNotes": "You're excited to begin questing in the abandoned Dungeons of Drudgery, but as soon as you enter, you feel the ground under your feet start to suck at your boots. You look up to the path ahead and see Habiticans mired in slime. @Overomega yells, \"They have too many unimportant tasks and dailies, and they're getting stuck on things that don't matter! Pull them out!\"<br><br>\"You need to find the source of the ooze,\" @Pffernusse agrees, \"or the tasks that they cannot accomplish will drag them down forever!\"<br><br>Pulling out your weapon, you wade through the gooey mud.... and encounter the fearsome Snail of Drudgery Sludge.",
|
||||
"questSnailNotes": "You're excited to begin questing in the abandoned Dungeons of Drudgery, but as soon as you enter, you feel the ground under your feet start to suck at your boots. You look up to the path ahead and see Habiticans mired in slime. @Overomega yells, \"They have too many unimportant tasks and dailies, and they're getting stuck on things that don't matter! Pull them out!\"<br><br>\"You need to find the source of the ooze,\" @Pfeffernusse agrees, \"or the tasks that they cannot accomplish will drag them down forever!\"<br><br>Pulling out your weapon, you wade through the gooey mud.... and encounter the fearsome Snail of Drudgery Sludge.",
|
||||
"questSnailCompletion": "You bring your weapon down on the great Snail's shell, cracking it in two, releasing a flood of water. The slime is washed away, and the Habiticans around you rejoice. \"Look!\" says @Misceo. \"There's a small group of snail eggs in the remnants of the muck.\"",
|
||||
"questSnailBoss": "Snail of Drudgery Sludge",
|
||||
"questSnailDropSnailEgg": "Snail (Egg)",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@ import i18n from '../i18n';
|
|||
import { daysSince } from '../cron';
|
||||
import { diminishingReturns } from '../statHelpers';
|
||||
|
||||
// Clone a drop object maintaining its functions so that we can change it without affecting the original item
|
||||
function cloneDropItem (drop) {
|
||||
return _.cloneDeep(drop, function (val) {
|
||||
return _.isFunction(val) ? val : undefined; // undefined will be handled by lodash
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = function(user, modifiers, req) {
|
||||
var acceptableDrops, base, base1, base2, chance, drop, dropK, dropMultiplier, name, name1, name2, quest, rarity, ref, ref1, ref2, ref3, task;
|
||||
task = modifiers.task;
|
||||
|
|
@ -29,9 +36,9 @@ module.exports = function(user, modifiers, req) {
|
|||
if (((ref3 = user.flags) != null ? ref3.dropsEnabled : void 0) && user.fns.predictableRandom(user.stats.exp) < chance) {
|
||||
rarity = user.fns.predictableRandom(user.stats.gp);
|
||||
if (rarity > .6) {
|
||||
drop = user.fns.randomVal(_.where(content.food, {
|
||||
drop = cloneDropItem(user.fns.randomVal(_.where(content.food, {
|
||||
canDrop: true
|
||||
}));
|
||||
})));
|
||||
if ((base = user.items.food)[name = drop.key] == null) {
|
||||
base[name] = 0;
|
||||
}
|
||||
|
|
@ -43,7 +50,7 @@ module.exports = function(user, modifiers, req) {
|
|||
dropNotes: drop.notes(req.language)
|
||||
}, req.language);
|
||||
} else if (rarity > .3) {
|
||||
drop = user.fns.randomVal(content.dropEggs);
|
||||
drop = cloneDropItem(user.fns.randomVal(content.dropEggs));
|
||||
if ((base1 = user.items.eggs)[name1 = drop.key] == null) {
|
||||
base1[name1] = 0;
|
||||
}
|
||||
|
|
@ -55,9 +62,9 @@ module.exports = function(user, modifiers, req) {
|
|||
}, req.language);
|
||||
} else {
|
||||
acceptableDrops = rarity < .02 ? ['Golden'] : rarity < .09 ? ['Zombie', 'CottonCandyPink', 'CottonCandyBlue'] : rarity < .18 ? ['Red', 'Shade', 'Skeleton'] : ['Base', 'White', 'Desert'];
|
||||
drop = user.fns.randomVal(_.pick(content.hatchingPotions, (function(v, k) {
|
||||
drop = cloneDropItem(user.fns.randomVal(_.pick(content.hatchingPotions, (function(v, k) {
|
||||
return acceptableDrops.indexOf(k) >= 0;
|
||||
})));
|
||||
}))));
|
||||
if ((base2 = user.items.hatchingPotions)[name2 = drop.key] == null) {
|
||||
base2[name2] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ h2 3/9/2016 - SNAIL PET QUEST AND MOBILE CHALLENGE WINNERS. PLUS, SPRING PLOT-LI
|
|||
h3 Snail Pet Quest
|
||||
p We've released a new Pet Quest: <a href='/#/options/inventory/quests'>The Snail of Drudgery Sludge</a>! Habiticans everywhere are bogged down by unimportant tasks. Can you wash away the slime? If so, you'll earn some Snail Eggs!
|
||||
p.small.muted by Lemoness and SabreCat
|
||||
p.small.muted Art by Overomega, Pffernusse, and Misceo
|
||||
p.small.muted Art by Overomega, Pfeffernusse, and Misceo
|
||||
p.small.muted Writing by Maz Wendling
|
||||
tr
|
||||
td
|
||||
|
|
|
|||
Loading…
Reference in a new issue