diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index c6813c3569..14127db8a2 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -10606,6 +10606,77 @@ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? }); }); + api.dropEggs = { + Wolf: { + text: 'Wolf', + adjective: 'loyal' + }, + TigerCub: { + text: 'Tiger Cub', + mountText: 'Tiger', + adjective: 'fierce' + }, + PandaCub: { + text: 'Panda Cub', + mountText: 'Panda', + adjective: 'gentle' + }, + LionCub: { + text: 'Lion Cub', + mountText: 'Lion', + adjective: 'regal' + }, + Fox: { + text: 'Fox', + adjective: 'wily' + }, + FlyingPig: { + text: 'Flying Pig', + adjective: 'whimsical' + }, + Dragon: { + text: 'Dragon', + adjective: 'mighty' + }, + Cactus: { + text: 'Cactus', + adjective: 'prickly' + }, + BearCub: { + text: 'Bear Cub', + mountText: 'Bear', + adjective: 'cuddly' + } + }; + + _.each(api.dropEggs, function(egg, key) { + return _.defaults(egg, { + canBuy: true, + value: 3, + key: key, + notes: "Find a hatching potion to pour on this egg, and it will hatch into a " + egg.adjective + " " + egg.text + ".", + mountText: egg.text + }); + }); + + api.questEggs = { + Gryphon: { + text: 'Gryphon', + adjective: 'regal', + canBuy: false + } + }; + + _.each(api.questEggs, function(egg, key) { + return _.defaults(egg, { + canBuy: false, + value: 3, + key: key, + notes: "Find a hatching potion to pour on this egg, and it will hatch into a " + egg.adjective + " " + egg.text + ".", + mountText: egg.text + }); + }); + api.specialPets = { 'Wolf-Veteran': true, 'Wolf-Cerberus': true, @@ -10614,6 +10685,11 @@ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? 'BearCub-Polar': true }; + api.specialMounts = { + 'BearCub-Polar': true, + 'LionCub-Ethereal': true + }; + api.hatchingPotions = { Base: { value: 2, @@ -10665,7 +10741,13 @@ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? }); }); - api.pets = _.transform(api.eggs, function(m, egg) { + api.pets = _.transform(api.dropEggs, function(m, egg) { + return _.defaults(m, _.transform(api.hatchingPotions, function(m2, pot) { + return m2[egg.key + "-" + pot.key] = true; + })); + }); + + api.questPets = _.transform(api.questEggs, function(m, egg) { return _.defaults(m, _.transform(api.hatchingPotions, function(m2, pot) { return m2[egg.key + "-" + pot.key] = true; })); @@ -11601,6 +11683,11 @@ var process=require("__browserify_process");(function() { var count, pet; count = originalCount != null ? originalCount : _.size(pets); + for (pet in content.questPets) { + if (pets[pet]) { + count--; + } + } for (pet in content.specialPets) { if (pets[pet]) { count--; @@ -11609,6 +11696,18 @@ var process=require("__browserify_process");(function() { return count; }; + api.countMounts = function(originalCount, mounts) { + var count, mount; + + count = originalCount != null ? originalCount : _.size(mounts); + for (mount in content.specialMounts) { + if (mounts[mount]) { + count--; + } + } + return count; + }; + /* ------------------------------------------------------ User (prototype wrapper to give it ops, helper funcs, and virtuals diff --git a/locales/en/pets.json b/locales/en/pets.json index e2de37d9ed..2ad4afc86c 100644 --- a/locales/en/pets.json +++ b/locales/en/pets.json @@ -4,8 +4,11 @@ "pets" : "Pets", "petsFound":"Pets Found", "rarePets": "Rare Pets", + "questPets": "Quest Pets", + "beastmasterProgress": "Beastmaster Progress", "mounts" : "Mounts", "mountsTamed" : "Mounts Tamed", + "questMounts" : "Quest Mounts", "rareMounts" : "Rare Mounts", "etherealLion" : "Ethereal Lion", "petsFound" : "Pets Found", diff --git a/script/content.coffee b/script/content.coffee index 2b30d70e40..ee02a58c67 100644 --- a/script/content.coffee +++ b/script/content.coffee @@ -506,6 +506,36 @@ _.each api.eggs, (egg,key) -> notes: "Find a hatching potion to pour on this egg, and it will hatch into a #{egg.adjective} #{egg.text}." mountText: egg.text +api.dropEggs = + # value & other defaults set below + Wolf: text: 'Wolf', adjective: 'loyal' + TigerCub: text: 'Tiger Cub', mountText: 'Tiger', adjective: 'fierce' + PandaCub: text: 'Panda Cub', mountText: 'Panda', adjective: 'gentle' + LionCub: text: 'Lion Cub', mountText: 'Lion', adjective: 'regal' + Fox: text: 'Fox', adjective: 'wily' + FlyingPig: text: 'Flying Pig', adjective: 'whimsical' + Dragon: text: 'Dragon', adjective: 'mighty' + Cactus: text: 'Cactus', adjective: 'prickly' + BearCub: text: 'Bear Cub', mountText: 'Bear', adjective: 'cuddly' +_.each api.dropEggs, (egg,key) -> + _.defaults egg, + canBuy:true + value: 3 + key: key + notes: "Find a hatching potion to pour on this egg, and it will hatch into a #{egg.adjective} #{egg.text}." + mountText: egg.text + +api.questEggs = + # value & other defaults set below + Gryphon: text: 'Gryphon', adjective: 'regal', canBuy: false +_.each api.questEggs, (egg,key) -> + _.defaults egg, + canBuy:false + value: 3 + key: key + notes: "Find a hatching potion to pour on this egg, and it will hatch into a #{egg.adjective} #{egg.text}." + mountText: egg.text + api.specialPets = 'Wolf-Veteran': true 'Wolf-Cerberus': true @@ -513,6 +543,10 @@ api.specialPets = 'Turkey-Base': true 'BearCub-Polar': true +api.specialMounts = + 'BearCub-Polar': true + 'LionCub-Ethereal': true + api.hatchingPotions = Base: value: 2, text: 'Base' White: value: 2, text: 'White' @@ -527,7 +561,11 @@ api.hatchingPotions = _.each api.hatchingPotions, (pot,key) -> _.defaults pot, {key, value: 2, notes: "Pour this on an egg, and it will hatch as a #{pot.text} pet."} -api.pets = _.transform api.eggs, (m, egg) -> +api.pets = _.transform api.dropEggs, (m, egg) -> + _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> + m2[egg.key + "-" + pot.key] = true + +api.questPets = _.transform api.questEggs, (m, egg) -> _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> m2[egg.key + "-" + pot.key] = true diff --git a/script/index.coffee b/script/index.coffee index 44636c1be5..1b5b8e7c01 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -301,10 +301,18 @@ api.appliedTags = (userTags, taskTags) -> api.countPets = (originalCount, pets) -> count = if originalCount? then originalCount else _.size(pets) + for pet of content.questPets + count-- if pets[pet] for pet of content.specialPets count-- if pets[pet] count +api.countMounts= (originalCount, mounts) -> + count = if originalCount? then originalCount else _.size(mounts) + for mount of content.specialMounts + count-- if mounts[mount] + count + ### ------------------------------------------------------ User (prototype wrapper to give it ops, helper funcs, and virtuals @@ -1177,8 +1185,8 @@ api.wrap = (user, main=true) -> {id, type, completed, repeat} = task return if (type is 'daily') && !completed && user.stats.buffs.stealth && user.stats.buffs.stealth-- # User "evades" a certain number of uncompleted dailies - - + + # Deduct experience for missed Daily tasks, but not for Todos (just increase todo's value) unless completed scheduleMisses = daysMissed