From f80cff8916d3b8f67a413c9d1c8c29a305d0b0f0 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Mon, 10 Mar 2014 19:36:32 +0100 Subject: [PATCH] refactor(i18n): refactor & fix --- dist/habitrpg-shared.js | 1401 ++++++++++++--------------------- locales/en/content.json | 4 +- locales/en/questsContent.json | 5 + script/content.coffee | 445 +++++------ 4 files changed, 721 insertions(+), 1134 deletions(-) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 9cdb809ffe..9db2f2829b 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -9169,7 +9169,7 @@ process.chdir = function (dir) { }).call(this); },{}],5:[function(require,module,exports){ -var api, classes, diminishingReturns, events, gear, gearTypes, i18n, moment, mystery, repeat, _; +var api, classes, diminishingReturns, events, gear, gearTypes, i18n, moment, mystery, repeat, t, _; _ = require('lodash'); @@ -9179,6 +9179,15 @@ moment = require('moment'); i18n = require('./i18n.coffee'); +t = function(string, vars) { + return function(lang) { + if (vars == null) { + vars = lang; + } + return i18n.t(string, vars, lang); + }; +}; + /* --------------------------------------------------------------- @@ -9229,93 +9238,61 @@ gear = { weapon: { base: { 0: { - text: (function() { - return i18n.t('weaponBase0Text'); - }), - notes: (function() { - return i18n.t('weaponBase0Notes'); - }), + text: t('weaponBase0Text'), + notes: t('weaponBase0Notes'), value: 0 } }, warrior: { 0: { - text: (function() { - return i18n.t('weaponWarrior0Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior0Notes'); - }), + text: t('weaponWarrior0Text'), + notes: t('weaponWarrior0Notes'), value: 0 }, 1: { - text: (function() { - return i18n.t('weaponWarrior1Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior1Notes', { - str: 3 - }); + text: t('weaponWarrior1Text'), + notes: t('weaponWarrior1Notes', { + str: 3 }), str: 3, value: 20 }, 2: { - text: (function() { - return i18n.t('weaponWarrior2Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior2Notes', { - str: 6 - }); + text: t('weaponWarrior2Text'), + notes: t('weaponWarrior2Notes', { + str: 6 }), str: 6, value: 30 }, 3: { - text: (function() { - return i18n.t('weaponWarrior3Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior3Notes', { - str: 9 - }); + text: t('weaponWarrior3Text'), + notes: t('weaponWarrior3Notes', { + str: 9 }), str: 9, value: 45 }, 4: { - text: (function() { - return i18n.t('weaponWarrior4Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior4Notes', { - str: 12 - }); + text: t('weaponWarrior4Text'), + notes: t('weaponWarrior4Notes', { + str: 12 }), str: 12, value: 65 }, 5: { - text: (function() { - return i18n.t('weaponWarrior5Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior5Notes', { - str: 15 - }); + text: t('weaponWarrior5Text'), + notes: t('weaponWarrior5Notes', { + str: 15 }), str: 15, value: 90 }, 6: { - text: (function() { - return i18n.t('weaponWarrior6Text'); - }), - notes: (function() { - return i18n.t('weaponWarrior6Notes', { - str: 18 - }); + text: t('weaponWarrior6Text'), + notes: t('weaponWarrior6Notes', { + str: 18 }), str: 18, value: 120, @@ -9324,83 +9301,55 @@ gear = { }, rogue: { 0: { - text: (function() { - return i18n.t('weaponRogue0Text'); - }), - notes: (function() { - return i18n.t('weaponRogue0Notes'); - }), + text: t('weaponRogue0Text'), + notes: t('weaponRogue0Notes'), str: 0, value: 0 }, 1: { - text: (function() { - return i18n.t('weaponRogue1Text'); - }), - notes: (function() { - return i18n.t('weaponRogue1Notes', { - str: 2 - }); + text: t('weaponRogue1Text'), + notes: t('weaponRogue1Notes', { + str: 2 }), str: 2, value: 20 }, 2: { - text: (function() { - return i18n.t('weaponRogue2Text'); - }), - notes: (function() { - return i18n.t('weaponRogue2Notes', { - str: 3 - }); + text: t('weaponRogue2Text'), + notes: t('weaponRogue2Notes', { + str: 3 }), str: 3, value: 35 }, 3: { - text: (function() { - return i18n.t('weaponRogue3Text'); - }), - notes: (function() { - return i18n.t('weaponRogue3Notes', { - str: 4 - }); + text: t('weaponRogue3Text'), + notes: t('weaponRogue3Notes', { + str: 4 }), str: 4, value: 50 }, 4: { - text: (function() { - return i18n.t('weaponRogue4Text'); - }), - notes: (function() { - return i18n.t('weaponRogue4Notes', { - str: 6 - }); + text: t('weaponRogue4Text'), + notes: t('weaponRogue4Notes', { + str: 6 }), str: 6, value: 70 }, 5: { - text: (function() { - return i18n.t('weaponRogue5Text'); - }), - notes: (function() { - return i18n.t('weaponRogue5Notes', { - str: 8 - }); + text: t('weaponRogue5Text'), + notes: t('weaponRogue5Notes', { + str: 8 }), str: 8, value: 90 }, 6: { - text: (function() { - return i18n.t('weaponRogue6Text'); - }), - notes: (function() { - return i18n.t('weaponRogue6Notes', { - str: 10 - }); + text: t('weaponRogue6Text'), + notes: t('weaponRogue6Notes', { + str: 10 }), str: 10, value: 120, @@ -9410,24 +9359,16 @@ gear = { wizard: { 0: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard0Text'); - }), - notes: (function() { - return i18n.t('weaponWizard0Notes'); - }), + text: t('weaponWizard0Text'), + notes: t('weaponWizard0Notes'), value: 0 }, 1: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard1Text'); - }), - notes: (function() { - return i18n.t('weaponWizard1Notes', { - int: 3, - per: 1 - }); + text: t('weaponWizard1Text'), + notes: t('weaponWizard1Notes', { + int: 3, + per: 1 }), int: 3, per: 1, @@ -9435,14 +9376,10 @@ gear = { }, 2: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard2Text'); - }), - notes: (function() { - return i18n.t('weaponWizard2Notes', { - int: 6, - per: 2 - }); + text: t('weaponWizard2Text'), + notes: t('weaponWizard2Notes', { + int: 6, + per: 2 }), int: 6, per: 2, @@ -9450,14 +9387,10 @@ gear = { }, 3: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard3Text'); - }), - notes: (function() { - return i18n.t('weaponWizard3Notes', { - int: 9, - per: 3 - }); + text: t('weaponWizard3Text'), + notes: t('weaponWizard3Notes', { + int: 9, + per: 3 }), int: 9, per: 3, @@ -9465,14 +9398,10 @@ gear = { }, 4: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard4Text'); - }), - notes: (function() { - return i18n.t('weaponWizard4Notes', { - int: 12, - per: 5 - }); + text: t('weaponWizard4Text'), + notes: t('weaponWizard4Notes', { + int: 12, + per: 5 }), int: 12, per: 5, @@ -9480,14 +9409,10 @@ gear = { }, 5: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard5Text'); - }), - notes: (function() { - return i18n.t('weaponWizard5Notes', { - int: 15, - per: 7 - }); + text: t('weaponWizard5Text'), + notes: t('weaponWizard5Notes', { + int: 15, + per: 7 }), int: 15, per: 7, @@ -9495,14 +9420,10 @@ gear = { }, 6: { twoHanded: true, - text: (function() { - return i18n.t('weaponWizard6Text'); - }), - notes: (function() { - return i18n.t('weaponWizard6Notes', { - int: 18, - per: 10 - }); + text: t('weaponWizard6Text'), + notes: t('weaponWizard6Notes', { + int: 18, + per: 10 }), int: 18, per: 10, @@ -9512,82 +9433,54 @@ gear = { }, healer: { 0: { - text: (function() { - return i18n.t('weaponHealer0Text'); - }), - notes: (function() { - return i18n.t('weaponHealer0Notes'); - }), + text: t('weaponHealer0Text'), + notes: t('weaponHealer0Notes'), value: 0 }, 1: { - text: (function() { - return i18n.t('weaponHealer1Text'); - }), - notes: (function() { - return i18n.t('weaponHealer1Notes', { - int: 2 - }); + text: t('weaponHealer1Text'), + notes: t('weaponHealer1Notes', { + int: 2 }), int: 2, value: 20 }, 2: { - text: (function() { - return i18n.t('weaponHealer2Text'); - }), - notes: (function() { - return i18n.t('weaponHealer2Notes', { - int: 3 - }); + text: t('weaponHealer2Text'), + notes: t('weaponHealer2Notes', { + int: 3 }), int: 3, value: 30 }, 3: { - text: (function() { - return i18n.t('weaponHealer3Text'); - }), - notes: (function() { - return i18n.t('weaponHealer3Notes', { - int: 5 - }); + text: t('weaponHealer3Text'), + notes: t('weaponHealer3Notes', { + int: 5 }), int: 5, value: 45 }, 4: { - text: (function() { - return i18n.t('weaponHealer4Text'); - }), - notes: (function() { - return i18n.t('weaponHealer4Notes', { - int: 7 - }); + text: t('weaponHealer4Text'), + notes: t('weaponHealer4Notes', { + int: 7 }), int: 7, value: 65 }, 5: { - text: (function() { - return i18n.t('weaponHealer5Text'); - }), - notes: (function() { - return i18n.t('weaponHealer5Notes', { - int: 9 - }); + text: t('weaponHealer5Text'), + notes: t('weaponHealer5Notes', { + int: 9 }), int: 9, value: 90 }, 6: { - text: (function() { - return i18n.t('weaponHealer6Text'); - }), - notes: (function() { - return i18n.t('weaponHealer6Notes', { - int: 11 - }); + text: t('weaponHealer6Text'), + notes: t('weaponHealer6Notes', { + int: 11 }), int: 11, value: 120, @@ -9788,72 +9681,48 @@ gear = { armor: { base: { 0: { - text: (function() { - return i18n.t('armorBase0Text'); - }), - notes: (function() { - return i18n.t('armorBase0Notes'); - }), + text: t('armorBase0Text'), + notes: t('armorBase0Notes'), value: 0 } }, warrior: { 1: { - text: (function() { - return i18n.t('armorWarrior1Text'); - }), - notes: (function() { - return i18n.t('armorWarrior1Notes', { - con: 3 - }); + text: t('armorWarrior1Text'), + notes: t('armorWarrior1Notes', { + con: 3 }), con: 3, value: 30 }, 2: { - text: (function() { - return i18n.t('armorWarrior2Text'); - }), - notes: (function() { - return i18n.t('armorWarrior2Notes', { - con: 5 - }); + text: t('armorWarrior2Text'), + notes: t('armorWarrior2Notes', { + con: 5 }), con: 5, value: 45 }, 3: { - text: (function() { - return i18n.t('armorWarrior3Text'); - }), - notes: (function() { - return i18n.t('armorWarrior3Notes', { - con: 7 - }); + text: t('armorWarrior3Text'), + notes: t('armorWarrior3Notes', { + con: 7 }), con: 7, value: 65 }, 4: { - text: (function() { - return i18n.t('armorWarrior4Text'); - }), - notes: (function() { - return i18n.t('armorWarrior4Notes', { - con: 9 - }); + text: t('armorWarrior4Text'), + notes: t('armorWarrior4Notes', { + con: 9 }), con: 9, value: 90 }, 5: { - text: (function() { - return i18n.t('armorWarrior5Text'); - }), - notes: (function() { - return i18n.t('armorWarrior5Notes', { - con: 11 - }); + text: t('armorWarrior5Text'), + notes: t('armorWarrior5Notes', { + con: 11 }), con: 11, value: 120, @@ -9862,61 +9731,41 @@ gear = { }, rogue: { 1: { - text: (function() { - return i18n.t('armorRogue1Text'); - }), - notes: (function() { - return i18n.t('armorRogue1Notes', { - per: 6 - }); + text: t('armorRogue1Text'), + notes: t('armorRogue1Notes', { + per: 6 }), per: 6, value: 30 }, 2: { - text: (function() { - return i18n.t('armorRogue2Text'); - }), - notes: (function() { - return i18n.t('armorRogue2Notes', { - per: 9 - }); + text: t('armorRogue2Text'), + notes: t('armorRogue2Notes', { + per: 9 }), per: 9, value: 45 }, 3: { - text: (function() { - return i18n.t('armorRogue3Text'); - }), - notes: (function() { - return i18n.t('armorRogue3Notes', { - per: 12 - }); + text: t('armorRogue3Text'), + notes: t('armorRogue3Notes', { + per: 12 }), per: 12, value: 65 }, 4: { - text: (function() { - return i18n.t('armorRogue4Text'); - }), - notes: (function() { - return i18n.t('armorRogue4Notes', { - per: 15 - }); + text: t('armorRogue4Text'), + notes: t('armorRogue4Notes', { + per: 15 }), per: 15, value: 90 }, 5: { - text: (function() { - return i18n.t('armorRogue5Text'); - }), - notes: (function() { - return i18n.t('armorRogue5Notes', { - per: 18 - }); + text: t('armorRogue5Text'), + notes: t('armorRogue5Notes', { + per: 18 }), per: 18, value: 120, @@ -9925,61 +9774,41 @@ gear = { }, wizard: { 1: { - text: (function() { - return i18n.t('armorWizard1Text'); - }), - notes: (function() { - return i18n.t('armorWizard1Notes', { - int: 2 - }); + text: t('armorWizard1Text'), + notes: t('armorWizard1Notes', { + int: 2 }), int: 2, value: 30 }, 2: { - text: (function() { - return i18n.t('armorWizard2Text'); - }), - notes: (function() { - return i18n.t('armorWizard2Notes', { - int: 4 - }); + text: t('armorWizard2Text'), + notes: t('armorWizard2Notes', { + int: 4 }), int: 4, value: 45 }, 3: { - text: (function() { - return i18n.t('armorWizard3Text'); - }), - notes: (function() { - return i18n.t('armorWizard3Notes', { - int: 6 - }); + text: t('armorWizard3Text'), + notes: t('armorWizard3Notes', { + int: 6 }), int: 6, value: 65 }, 4: { - text: (function() { - return i18n.t('armorWizard4Text'); - }), - notes: (function() { - return i18n.t('armorWizard4Notes', { - int: 9 - }); + text: t('armorWizard4Text'), + notes: t('armorWizard4Notes', { + int: 9 }), int: 9, value: 90 }, 5: { - text: (function() { - return i18n.t('armorWizard5Text'); - }), - notes: (function() { - return i18n.t('armorWizard5Notes', { - int: 12 - }); + text: t('armorWizard5Text'), + notes: t('armorWizard5Notes', { + int: 12 }), int: 12, value: 120, @@ -9988,61 +9817,41 @@ gear = { }, healer: { 1: { - text: (function() { - return i18n.t('armorHealer1Text'); - }), - notes: (function() { - return i18n.t('armorHealer1Notes', { - con: 6 - }); + text: t('armorHealer1Text'), + notes: t('armorHealer1Notes', { + con: 6 }), con: 6, value: 30 }, 2: { - text: (function() { - return i18n.t('armorHealer2Text'); - }), - notes: (function() { - return i18n.t('armorHealer2Notes', { - con: 9 - }); + text: t('armorHealer2Text'), + notes: t('armorHealer2Notes', { + con: 9 }), con: 9, value: 45 }, 3: { - text: (function() { - return i18n.t('armorHealer3Text'); - }), - notes: (function() { - return i18n.t('armorHealer3Notes', { - con: 12 - }); + text: t('armorHealer3Text'), + notes: t('armorHealer3Notes', { + con: 12 }), con: 12, value: 65 }, 4: { - text: (function() { - return i18n.t('armorHealer4Text'); - }), - notes: (function() { - return i18n.t('armorHealer4Notes', { - con: 15 - }); + text: t('armorHealer4Text'), + notes: t('armorHealer4Notes', { + con: 15 }), con: 15, value: 90 }, 5: { - text: (function() { - return i18n.t('armorHealer5Text'); - }), - notes: (function() { - return i18n.t('armorHealer5Notes', { - con: 18 - }); + text: t('armorHealer5Text'), + notes: t('armorHealer5Notes', { + con: 18 }), con: 18, value: 120, @@ -10104,11 +9913,6 @@ gear = { }, yeti: { event: events.winter, -<<<<<<< HEAD - specialClass: 'warrior', - text: "Yeti-Tamer Robe", - notes: 'Limited Edition 2013 Winter Gear! Fuzzy and fierce. Increases CON by 9.', -======= canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), @@ -10120,17 +9924,11 @@ gear = { con: 9 }); }), ->>>>>>> chore(i18n): move armor items to content.json con: 9, value: 90 }, ski: { event: events.winter, -<<<<<<< HEAD - specialClass: 'rogue', - text: "Ski-sassin Parka", - notes: 'Limited Edition 2013 Winter Gear! Full of secret daggers and ski trail maps. Increases PER by 15.', -======= canOwn: (function(u) { return u.stats["class"] === 'rogue'; }), @@ -10142,17 +9940,11 @@ gear = { per: 15 }); }), ->>>>>>> chore(i18n): move armor items to content.json per: 15, value: 90 }, candycane: { event: events.winter, -<<<<<<< HEAD - specialClass: 'wizard', - text: "Candy Cane Robe", - notes: 'Limited Edition 2013 Winter Gear! Spun from sugar and silk. Increases INT by 9.', -======= canOwn: (function(u) { return u.stats["class"] === 'wizard'; }), @@ -10164,17 +9956,11 @@ gear = { int: 9 }); }), ->>>>>>> chore(i18n): move armor items to content.json int: 9, value: 90 }, snowflake: { event: events.winter, -<<<<<<< HEAD - specialClass: 'healer', - text: "Snowflake Robe", - notes: 'Limited Edition 2013 Winter Gear! A robe to keep you warm, even in a blizzard. Increases CON by 15.', -======= canOwn: (function(u) { return u.stats["class"] === 'healer'; }), @@ -10186,7 +9972,6 @@ gear = { con: 15 }); }), ->>>>>>> chore(i18n): move armor items to content.json con: 15, value: 90 }, @@ -10235,8 +10020,12 @@ gear = { }, mystery: { 201402: { - text: 'Messenger Robes', - notes: "Shimmering and strong, these robes have many pockets to carry letters.", + text: (function() { + return i18n.t('armorMystery201402Text'); + }), + notes: (function() { + return i18n.t('armorMystery201402Notes'); + }), mystery: mystery['201402'], value: 10 }, @@ -10251,72 +10040,48 @@ gear = { head: { base: { 0: { - text: (function() { - return i18n.t('headBase0Text'); - }), - notes: (function() { - return i18n.t('headBase0Notes'); - }), + text: t('headBase0Text'), + notes: t('headBase0Notes'), value: 0 } }, warrior: { 1: { - text: (function() { - return i18n.t('headWarrior1Text'); - }), - notes: (function() { - return i18n.t('headWarrior1Notes', { - str: 2 - }); + text: t('headWarrior1Text'), + notes: t('headWarrior1Notes', { + str: 2 }), str: 2, value: 15 }, 2: { - text: (function() { - return i18n.t('headWarrior2Text'); - }), - notes: (function() { - return i18n.t('headWarrior2Notes', { - str: 4 - }); + text: t('headWarrior2Text'), + notes: t('headWarrior2Notes', { + str: 4 }), str: 4, value: 25 }, 3: { - text: (function() { - return i18n.t('headWarrior3Text'); - }), - notes: (function() { - return i18n.t('headWarrior3Notes', { - str: 6 - }); + text: t('headWarrior3Text'), + notes: t('headWarrior3Notes', { + str: 6 }), str: 6, value: 40 }, 4: { - text: (function() { - return i18n.t('headWarrior4Text'); - }), - notes: (function() { - return i18n.t('headWarrior4Notes', { - str: 9 - }); + text: t('headWarrior4Text'), + notes: t('headWarrior4Notes', { + str: 9 }), str: 9, value: 60 }, 5: { - text: (function() { - return i18n.t('headWarrior5Text'); - }), - notes: (function() { - return i18n.t('headWarrior5Notes', { - str: 12 - }); + text: t('headWarrior5Text'), + notes: t('headWarrior5Notes', { + str: 12 }), str: 12, value: 80, @@ -10325,61 +10090,41 @@ gear = { }, rogue: { 1: { - text: (function() { - return i18n.t('headRogue1Text'); - }), - notes: (function() { - return i18n.t('headRogue1Notes', { - per: 2 - }); + text: t('headRogue1Text'), + notes: t('headRogue1Notes', { + per: 2 }), per: 2, value: 15 }, 2: { - text: (function() { - return i18n.t('headRogue2Text'); - }), - notes: (function() { - return i18n.t('headRogue2Notes', { - per: 4 - }); + text: t('headRogue2Text'), + notes: t('headRogue2Notes', { + per: 4 }), per: 4, value: 25 }, 3: { - text: (function() { - return i18n.t('headRogue3Text'); - }), - notes: (function() { - return i18n.t('headRogue3Notes', { - per: 6 - }); + text: t('headRogue3Text'), + notes: t('headRogue3Notes', { + per: 6 }), per: 6, value: 40 }, 4: { - text: (function() { - return i18n.t('headRogue4Text'); - }), - notes: (function() { - return i18n.t('headRogue4Notes', { - per: 9 - }); + text: t('headRogue4Text'), + notes: t('headRogue4Notes', { + per: 9 }), per: 9, value: 60 }, 5: { - text: (function() { - return i18n.t('headRogue5Text'); - }), - notes: (function() { - return i18n.t('headRogue5Notes', { - per: 12 - }); + text: t('headRogue5Text'), + notes: t('headRogue5Notes', { + per: 12 }), per: 12, value: 80, @@ -10388,61 +10133,41 @@ gear = { }, wizard: { 1: { - text: (function() { - return i18n.t('headWizard1Text'); - }), - notes: (function() { - return i18n.t('headWizard1Notes', { - per: 2 - }); + text: t('headWizard1Text'), + notes: t('headWizard1Notes', { + per: 2 }), per: 2, value: 15 }, 2: { - text: (function() { - return i18n.t('headWizard2Text'); - }), - notes: (function() { - return i18n.t('headWizard2Notes', { - per: 3 - }); + text: t('headWizard2Text'), + notes: t('headWizard2Notes', { + per: 3 }), per: 3, value: 25 }, 3: { - text: (function() { - return i18n.t('headWizard3Text'); - }), - notes: (function() { - return i18n.t('headWizard3Notes', { - per: 5 - }); + text: t('headWizard3Text'), + notes: t('headWizard3Notes', { + per: 5 }), per: 5, value: 40 }, 4: { - text: (function() { - return i18n.t('headWizard4Text'); - }), - notes: (function() { - return i18n.t('headWizard4Notes', { - per: 7 - }); + text: t('headWizard4Text'), + notes: t('headWizard4Notes', { + per: 7 }), per: 7, value: 60 }, 5: { - text: (function() { - return i18n.t('headWizard5Text'); - }), - notes: (function() { - return i18n.t('headWizard5Notes', { - per: 10 - }); + text: t('headWizard5Text'), + notes: t('headWizard5Notes', { + per: 10 }), per: 10, value: 80, @@ -10451,61 +10176,41 @@ gear = { }, healer: { 1: { - text: (function() { - return i18n.t('headHealer1Text'); - }), - notes: (function() { - return i18n.t('headHealer1Notes', { - int: 2 - }); + text: t('headHealer1Text'), + notes: t('headHealer1Notes', { + int: 2 }), int: 2, value: 15 }, 2: { - text: (function() { - return i18n.t('headHealer2Text'); - }), - notes: (function() { - return i18n.t('headHealer2Notes', { - int: 3 - }); + text: t('headHealer2Text'), + notes: t('headHealer2Notes', { + int: 3 }), int: 3, value: 25 }, 3: { - text: (function() { - return i18n.t('headHealer3Text'); - }), - notes: (function() { - return i18n.t('headHealer3Notes', { - int: 5 - }); + text: t('headHealer3Text'), + notes: t('headHealer3Notes', { + int: 5 }), int: 5, value: 40 }, 4: { - text: (function() { - return i18n.t('headHealer4Text'); - }), - notes: (function() { - return i18n.t('headHealer4Notes', { - int: 7 - }); + text: t('headHealer4Text'), + notes: t('headHealer4Notes', { + int: 7 }), int: 7, value: 60 }, 5: { - text: (function() { - return i18n.t('headHealer5Text'); - }), - notes: (function() { - return i18n.t('headHealer5Notes', { - int: 9 - }); + text: t('headHealer5Text'), + notes: t('headHealer5Notes', { + int: 9 }), int: 9, value: 80, @@ -10577,11 +10282,6 @@ gear = { }, yeti: { event: events.winter, -<<<<<<< HEAD - specialClass: 'warrior', - text: "Yeti-Tamer Helm", - notes: 'Limited Edition 2013 Winter Gear! An adorably fearsome hat. Increases STR by 9.', -======= canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), @@ -10593,17 +10293,11 @@ gear = { str: 9 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile str: 9, value: 60 }, ski: { event: events.winter, -<<<<<<< HEAD - specialClass: 'rogue', - text: "Ski-sassin Helm", - notes: "Limited Edition 2013 Winter Gear! Keeps the wearer's identity secret... and their face toasty. Increases PER by 9.", -======= canOwn: (function(u) { return u.stats["class"] === 'rogue'; }), @@ -10615,17 +10309,11 @@ gear = { per: 9 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile per: 9, value: 60 }, candycane: { event: events.winter, -<<<<<<< HEAD - specialClass: 'wizard', - text: "Candy Cane Hat", - notes: "Limited Edition 2013 Winter Gear! This is the most delicious hat in the world. It's also known to appear and disappear mysteriously. Increases PER by 7.", -======= canOwn: (function(u) { return u.stats["class"] === 'wizard'; }), @@ -10637,17 +10325,11 @@ gear = { per: 7 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile per: 7, value: 60 }, snowflake: { event: events.winter, -<<<<<<< HEAD - specialClass: 'healer', - text: "Snowflake Crown", - notes: 'Limited Edition 2013 Winter Gear! The wearer of this crown is never cold. Increases INT by 7.', -======= canOwn: (function(u) { return u.stats["class"] === 'healer'; }), @@ -10659,7 +10341,6 @@ gear = { int: 7 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile int: 7, value: 60 }, @@ -10698,8 +10379,8 @@ gear = { }, mystery: { 201402: { - text: 'Winged Helm', - notes: "This winged circlet imbues the wearer with the speed of the wind!", + text: t('headMystery201402Text'), + notes: t('headMystery201402Notes'), mystery: mystery['201402'], value: 10 } @@ -10708,72 +10389,48 @@ gear = { shield: { base: { 0: { - text: (function() { - return i18n.t('shieldBase0Text'); - }), - notes: (function() { - return i18n.t('shieldBase0Notes'); - }), + text: t('shieldBase0Text'), + notes: t('shieldBase0Notes'), value: 0 } }, warrior: { 1: { - text: (function() { - return i18n.t('shieldWarrior1Text'); - }), - notes: (function() { - return i18n.t('shieldWarrior1Notes', { - con: 2 - }); + text: t('shieldWarrior1Text'), + notes: t('shieldWarrior1Notes', { + con: 2 }), con: 2, value: 20 }, 2: { - text: (function() { - return i18n.t('shieldWarrior2Text'); - }), - notes: (function() { - return i18n.t('shieldWarrior2Notes', { - con: 3 - }); + text: t('shieldWarrior2Text'), + notes: t('shieldWarrior2Notes', { + con: 3 }), con: 3, value: 35 }, 3: { - text: (function() { - return i18n.t('shieldWarrior3Text'); - }), - notes: (function() { - return i18n.t('shieldWarrior3Notes', { - con: 5 - }); + text: t('shieldWarrior3Text'), + notes: t('shieldWarrior3Notes', { + con: 5 }), con: 5, value: 50 }, 4: { - text: (function() { - return i18n.t('shieldWarrior4Text'); - }), - notes: (function() { - return i18n.t('shieldWarrior4Notes', { - con: 7 - }); + text: t('shieldWarrior4Text'), + notes: t('shieldWarrior4Notes', { + con: 7 }), con: 7, value: 70 }, 5: { - text: (function() { - return i18n.t('shieldWarrior5Text'); - }), - notes: (function() { - return i18n.t('shieldWarrior5Notes', { - con: 9 - }); + text: t('shieldWarrior5Text'), + notes: t('shieldWarrior5Notes', { + con: 9 }), con: 9, value: 90, @@ -10782,83 +10439,55 @@ gear = { }, rogue: { 0: { - text: (function() { - return i18n.t('shieldRogue0Text'); - }), - notes: (function() { - return i18n.t('shieldRogue0Notes'); - }), + text: t('weaponRogue0Text'), + notes: t('weaponRogue0Notes'), str: 0, value: 0 }, 1: { - text: (function() { - return i18n.t('shieldRogue1Text'); - }), - notes: (function() { - return i18n.t('shieldRogue1Notes', { - str: 2 - }); + text: t('weaponRogue1Text'), + notes: t('weaponRogue1Notes', { + str: 2 }), str: 2, value: 20 }, 2: { - text: (function() { - return i18n.t('shieldRogue2Text'); - }), - notes: (function() { - return i18n.t('shieldRogue2Notes', { - str: 3 - }); + text: t('weaponRogue2Text'), + notes: t('weaponRogue2Notes', { + str: 3 }), str: 3, value: 35 }, 3: { - text: (function() { - return i18n.t('shieldRogue3Text'); - }), - notes: (function() { - return i18n.t('shieldRogue3Notes', { - str: 4 - }); + text: t('weaponRogue3Text'), + notes: t('weaponRogue3Notes', { + str: 4 }), str: 4, value: 50 }, 4: { - text: (function() { - return i18n.t('shieldRogue4Text'); - }), - notes: (function() { - return i18n.t('shieldRogue4Notes', { - str: 6 - }); + text: t('weaponRogue4Text'), + notes: t('weaponRogue4Notes', { + str: 6 }), str: 6, value: 70 }, 5: { - text: (function() { - return i18n.t('shieldRogue5Text'); - }), - notes: (function() { - return i18n.t('shieldRogue5Notes', { - str: 8 - }); + text: t('weaponRogue5Text'), + notes: t('weaponRogue5Notes', { + str: 8 }), str: 8, value: 90 }, 6: { - text: (function() { - return i18n.t('shieldRogue6Text'); - }), - notes: (function() { - return i18n.t('shieldRogue6Notes', { - str: 10 - }); + text: t('weaponRogue6Text'), + notes: t('weaponRogue6Notes', { + str: 10 }), str: 10, value: 120, @@ -10868,61 +10497,41 @@ gear = { wizard: {}, healer: { 1: { - text: (function() { - return i18n.t('shieldHealer1Text'); - }), - notes: (function() { - return i18n.t('shieldHealer1Notes', { - con: 2 - }); + text: t('shieldHealer1Text'), + notes: t('shieldHealer1Notes', { + con: 2 }), con: 2, value: 20 }, 2: { - text: (function() { - return i18n.t('shieldHealer2Text'); - }), - notes: (function() { - return i18n.t('shieldHealer2Notes', { - con: 4 - }); + text: t('shieldHealer2Text'), + notes: t('shieldHealer2Notes', { + con: 4 }), con: 4, value: 35 }, 3: { - text: (function() { - return i18n.t('shieldHealer3Text'); - }), - notes: (function() { - return i18n.t('shieldHealer3Notes', { - con: 6 - }); + text: t('shieldHealer3Text'), + notes: t('shieldHealer3Notes', { + con: 6 }), con: 6, value: 50 }, 4: { - text: (function() { - return i18n.t('shieldHealer4Text'); - }), - notes: (function() { - return i18n.t('shieldHealer4Notes', { - con: 9 - }); + text: t('shieldHealer4Text'), + notes: t('shieldHealer4Notes', { + con: 9 }), con: 9, value: 70 }, 5: { - text: (function() { - return i18n.t('shieldHealer5Text'); - }), - notes: (function() { - return i18n.t('shieldHealer5Notes', { - con: 12 - }); + text: t('shieldHealer5Text'), + notes: t('shieldHealer5Notes', { + con: 12 }), con: 12, value: 90, @@ -10967,11 +10576,6 @@ gear = { }, yeti: { event: events.winter, -<<<<<<< HEAD - specialClass: 'warrior', - text: "Yeti-Tamer Shield", - notes: 'Limited Edition 2013 Winter Gear! This shield reflects light from the snow. Increases CON by 7.', -======= canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), @@ -10983,39 +10587,27 @@ gear = { con: 7 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile con: 7, value: 70 }, ski: { event: events.winter, -<<<<<<< HEAD - specialClass: 'rogue', - text: "Ski-sassin Pole", - notes: 'Limited Edition 2013 Winter Gear! A weapon capable of destroying hordes of enemies! It also helps the user make very nice parallel turns. Increases STR by 8.', -======= canOwn: (function(u) { return u.stats["class"] === 'rogue'; }), text: (function() { - return i18n.t('shieldSpecialSkiText'); + return i18n.t('weaponSpecialSkiText'); }), notes: (function() { - return i18n.t('shieldSpecialSkiNotes', { + return i18n.t('weaponSpecialSkiNotes', { str: 8 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile str: 8, value: 90 }, snowflake: { event: events.winter, -<<<<<<< HEAD - specialClass: 'healer', - text: "Snowflake Shield", - notes: 'Limited Edition 2013 Winter Gear! Every shield is unique. Increases CON by 9.', -======= canOwn: (function(u) { return u.stats["class"] === 'healer'; }), @@ -11027,7 +10619,6 @@ gear = { con: 9 }); }), ->>>>>>> improve(i18n): move gear strings to gear.json, recompile con: 9, value: 70 }, @@ -11060,26 +10651,19 @@ gear = { back: { base: { 0: { -<<<<<<< HEAD - text: "No Back Accessory", - notes: 'No Back Accessory.', - value: 0 -======= text: (function() { return i18n.t('backBase0Text'); }), notes: (function() { return i18n.t('backBase0Notes'); }), - value: 0, - last: true ->>>>>>> improve(i18n): move gear strings to gear.json, recompile + value: 0 } }, mystery: { 201402: { - text: 'Golden Wings', - notes: "These shining wings have feathers that glitter in the sun!", + text: t('backMystery201402Text'), + notes: t('backMystery201402Notes'), mystery: mystery['201402'], value: 10 }, @@ -11255,12 +10839,8 @@ _.each(gearTypes, function(type) { api.potion = { type: 'potion', - text: (function() { - return i18n.t('potionText'); - }), - notes: (function() { - return i18n.t('potionNotes'); - }), + text: t('potionText'), + notes: t('potionNotes'), value: 25, key: 'potion' }; @@ -11315,11 +10895,11 @@ diminishingReturns = function(bonus, max, halfway) { api.spells = { wizard: { fireball: { - text: 'Burst of Flames', + text: t('spellWizardFireballText'), mana: 10, lvl: 11, target: 'task', - notes: 'Flames blast forth, scorching a task. You reduce the task\'s redness, deal damage to any monster you\'re battling, and gain Experience--more for blue tasks.', + notes: t('spellWizardFireballNotes'), cast: function(user, target) { var bonus; bonus = user._statsComputed.int * user.fns.crit('per'); @@ -11332,11 +10912,11 @@ api.spells = { } }, mpheal: { - text: 'Ethereal Surge', + text: t('spellWizardMPHealText'), mana: 30, lvl: 12, target: 'party', - notes: "A flow of magical energy rushes from your hands and recharges your party. Your party recovers MP.", + notes: t('spellWizardMPHealNotes'), cast: function(user, target) { return _.each(target, function(member) { var bonus; @@ -11349,11 +10929,11 @@ api.spells = { } }, earth: { - text: 'Earthquake', + text: t('spellWizardEarthText'), mana: 35, lvl: 13, target: 'party', - notes: "The ground below your party's tasks cracks and shakes with extreme intensity, slowing them down and opening them up to more attacks. Your party gains a buff to experience.", + notes: t('spellWizardEarthNotes'), cast: function(user, target) { return _.each(target, function(member) { var _base; @@ -11365,11 +10945,11 @@ api.spells = { } }, frost: { - text: 'Chilling Frost', + text: t('spellWizardFrostText'), mana: 40, lvl: 14, target: 'self', - notes: "Ice erupts from every surface, swallowing your tasks and freezing them in place. Your dailies' streaks won't reset at the end of the day.", + notes: t('spellWizardFrostNotes'), cast: function(user, target) { return user.stats.buffs.streaks = true; } @@ -11377,11 +10957,11 @@ api.spells = { }, warrior: { smash: { - text: 'Brutal Smash', + text: t('spellWarriorSmashText'), mana: 10, lvl: 11, target: 'task', - notes: "You savagely hit a single task with all of your might. The task's redness decreases, and you deal extra damage to any monster you're fighting.", + notes: t('spellWarriorSmashNotes'), cast: function(user, target) { target.value += 2.5 * (user._statsComputed.str / (user._statsComputed.str + 50)) * user.fns.crit('con'); if (user.party.quest.key) { @@ -11390,11 +10970,11 @@ api.spells = { } }, defensiveStance: { - text: 'Defensive Stance', + text: t('spellWarriorDefensiveStanceText'), mana: 25, lvl: 12, target: 'self', - notes: "You take a moment to relax your body and enter a defensive stance to ready yourself for the tasks' next onslaught. Reduces damage from dailies at the end of the day.", + notes: t('spellWarriorDefensiveStanceNotes'), cast: function(user, target) { var _base; if ((_base = user.stats.buffs).con == null) { @@ -11404,11 +10984,11 @@ api.spells = { } }, valorousPresence: { - text: 'Valorous Presence', + text: t('spellWarriorValorousPresenceText'), mana: 20, lvl: 13, target: 'party', - notes: "Your presence emboldens the party. Their newfound courage gives them a boost of strength. Party members gain a buff to their STR.", + notes: t('spellWarriorValorousPresenceNotes'), cast: function(user, target) { return _.each(target, function(member) { var _base; @@ -11420,11 +11000,11 @@ api.spells = { } }, intimidate: { - text: 'Intimidating Gaze', + text: t('spellWarriorIntimidateText'), mana: 15, lvl: 14, target: 'party', - notes: "Your gaze strikes fear into the hearts of your party's enemies. The party gains a moderate boost to defense.", + notes: t('spellWarriorIntimidateNotes'), cast: function(user, target) { return _.each(target, function(member) { var _base; @@ -11438,11 +11018,11 @@ api.spells = { }, rogue: { pickPocket: { - text: 'Pickpocket', + text: t('spellRoguePickPocketText'), mana: 10, lvl: 11, target: 'task', - notes: "Your nimble fingers run through the task's pockets and find some treasures for yourself. You gain an increased gold bonus on the task, higher yet the 'fatter' (bluer) your task.", + notes: t('spellRoguePickPocketNotes'), cast: function(user, target) { var bonus; bonus = (target.value < 0 ? 1 : target.value + 2) + (user._statsComputed.per * 0.5); @@ -11450,11 +11030,11 @@ api.spells = { } }, backStab: { - text: 'Backstab', + text: t('spellRogueBackStabText'), mana: 15, lvl: 12, target: 'task', - notes: "Without a sound, you sweep behind a task and stab it in the back. You deal higher damage to the task, with a higher chance of a critical hit.", + notes: t('spellRogueBackStabNotes'), cast: function(user, target) { var bonus, _crit; _crit = user.fns.crit('str', .3); @@ -11465,11 +11045,11 @@ api.spells = { } }, toolsOfTrade: { - text: 'Tools of the Trade', + text: t('spellRogueToolsOfTradeText'), mana: 25, lvl: 13, target: 'party', - notes: "You share your thievery tools with the party to aid them in 'acquiring' more gold. The party's gold bonus for tasks and chance of drops is buffed for a day.", + notes: t('spellRogueToolsOfTradeNotes'), cast: function(user, target) { return _.each(target, function(member) { var _base; @@ -11481,11 +11061,11 @@ api.spells = { } }, stealth: { - text: 'Stealth', + text: t('spellRogueStealthText'), mana: 45, lvl: 14, target: 'self', - notes: "You duck into the shadows, pulling up your hood. Many dailies won't find you this night; fewer yet the higher your Perception.", + notes: t('spellRogueStealthNotes'), cast: function(user, target) { var _base; if ((_base = user.stats.buffs).stealth == null) { @@ -11497,11 +11077,11 @@ api.spells = { }, healer: { heal: { - text: 'Healing Light', + text: t('spellHealerHealText'), mana: 15, lvl: 11, target: 'self', - notes: 'Light covers your body, healing your wounds. You gain a boost to your health.', + notes: t('spellHealerHealNotes'), cast: function(user, target) { user.stats.hp += (user._statsComputed.con + user._statsComputed.int + 5) * .075; if (user.stats.hp > 50) { @@ -11510,11 +11090,11 @@ api.spells = { } }, brightness: { - text: 'Searing Brightness', + text: t('spellHealerBrightnessText'), mana: 15, lvl: 12, target: 'self', - notes: "You cast a burst of light that blinds all of your tasks. The redness of your tasks is reduced.", + notes: t('spellHealerBrightnessNotes'), cast: function(user, target) { return _.each(user.tasks, function(target) { if (target.type === 'reward') { @@ -11525,11 +11105,11 @@ api.spells = { } }, protectAura: { - text: 'Protective Aura', + text: t('spellHealerProtectAuraText'), mana: 30, lvl: 13, target: 'party', - notes: "A magical aura surrounds your party members, protecting them from damage. Your party members gain a buff to their defense.", + notes: t('spellHealerProtectAuraNotes'), cast: function(user, target) { return _.each(target, function(member) { var _base; @@ -11541,11 +11121,11 @@ api.spells = { } }, heallAll: { - text: 'Blessing', + text: t('spellHealerHealAllText'), mana: 25, lvl: 14, target: 'party', - notes: "Soothing light envelops your party and heals them of their injuries. Your party members gain a boost to their health.", + notes: t('spellHealerHealAllNotes'), cast: function(user, target) { return _.each(target, function(member) { member.stats.hp += (user._statsComputed.con + user._statsComputed.int + 5) * .04; @@ -11558,11 +11138,11 @@ api.spells = { }, special: { snowball: { - text: 'Snowball', + text: t('spellSpecialSnowballText'), mana: 0, value: 1, target: 'user', - notes: "Throw a snowball at a party member, what could possibly go wrong? Lasts until member's new day.", + notes: t('spellSpecialSnowballNotes'), cast: function(user, target) { var _base; target.stats.buffs.snowball = true; @@ -11574,11 +11154,11 @@ api.spells = { } }, salt: { - text: 'Salt', + text: t('spellSpecialSaltText'), mana: 0, value: 5, target: 'self', - notes: 'Someone has snowballed you. Ha ha, very funny. Now get this snow off me!', + notes: t('spellSpecialSaltNotes'), cast: function(user, target) { user.stats.buffs.snowball = false; return user.stats.gp -= 5; @@ -11610,44 +11190,44 @@ api.special = api.spells.special; api.dropEggs = { Wolf: { - text: 'Wolf', - adjective: 'loyal' + text: t('dropEggWolfText'), + adjective: t('dropEggWolfAdjective') }, TigerCub: { - text: 'Tiger Cub', - mountText: 'Tiger', - adjective: 'fierce' + text: t('dropEggTigerCubText'), + mountText: t('dropEggTigerCubMountText'), + adjective: t('dropEggTigerCubAdjective') }, PandaCub: { - text: 'Panda Cub', - mountText: 'Panda', - adjective: 'gentle' + text: t('dropEggPandaCubText'), + mountText: t('dropEggPandaCubMountText'), + adjective: t('dropEggPandaCubAdjective') }, LionCub: { - text: 'Lion Cub', - mountText: 'Lion', - adjective: 'regal' + text: t('dropEggLionCubText'), + mountText: t('dropEggLionCubMountText'), + adjective: t('dropEggLionCubAdjective') }, Fox: { - text: 'Fox', - adjective: 'wily' + text: t('dropEggFoxText'), + adjective: t('dropEggFoxAdjective') }, FlyingPig: { - text: 'Flying Pig', - adjective: 'whimsical' + text: t('dropEggFlyingPigText'), + adjective: t('dropEggFlyingPigAdjective') }, Dragon: { - text: 'Dragon', - adjective: 'mighty' + text: t('dropEggDragonText'), + adjective: t('dropEggDragonAdjective') }, Cactus: { - text: 'Cactus', - adjective: 'prickly' + text: t('dropEggCactusText'), + adjective: t('dropEggCactusAdjective') }, BearCub: { - text: 'Bear Cub', - mountText: 'Bear', - adjective: 'cuddly' + text: t('dropEggBearCubText'), + mountText: t('dropEggBearCubMountText'), + adjective: t('dropEggBearCubAdjective') } }; @@ -11656,20 +11236,31 @@ _.each(api.dropEggs, function(egg, key) { 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 + ".", + notes: t('eggNotes', { + eggText: egg.text, + eggAdjective: egg.adjective + }), mountText: egg.text }); }); api.questEggs = { Gryphon: { - text: 'Gryphon', - adjective: 'proud', + text: (function() { + return i18n.t('questEggGryphonText'); + }), + adjective: (function() { + return i18n.t('questEggGryphonAdjective'); + }), canBuy: false }, Hedgehog: { - text: 'Hedgehog', - adjective: 'spiky', + text: (function() { + return i18n.t('questEggHedgehogText'); + }), + adjective: (function() { + return i18n.t('questEggHedgehogAdjective'); + }), canBuy: false }, Deer: { @@ -11689,7 +11280,10 @@ _.each(api.questEggs, function(egg, key) { 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 + ".", + notes: t('eggNotes', { + eggText: egg.text, + eggAdjective: egg.adjective + }), mountText: egg.text }); }); @@ -11712,43 +11306,43 @@ api.specialMounts = { api.hatchingPotions = { Base: { value: 2, - text: 'Base' + text: t('hatchingPotionBase') }, White: { value: 2, - text: 'White' + text: t('hatchingPotionWhite') }, Desert: { value: 2, - text: 'Desert' + text: t('hatchingPotionDesert') }, Red: { value: 3, - text: 'Red' + text: t('hatchingPotionRed') }, Shade: { value: 3, - text: 'Shade' + text: t('hatchingPotionShade') }, Skeleton: { value: 3, - text: 'Skeleton' + text: t('hatchingPotionSkeleton') }, Zombie: { value: 4, - text: 'Zombie' + text: t('hatchingPotionZombie') }, CottonCandyPink: { value: 4, - text: 'Cotton Candy Pink' + text: t('hatchingPotionCottonCandyPink') }, CottonCandyBlue: { value: 4, - text: 'Cotton Candy Blue' + text: t('hatchingPotionCottonCandyBlue') }, Golden: { value: 5, - text: 'Golden' + text: t('hatchingPotionGolden') } }; @@ -11756,7 +11350,9 @@ _.each(api.hatchingPotions, function(pot, key) { return _.defaults(pot, { key: key, value: 2, - notes: "Pour this on an egg, and it will hatch as a " + pot.text + " pet." + notes: t('hatchingPotionNotes', { + potText: pot.text + }) }); }); @@ -11774,119 +11370,119 @@ api.questPets = _.transform(api.questEggs, function(m, egg) { api.food = { Meat: { - text: 'Meat', + text: t('foodMeat'), target: 'Base', article: '' }, Milk: { - text: 'Milk', + text: t('foodMilk'), target: 'White', article: '' }, Potatoe: { - text: 'Potato', + text: t('foodPotatoe'), target: 'Desert', article: 'a ' }, Strawberry: { - text: 'Strawberry', + text: t('foodStrawberry'), target: 'Red', article: 'a ' }, Chocolate: { - text: 'Chocolate', + text: t('foodChocolate'), target: 'Shade', article: '' }, Fish: { - text: 'Fish', + text: t('foodFish'), target: 'Skeleton', article: 'a ' }, RottenMeat: { - text: 'Rotten Meat', + text: t('foodRottenMeat'), target: 'Zombie', article: '' }, CottonCandyPink: { - text: 'Pink Cotton Candy', + text: t('foodCottonCandyPink'), target: 'CottonCandyPink', article: '' }, CottonCandyBlue: { - text: 'Blue Cotton Candy', + text: t('foodCottonCandyBlue'), target: 'CottonCandyBlue', article: '' }, Cake_Skeleton: { canBuy: false, - text: 'Bare Bones Cake', + text: t('foodCakeSkeleton'), target: 'Skeleton', article: '' }, Cake_Base: { canBuy: false, - text: 'Basic Cake', + text: t('foodCakeBase'), target: 'Base', article: '' }, Cake_CottonCandyBlue: { canBuy: false, - text: 'Candy Blue Cake', + text: t('foodCakeCottonCandyBlue'), target: 'CottonCandyBlue', article: '' }, Cake_CottonCandyPink: { canBuy: false, - text: 'Candy Pink Cake', + text: t('foodCakeCottonCandyPink'), target: 'CottonCandyPink', article: '' }, Cake_Shade: { canBuy: false, - text: 'Chocolate Cake', + text: t('foodCakeShade'), target: 'Shade', article: '' }, Cake_White: { canBuy: false, - text: 'Cream Cake', + text: t('foodCakeWhite'), target: 'White', article: '' }, Cake_Golden: { canBuy: false, - text: 'Honey Cake', + text: t('foodCakeGolden'), target: 'Golden', article: '' }, Cake_Zombie: { canBuy: false, - text: 'Rotten Cake', + text: t('foodCakeZombie'), target: 'Zombie', article: '' }, Cake_Desert: { canBuy: false, - text: 'Sand Cake', + text: t('foodCakeDesert'), target: 'Desert', article: '' }, Cake_Red: { canBuy: false, - text: 'Strawberry Cake', + text: t('foodCakeRed'), target: 'Red', article: '' }, Honey: { - text: 'Honey', + text: t('foodHoney'), target: 'Golden', article: '' }, Saddle: { - text: 'Saddle', + text: t('foodSaddleText'), value: 5, - notes: 'Instantly raises one of your pets into a mount.' + notes: t('foodSaddleNotes') } }; @@ -11894,7 +11490,7 @@ _.each(api.food, function(food, key) { return _.defaults(food, { value: 1, key: key, - notes: "Feed this to a pet and it may grow into a sturdy steed.", + notes: t('foodNotes'), canBuy: true }); }); @@ -11902,12 +11498,12 @@ _.each(api.food, function(food, key) { api.quests = { evilsanta: { canBuy: false, - text: "Trapper Santa", - notes: "You hear bemoaned roars deep in the icefields. You follow the roars and growls - punctuated by another voice's cackling - to a clearing in the woods where you see a fully-grown polar bear. She's caged and shackled, roaring for life. Dancing atop the cage is a malicious little imp wearing castaway Christmas costumes. Vanquish Trapper Santa, and save the beast!", - completion: "Trapper Santa squeals in anger, and bounces off into the night. A grateful she-bear, through roars and growls, tries to tell you something. You take her back to the stables, where Matt Boch the whisperer listens to her tale with a gasp of horror. She has a cub! He ran off into the icefields when mama bear was captured. Help her find her baby!", + text: t('questEvilSantaText'), + notes: t('questEvilSantaNotes'), + completion: t('questEvilSantaCompletion'), value: 4, boss: { - name: "Trapper Santa", + name: t('questEvilSantaBoss'), hp: 300, str: 1 }, @@ -11916,7 +11512,7 @@ api.quests = { { type: 'mounts', key: 'BearCub-Polar', - text: "Polar Bear (Mount)" + text: t('questEvilSantaDropBearCubPolarMount') } ], gp: 20, @@ -11925,18 +11521,18 @@ api.quests = { }, evilsanta2: { canBuy: false, - text: "Find The Cub", - notes: "Mama bear's cub had run off into the icefields when she was captured by the trapper. At the edge of the woods, she sniffs the air. You hear twig-snaps and snow crunch through the crystaline sound of the forest. Paw prints! You both start racing to follow the trail. Find all the prints and broken twigs, and retrieve her cub!", - completion: "You've found the cub! Mama and baby bear couldn't be more grateful. As a token, they've decided to keep you company till the end of days.", + text: t('questEvilSanta2Text'), + notes: t('questEvilSanta2Notes'), + completion: t('questEvilSanta2Completion'), value: 4, previous: 'evilsanta', collect: { tracks: { - text: 'Tracks', + text: t('questEvilSanta2CollectTracks'), count: 20 }, branches: { - text: 'Broken Twigs', + text: t('questEvilSanta2CollectBranches'), count: 10 } }, @@ -11945,7 +11541,7 @@ api.quests = { { type: 'pets', key: 'BearCub-Polar', - text: "Polar Bear (Pet)" + text: t('questEvilSanta2DropBearCubPolarPet') } ], gp: 20, @@ -11953,12 +11549,12 @@ api.quests = { } }, gryphon: { - text: "The Fiery Gryphon", - notes: 'The grand beastmaster, baconsaur, has come to your party seeking help. "Please, adventurers, you must help me! My prized gryphon has broken free and is terrorizing Habit City! If you can stop her, I could reward you with some of her eggs!"', - completion: 'Defeated, the mighty beast ashamedly slinks back to its master."My word! Well done, adventurers!" baconsaur exclaims, "Please, have some of the gryphon\'s eggs. I am sure you will raise these young ones well!', + text: t('questGryphonText'), + notes: t('questGryphonNotes'), + completion: t('questGryphonCompletion'), value: 4, boss: { - name: "Fiery Gryphon", + name: t('questGryphonBoss'), hp: 300, str: 1.5 }, @@ -11967,15 +11563,21 @@ api.quests = { { type: 'eggs', key: 'Gryphon', - text: "Gryphon (Egg)" + text: (function() { + return i18n.t('questGryphonDropGryphonEgg'); + }) }, { type: 'eggs', key: 'Gryphon', - text: "Gryphon (Egg)" + text: (function() { + return i18n.t('questGryphonDropGryphonEgg'); + }) }, { type: 'eggs', key: 'Gryphon', - text: "Gryphon (Egg)" + text: (function() { + return i18n.t('questGryphonDropGryphonEgg'); + }) } ], gp: 25, @@ -11983,12 +11585,12 @@ api.quests = { } }, hedgehog: { - text: "The Hedgebeast", - notes: 'Hedgehogs are a funny group of animals. They are some of the most affectionate pets a Habiteer could own. But rumor has it, if you feed them milk after midnight, they grow quite irritable. And fifty times their size. And Inventrix did just that. Oops.', - completion: 'Your party successfully calmed down the hedgehog! After shrinking down to a normal size, she hobbles away to her eggs. She returns squeaking and nudging some of her eggs along towards your party. Hopefully, these hedgehogs like milk better!', + text: t('questHedgehogText'), + notes: t('questHedgehogNotes'), + completion: t('questHedgehogCompletion'), value: 4, boss: { - name: "Hedgebeast", + name: t('questHedgehogBoss'), hp: 400, str: 1.25 }, @@ -11997,15 +11599,21 @@ api.quests = { { type: 'eggs', key: 'Hedgehog', - text: "Hedgehog (Egg)" + text: (function() { + return i18n.t('questHedgehogDropGryphonEgg'); + }) }, { type: 'eggs', key: 'Hedgehog', - text: "Hedgehog (Egg)" + text: (function() { + return i18n.t('questHedgehogDropGryphonEgg'); + }) }, { type: 'eggs', key: 'Hedgehog', - text: "Hedgehog (Egg)" + text: (function() { + return i18n.t('questHedgehogDropGryphonEgg'); + }) } ], gp: 30, @@ -12043,12 +11651,12 @@ api.quests = { } }, vice1: { - text: "Free Yourself of the Dragon's Influence", - notes: "

They say there lies a terrible evil in the caverns of Mt. Habitica. A monster whose presence twists the wills of the strong heroes of the land, turning them towards bad habits and laziness! The beast is a grand dragon of immense power and comprised of the shadows themselves: Vice, the treacherous Shadow Wyrm. Brave Habiteers, stand up and defeat this foul beast once and for all, but only if you believe you can stand against its immense power.

Vice Part 1:

How can you expect to fight the beast if it already has control over you? Don't fall victim to laziness and vice! Work hard to fight against the dragon's dark influence and dispel his hold on you!

", + text: t('questVice1Text'), + notes: t('questVice1Notes'), value: 4, lvl: 30, boss: { - name: "Vice's Shade", + name: t('questVice1Boss'), hp: 750, str: 1.5 }, @@ -12057,7 +11665,7 @@ api.quests = { { type: 'quests', key: "vice2", - text: "Vice Part 2 (Scroll)" + text: t('questVice1DropVice2Quest') } ], gp: 20, @@ -12065,14 +11673,14 @@ api.quests = { } }, vice2: { - text: "Find the Lair of the Wyrm", - notes: "With Vice's influence over you dispelled, you feel a surge of strength you didn't know you had return to you. Confident in yourselves and your ability to withstand the wyrm's influence, your party makes it's way to Mt. Habitica. You approach the entrance to the mountain's caverns and pause. Swells of shadows, almost like fog, wisp out from the opening. It is near impossible to see anything in front of you. The light from your lanterns seem to end abruptly where the shadows begin. It is said that only magical light can pierce the dragon's infernal haze. If you can find enough light crystals, you could make your way to the dragon.", + text: t('questVice2Text'), + notes: t('questVice2Notes'), value: 4, lvl: 35, previous: 'vice1', collect: { lightCrystal: { - text: 'Light Crystal', + text: t('questVice2CollectLightCrystal'), count: 45 } }, @@ -12081,7 +11689,7 @@ api.quests = { { type: 'quests', key: 'vice3', - text: "Vice Part 3 (Scroll)" + text: t('questVice2DropVice3Quest') } ], gp: 20, @@ -12089,14 +11697,14 @@ api.quests = { } }, vice3: { - text: "Vice Awakens", - notes: "After much effort, your party has discovered Vice's lair. The hulking monster eyes your party with distaste. As shadows swirl around you, a voice whispers through your head, \"More foolish citizens of Habitica come to stop me? Cute. You'd have been wise not to come.\" The scaly titan rears back its head and prepares to attack. This is your chance! Give it everything you've got and defeat Vice once and for all!", - completion: "The shadows dissipate from the cavern and a steely silence falls. My word, you've done it! You have defeated Vice! You and your party may finally breath a sigh of relief. Enjoy your victory, brave Habiteers, but take the lessons you've learned from battling Vice and move forward. There are still habits to be done and potentially worse evils to conquer!", + text: t('questVice3Text'), + notes: t('questVice3Notes'), + completion: t('questVice3Completion'), previous: 'vice2', value: 4, lvl: 40, boss: { - name: "Vice, the Shadow Wyrm", + name: t('questVice3Boss'), hp: 1500, str: 3 }, @@ -12105,23 +11713,23 @@ api.quests = { { type: 'gear', key: "weapon_special_2", - text: "Stephen Weber's Shaft of the Dragon" + text: t('questVice3DropWeaponSpecial2') }, { type: 'eggs', key: 'Dragon', - text: "Dragon (Egg)" + text: t('questVice3DropDragonEgg') }, { type: 'eggs', key: 'Dragon', - text: "Dragon (Egg)" + text: t('questVice3DropDragonEgg') }, { type: 'hatchingPotions', key: 'Shade', - text: "Shade Hatching Potion" + text: t('questVice3DropShadeHatchingPotion') }, { type: 'hatchingPotions', key: 'Shade', - text: "Shade Hatching Potion" + text: t('questVice3DropShadeHatchingPotion') } ], gp: 100, @@ -12211,24 +11819,24 @@ api.userDefaults = { habits: [ { type: 'habit', - text: '1h Productive Work', - notes: 'When you create a new Habit, you can click the Edit icon and choose for it to represent a positive habit, a negative habit, or both. For some Habits, like this one, it only makes sense to gain points.', + text: t('defaultHabit1Text'), + notes: t('defaultHabit1Notes'), value: 0, up: true, down: false, attribute: 'per' }, { type: 'habit', - text: 'Eat Junk Food', - notes: 'For others, it only makes sense to *lose* points.', + text: t('defaultHabit2Text'), + notes: t('defaultHabit2Notes'), value: 0, up: false, down: true, attribute: 'con' }, { type: 'habit', - text: 'Take The Stairs', - notes: 'For the rest, both + and - make sense (stairs = gain, elevator = lose).', + text: t('defaultHabit3Text'), + notes: t('defaultHabit3Notes'), value: 0, up: true, down: true, @@ -12238,66 +11846,35 @@ api.userDefaults = { dailys: [ { type: 'daily', - text: '1h Personal Project', - notes: 'All tasks default to yellow when they are created. This means you will take only moderate damage when they are missed and will gain only a moderate reward when they are completed.', + text: t('defaultDaily1Text'), + notes: t('defaultDaily1Notes'), value: 0, completed: false, repeat: repeat, attribute: 'per' }, { type: 'daily', - text: 'Clean your apartment', - notes: 'Dailies you complete consistently will turn from yellow to green to blue, helping you track your progress. The higher you move up the ladder, the less damage you take for missing and less reward you receive for completing the goal.', + text: t('defaultDaily2Text'), + notes: t('defaultDaily2Notes'), value: 3, completed: false, repeat: repeat, - attribute: 'con' + attribute: 'str' }, { type: 'daily', - text: '45m Reading', - notes: 'If you miss a daily frequently, it will turn darker shades of orange and red. The redder the task is, the more experience and gold it grants for success and the more damage you take for failure. This encourages you to focus on your shortcomings, the reds.', + text: t('defaultDaily3Text'), + notes: t('defaultDaily3Notes'), value: -10, completed: false, repeat: repeat, attribute: 'int' - }, { - type: 'daily', - text: 'Exercise', - notes: 'You can add checklists to dailies and todos. As you progress through the checklist, you will get a proportionate reward.', - checklist: [ - { - completed: true, - text: 'Stretching' - }, { - completed: false, - text: 'Sit-ups' - }, { - completed: false, - text: 'Push-ups' - } - ], - completed: false, - repeat: repeat, - attribute: 'str' } ], todos: [ { type: 'todo', - text: 'Use emojis :+1:', - notes: 'You can use emojis in all your habit, daily, and to-do titles.', - completed: false, - attribute: 'int' - }, { - type: 'todo', - text: '_Learn_ **Markdown** :book:', - notes: 'You can use Markdown for styling your task names.', - completed: false, - attribute: 'int' - }, { - type: 'todo', - text: 'Call Mom :telephone_receiver:', - notes: 'While not completing a to-do in a set period of time will not hurt you, they will gradually change from yellow to red, thus becoming more valuable. This will encourage you to wrap up stale To-Dos.', + text: t('defaultTodo1Text'), + notes: t('defaultTodo1Notes'), value: -3, completed: false, attribute: 'per' @@ -12306,23 +11883,23 @@ api.userDefaults = { rewards: [ { type: 'reward', - text: '1 Episode of Game of Thrones', - notes: 'Custom rewards can come in many forms. Some people will hold off watching their favorite show unless they have the gold to pay for it.', + text: t('defaultReward1Text'), + notes: t('defaultReward1Notes'), value: 20 }, { type: 'reward', - text: 'Cake', - notes: 'Other people just want to enjoy a nice piece of cake. Try to create rewards that will motivate you best.', + text: t('defaultReward2Text'), + notes: t('defaultReward2Notes'), value: 10 } ], tags: [ { - name: 'morning' + name: t('defaultTag1') }, { - name: 'afternoon' + name: t('defaultTag2') }, { - name: 'evening' + name: t('defaultTag3') } ] }; @@ -13264,7 +12841,7 @@ api.wrap = function(user, main) { } return typeof cb === "function" ? cb((item ? { code: 200, - message: "Your " + item.text + " broke." + message: "Your " + (item.text()) + " broke." } : null), user) : void 0; }, reset: function(req, cb) { @@ -13571,10 +13148,10 @@ api.wrap = function(user, main) { } else { if (food.target === potion) { userPets[pet] += 5; - message = "" + egg + " really likes the " + food.text + "!"; + message = "" + egg + " really likes the " + (food.text()) + "!"; } else { userPets[pet] += 2; - message = "" + egg + " eats the " + food.text + " but doesn't seem to enjoy it."; + message = "" + egg + " eats the " + (food.text()) + " but doesn't seem to enjoy it."; } if (userPets[pet] >= 50 && !user.items.mounts[pet]) { evolve(); @@ -13644,7 +13221,7 @@ api.wrap = function(user, main) { user.items.gear.owned[item.key] = true; message = user.fns.handleTwoHanded(item); if (message == null) { - message = "Bought " + item.text + "."; + message = "Bought " + (item.text()) + "."; } if (!user.achievements.ultimateGear && item.last) { user.fns.ultimateGear(); @@ -14034,11 +13611,11 @@ api.wrap = function(user, main) { } if (item.type === "shield" && ((_ref = (weapon = content.gear.flat[user.items.gear[type].weapon])) != null ? _ref.twoHanded : void 0)) { user.items.gear[type].weapon = 'weapon_base_0'; - message = "" + weapon.text + " is two-handed"; + message = "" + (weapon.text()) + " is two-handed"; } if (item.twoHanded) { user.items.gear[type].shield = "shield_base_0"; - message = "" + item.text + " is two-handed"; + message = "" + (item.text()) + " is two-handed"; } return message; }, @@ -14143,7 +13720,7 @@ api.wrap = function(user, main) { } user.items.food[drop.key] += 1; drop.type = 'Food'; - drop.dialog = "You've found " + drop.article + drop.text + "! " + drop.notes; + drop.dialog = "You've found " + drop.article + (drop.text()) + "! " + (drop.notes()); } else if (rarity > .3) { drop = user.fns.randomVal(_.where(content.eggs, { canBuy: true @@ -14153,7 +13730,7 @@ api.wrap = function(user, main) { } user.items.eggs[drop.key]++; 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()); } 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) { @@ -14164,7 +13741,7 @@ api.wrap = function(user, main) { } user.items.hatchingPotions[drop.key]++; drop.type = 'HatchingPotion'; - drop.dialog = "You've found a " + drop.text + " Hatching Potion! " + drop.notes; + drop.dialog = "You've found a " + (drop.text()) + " Hatching Potion! " + (drop.notes()); } user._tmp.drop = drop; user.items.lastDrop.date = +(new Date); @@ -14308,7 +13885,7 @@ api.wrap = function(user, main) { ======= user._tmp.drop = _.defaults(content.quests.vice1, { type: 'Quest', - dialog: "You've found the quest \"" + content.quests.vice1.text + "\"!" + dialog: "You've found the quest \"" + (content.quests.vice1.text()) + "\"!" }); } if (!user.flags.rebirthEnabled && (user.stats.lvl >= 50 || user.achievements.ultimateGear || user.achievements.beastMaster)) { diff --git a/locales/en/content.json b/locales/en/content.json index c6a8d24bc8..f45a29e59a 100644 --- a/locales/en/content.json +++ b/locales/en/content.json @@ -39,7 +39,7 @@ "questEggHedgehogText": "Hedgehog", "questEggHedgehogAdjective": "spiky", - "eggNotes": "Find a hatching potion to pour on this egg, and it will hatch into a <%= eggAdjective %> <%= eggText %>.", + "eggNotes": "Find a hatching potion to pour on this egg, and it will hatch into a <%= eggAdjective() %> <%= eggText() %>.", "hatchingPotionBase": "Base", "hatchingPotionWhite": "White", @@ -52,7 +52,7 @@ "hatchingPotionCottonCandyBlue": "Cotton Candy Blue", "hatchingPotionGolden": "Golden", - "hatchingPotionNotes": "Pour this on an egg, and it will hatch as a <%= potText %> pet.", + "hatchingPotionNotes": "Pour this on an egg, and it will hatch as a <%= potText() %> pet.", "foodMeat": "Meat", "foodMilk": "Milk", diff --git a/locales/en/questsContent.json b/locales/en/questsContent.json index 933a2038cf..776db7edbe 100644 --- a/locales/en/questsContent.json +++ b/locales/en/questsContent.json @@ -33,6 +33,11 @@ "questVice1Boss": "Vice's Shade", "questVice1DropVice2Quest": "Vice Part 2 (Scroll)", + "questVice2Text": "Find the Lair of the Wyrm", + "questVice2Notes": "With Vice's influence over you dispelled, you feel a surge of strength you didn't know you had return to you. Confident in yourselves and your ability to withstand the wyrm's influence, your party makes it's way to Mt. Habitica. You approach the entrance to the mountain's caverns and pause. Swells of shadows, almost like fog, wisp out from the opening. It is near impossible to see anything in front of you. The light from your lanterns seem to end abruptly where the shadows begin. It is said that only magical light can pierce the dragon's infernal haze. If you can find enough light crystals, you could make your way to the dragon.", + "questVice2CollectLightCrystal": "Vice's Shade", + "questVice2DropVice3Quest": "Vice Part 3 (Scroll)", + "questVice3Text": "Vice Awakens", "questVice3Notes": "After much effort, your party has discovered Vice's lair. The hulking monster eyes your party with distaste. As shadows swirl around you, a voice whispers through your head, \"More foolish citizens of Habitica come to stop me? Cute. You'd have been wise not to come.\" The scaly titan rears back its head and prepares to attack. This is your chance! Give it everything you've got and defeat Vice once and for all!", "questVice3Completion": "The shadows dissipate from the cavern and a steely silence falls. My word, you've done it! You have defeated Vice! You and your party may finally breath a sigh of relief. Enjoy your victory, brave Habiteers, but take the lessons you've learned from battling Vice and move forward. There are still habits to be done and potentially worse evils to conquer!", diff --git a/script/content.coffee b/script/content.coffee index 710d826d93..b072fefe9e 100644 --- a/script/content.coffee +++ b/script/content.coffee @@ -2,6 +2,11 @@ _ = require 'lodash' api = module.exports moment = require 'moment' i18n = require './i18n.coffee' +t = (string, vars) -> + (lang) -> + vars ?= lang + i18n.t(string, vars, lang) + ### --------------------------------------------------------------- Gear (Weapons, Armor, Head, Shield) @@ -27,15 +32,15 @@ gear = weapon: base: 0: - text: (-> i18n.t('weaponBase0Text')), notes: (-> i18n.t('weaponBase0Notes')), value:0 + text: t('weaponBase0Text'), notes: t('weaponBase0Notes'), value:0 warrior: - 0: text: (-> i18n.t('weaponWarrior0Text')), notes: (-> i18n.t('weaponWarrior0Notes')), value:0 - 1: text: (-> i18n.t('weaponWarrior1Text')), notes: (-> i18n.t('weaponWarrior1Notes', {str: 3})), str: 3, value:20 - 2: text: (-> i18n.t('weaponWarrior2Text')), notes: (-> i18n.t('weaponWarrior2Notes', {str: 6})), str: 6, value:30 - 3: text: (-> i18n.t('weaponWarrior3Text')), notes: (-> i18n.t('weaponWarrior3Notes', {str: 9})), str: 9, value:45 - 4: text: (-> i18n.t('weaponWarrior4Text')), notes: (-> i18n.t('weaponWarrior4Notes', {str: 12})), str: 12, value:65 - 5: text: (-> i18n.t('weaponWarrior5Text')), notes: (-> i18n.t('weaponWarrior5Notes', {str: 15})), str: 15, value:90 - 6: text: (-> i18n.t('weaponWarrior6Text')), notes: (-> i18n.t('weaponWarrior6Notes', {str: 18})), str: 18, value:120, last: true + 0: text: t('weaponWarrior0Text'), notes: t('weaponWarrior0Notes'), value:0 + 1: text: t('weaponWarrior1Text'), notes: t('weaponWarrior1Notes', {str: 3}), str: 3, value:20 + 2: text: t('weaponWarrior2Text'), notes: t('weaponWarrior2Notes', {str: 6}), str: 6, value:30 + 3: text: t('weaponWarrior3Text'), notes: t('weaponWarrior3Notes', {str: 9}), str: 9, value:45 + 4: text: t('weaponWarrior4Text'), notes: t('weaponWarrior4Notes', {str: 12}), str: 12, value:65 + 5: text: t('weaponWarrior5Text'), notes: t('weaponWarrior5Notes', {str: 15}), str: 15, value:90 + 6: text: t('weaponWarrior6Text'), notes: t('weaponWarrior6Notes', {str: 18}), str: 18, value:120, last: true rogue: #Not using bows at the moment, but they would be easy to add back in to an advanced Armory feature, as Quest drops, etc. #0: twoHanded: true, text: "Practice Bow", notes:'Training weapon. Confers no benefit.', value:0 @@ -45,29 +50,29 @@ gear = #4: twoHanded: true, text: "Icicle Bow", notes:'Fires arrows of piercing cold. Increases STR by 12.', str: 12, value:120 #5: twoHanded: true, text: "Meteor Bow", notes:'Rains flame upon your foes. Increases STR by 16.', str: 16, value:160 #6: twoHanded: true, text: "Golden Bow", notes:'As swift as sunlight and as sharp as lightning. Increases STR by 20.', str: 20, value:200, last: true - 0: text: (-> i18n.t('weaponRogue0Text')), notes: (-> i18n.t('weaponRogue0Notes')), str: 0, value: 0 - 1: text: (-> i18n.t('weaponRogue1Text')), notes: (-> i18n.t('weaponRogue1Notes', {str: 2})), str: 2, value: 20 - 2: text: (-> i18n.t('weaponRogue2Text')), notes: (-> i18n.t('weaponRogue2Notes', {str: 3})), str: 3, value: 35 - 3: text: (-> i18n.t('weaponRogue3Text')), notes: (-> i18n.t('weaponRogue3Notes', {str: 4})), str: 4, value: 50 - 4: text: (-> i18n.t('weaponRogue4Text')), notes: (-> i18n.t('weaponRogue4Notes', {str: 6})), str: 6, value: 70 - 5: text: (-> i18n.t('weaponRogue5Text')), notes: (-> i18n.t('weaponRogue5Notes', {str: 8})), str: 8, value: 90 - 6: text: (-> i18n.t('weaponRogue6Text')), notes: (-> i18n.t('weaponRogue6Notes', {str: 10})), str: 10, value: 120, last: true + 0: text: t('weaponRogue0Text'), notes: t('weaponRogue0Notes'), str: 0, value: 0 + 1: text: t('weaponRogue1Text'), notes: t('weaponRogue1Notes', {str: 2}), str: 2, value: 20 + 2: text: t('weaponRogue2Text'), notes: t('weaponRogue2Notes', {str: 3}), str: 3, value: 35 + 3: text: t('weaponRogue3Text'), notes: t('weaponRogue3Notes', {str: 4}), str: 4, value: 50 + 4: text: t('weaponRogue4Text'), notes: t('weaponRogue4Notes', {str: 6}), str: 6, value: 70 + 5: text: t('weaponRogue5Text'), notes: t('weaponRogue5Notes', {str: 8}), str: 8, value: 90 + 6: text: t('weaponRogue6Text'), notes: t('weaponRogue6Notes', {str: 10}), str: 10, value: 120, last: true wizard: - 0: twoHanded: true, text: (-> i18n.t('weaponWizard0Text')), notes: (-> i18n.t('weaponWizard0Notes')), value:0 - 1: twoHanded: true, text: (-> i18n.t('weaponWizard1Text')), notes: (-> i18n.t('weaponWizard1Notes', {int: 3, per: 1})), int: 3, per: 1, value:30 - 2: twoHanded: true, text: (-> i18n.t('weaponWizard2Text')), notes: (-> i18n.t('weaponWizard2Notes', {int: 6, per: 2})), int: 6, per: 2, value:50 - 3: twoHanded: true, text: (-> i18n.t('weaponWizard3Text')), notes: (-> i18n.t('weaponWizard3Notes', {int: 9, per: 3})), int: 9, per: 3, value:80 - 4: twoHanded: true, text: (-> i18n.t('weaponWizard4Text')), notes: (-> i18n.t('weaponWizard4Notes', {int: 12, per: 5})), int:12, per: 5, value:120 - 5: twoHanded: true, text: (-> i18n.t('weaponWizard5Text')), notes: (-> i18n.t('weaponWizard5Notes', {int: 15, per: 7})), int: 15, per: 7, value:160 - 6: twoHanded: true, text: (-> i18n.t('weaponWizard6Text')), notes: (-> i18n.t('weaponWizard6Notes', {int: 18, per: 10})), int: 18, per: 10, value:200, last: true + 0: twoHanded: true, text: t('weaponWizard0Text'), notes: t('weaponWizard0Notes'), value:0 + 1: twoHanded: true, text: t('weaponWizard1Text'), notes: t('weaponWizard1Notes', {int: 3, per: 1}), int: 3, per: 1, value:30 + 2: twoHanded: true, text: t('weaponWizard2Text'), notes: t('weaponWizard2Notes', {int: 6, per: 2}), int: 6, per: 2, value:50 + 3: twoHanded: true, text: t('weaponWizard3Text'), notes: t('weaponWizard3Notes', {int: 9, per: 3}), int: 9, per: 3, value:80 + 4: twoHanded: true, text: t('weaponWizard4Text'), notes: t('weaponWizard4Notes', {int: 12, per: 5}), int:12, per: 5, value:120 + 5: twoHanded: true, text: t('weaponWizard5Text'), notes: t('weaponWizard5Notes', {int: 15, per: 7}), int: 15, per: 7, value:160 + 6: twoHanded: true, text: t('weaponWizard6Text'), notes: t('weaponWizard6Notes', {int: 18, per: 10}), int: 18, per: 10, value:200, last: true healer: - 0: text: (-> i18n.t('weaponHealer0Text')), notes: (-> i18n.t('weaponHealer0Notes')), value:0 - 1: text: (-> i18n.t('weaponHealer1Text')), notes: (-> i18n.t('weaponHealer1Notes', {int: 2})), int: 2, value:20 - 2: text: (-> i18n.t('weaponHealer2Text')), notes: (-> i18n.t('weaponHealer2Notes', {int: 3})), int: 3, value:30 - 3: text: (-> i18n.t('weaponHealer3Text')), notes: (-> i18n.t('weaponHealer3Notes', {int: 5})), int: 5, value:45 - 4: text: (-> i18n.t('weaponHealer4Text')), notes: (-> i18n.t('weaponHealer4Notes', {int: 7})), int:7, value:65 - 5: text: (-> i18n.t('weaponHealer5Text')), notes: (-> i18n.t('weaponHealer5Notes', {int: 9})), int: 9, value:90 - 6: text: (-> i18n.t('weaponHealer6Text')), notes: (-> i18n.t('weaponHealer6Notes', {int: 11})), int: 11, value:120, last: true + 0: text: t('weaponHealer0Text'), notes: t('weaponHealer0Notes'), value:0 + 1: text: t('weaponHealer1Text'), notes: t('weaponHealer1Notes', {int: 2}), int: 2, value:20 + 2: text: t('weaponHealer2Text'), notes: t('weaponHealer2Notes', {int: 3}), int: 3, value:30 + 3: text: t('weaponHealer3Text'), notes: t('weaponHealer3Notes', {int: 5}), int: 5, value:45 + 4: text: t('weaponHealer4Text'), notes: t('weaponHealer4Notes', {int: 7}), int:7, value:65 + 5: text: t('weaponHealer5Text'), notes: t('weaponHealer5Notes', {int: 9}), int: 9, value:90 + 6: text: t('weaponHealer6Text'), notes: t('weaponHealer6Notes', {int: 11}), int: 11, value:120, last: true special: 0: text: (-> i18n.t('weaponSpecial0Text')), notes: (-> i18n.t('weaponSpecial0Notes', {str: 20})), str: 20, value:150, canOwn: ((u)-> +u.backer?.tier >= 70) 1: text: (-> i18n.t('weaponSpecial1Text')), notes: (-> i18n.t('weaponSpecial1Notes', {attrs: 6})), str: 6, per: 6, con: 6, int: 6, value:170, canOwn: ((u)-> +u.contributor?.level >= 4) @@ -87,35 +92,35 @@ gear = armor: base: - 0: text: (-> i18n.t('armorBase0Text')), notes: (-> i18n.t('armorBase0Notes')), value:0 + 0: text: t('armorBase0Text'), notes: t('armorBase0Notes'), value:0 warrior: #0: text: "Plain Clothing", notes:'Ordinary clothing. Confers no benefit.', value:0 - 1: text: (-> i18n.t('armorWarrior1Text')), notes: (-> i18n.t('armorWarrior1Notes', {con: 3})), con: 3, value:30 - 2: text: (-> i18n.t('armorWarrior2Text')), notes: (-> i18n.t('armorWarrior2Notes', {con: 5})), con: 5, value:45 - 3: text: (-> i18n.t('armorWarrior3Text')), notes: (-> i18n.t('armorWarrior3Notes', {con: 7})), con: 7, value:65 - 4: text: (-> i18n.t('armorWarrior4Text')), notes: (-> i18n.t('armorWarrior4Notes', {con: 9})), con: 9, value:90 - 5: text: (-> i18n.t('armorWarrior5Text')), notes: (-> i18n.t('armorWarrior5Notes', {con: 11})), con: 11, value:120, last: true + 1: text: t('armorWarrior1Text'), notes: t('armorWarrior1Notes', {con: 3}), con: 3, value:30 + 2: text: t('armorWarrior2Text'), notes: t('armorWarrior2Notes', {con: 5}), con: 5, value:45 + 3: text: t('armorWarrior3Text'), notes: t('armorWarrior3Notes', {con: 7}), con: 7, value:65 + 4: text: t('armorWarrior4Text'), notes: t('armorWarrior4Notes', {con: 9}), con: 9, value:90 + 5: text: t('armorWarrior5Text'), notes: t('armorWarrior5Notes', {con: 11}), con: 11, value:120, last: true rogue: #0: text: "Plain Clothing", notes:'Ordinary clothing. Confers no benefit.', value:0 - 1: text: (-> i18n.t('armorRogue1Text')), notes: (-> i18n.t('armorRogue1Notes', {per: 6})), per: 6, value:30 - 2: text: (-> i18n.t('armorRogue2Text')), notes: (-> i18n.t('armorRogue2Notes', {per: 9})), per: 9, value:45 - 3: text: (-> i18n.t('armorRogue3Text')), notes: (-> i18n.t('armorRogue3Notes', {per: 12})), per: 12, value:65 - 4: text: (-> i18n.t('armorRogue4Text')), notes: (-> i18n.t('armorRogue4Notes', {per: 15})), per: 15, value:90 - 5: text: (-> i18n.t('armorRogue5Text')), notes: (-> i18n.t('armorRogue5Notes', {per: 18})), per: 18, value:120, last: true + 1: text: t('armorRogue1Text'), notes: t('armorRogue1Notes', {per: 6}), per: 6, value:30 + 2: text: t('armorRogue2Text'), notes: t('armorRogue2Notes', {per: 9}), per: 9, value:45 + 3: text: t('armorRogue3Text'), notes: t('armorRogue3Notes', {per: 12}), per: 12, value:65 + 4: text: t('armorRogue4Text'), notes: t('armorRogue4Notes', {per: 15}), per: 15, value:90 + 5: text: t('armorRogue5Text'), notes: t('armorRogue5Notes', {per: 18}), per: 18, value:120, last: true wizard: #0: text: "Apprentice Garb", notes:'For students of magic. Confers no benefit.', value:0 - 1: text: (-> i18n.t('armorWizard1Text')), notes: (-> i18n.t('armorWizard1Notes', {int: 2})), int: 2, value:30 - 2: text: (-> i18n.t('armorWizard2Text')), notes: (-> i18n.t('armorWizard2Notes', {int: 4})), int: 4, value:45 - 3: text: (-> i18n.t('armorWizard3Text')), notes: (-> i18n.t('armorWizard3Notes', {int: 6})), int: 6, value:65 - 4: text: (-> i18n.t('armorWizard4Text')), notes: (-> i18n.t('armorWizard4Notes', {int: 9})), int: 9, value:90 - 5: text: (-> i18n.t('armorWizard5Text')), notes: (-> i18n.t('armorWizard5Notes', {int: 12})), int: 12, value:120, last: true + 1: text: t('armorWizard1Text'), notes: t('armorWizard1Notes', {int: 2}), int: 2, value:30 + 2: text: t('armorWizard2Text'), notes: t('armorWizard2Notes', {int: 4}), int: 4, value:45 + 3: text: t('armorWizard3Text'), notes: t('armorWizard3Notes', {int: 6}), int: 6, value:65 + 4: text: t('armorWizard4Text'), notes: t('armorWizard4Notes', {int: 9}), int: 9, value:90 + 5: text: t('armorWizard5Text'), notes: t('armorWizard5Notes', {int: 12}), int: 12, value:120, last: true healer: #0: text: "Novice Robe", notes:'For healers in training. Confers no benefit.', value:0 - 1: text: (-> i18n.t('armorHealer1Text')), notes: (-> i18n.t('armorHealer1Notes', {con: 6})), con: 6, value:30 - 2: text: (-> i18n.t('armorHealer2Text')), notes: (-> i18n.t('armorHealer2Notes', {con: 9})), con: 9, value:45 - 3: text: (-> i18n.t('armorHealer3Text')), notes: (-> i18n.t('armorHealer3Notes', {con: 12})), con: 12, value:65 - 4: text: (-> i18n.t('armorHealer4Text')), notes: (-> i18n.t('armorHealer4Notes', {con: 15})), con: 15, value:90 - 5: text: (-> i18n.t('armorHealer5Text')), notes: (-> i18n.t('armorHealer5Notes', {con: 18})), con: 18, value:120, last: true + 1: text: t('armorHealer1Text'), notes: t('armorHealer1Notes', {con: 6}), con: 6, value:30 + 2: text: t('armorHealer2Text'), notes: t('armorHealer2Notes', {con: 9}), con: 9, value:45 + 3: text: t('armorHealer3Text'), notes: t('armorHealer3Notes', {con: 12}), con: 12, value:65 + 4: text: t('armorHealer4Text'), notes: t('armorHealer4Notes', {con: 15}), con: 15, value:90 + 5: text: t('armorHealer5Text'), notes: t('armorHealer5Notes', {con: 18}), con: 18, value:120, last: true special: 0: text: (-> i18n.t('armorSpecial0Text')), notes: (-> i18n.t('armorSpecial0Notes', {con: 20})), con: 20, value:150, canOwn: ((u)-> +u.backer?.tier >= 45) 1: text: (-> i18n.t('armorSpecial1Text')), notes: (-> i18n.t('armorSpecial1Notes', {attrs: 6})), con: 6, str: 6, per: 6, int: 6, value:170, canOwn: ((u)-> +u.contributor?.level >= 2) @@ -137,35 +142,35 @@ gear = head: base: - 0: text: (-> i18n.t('headBase0Text')), notes: (-> i18n.t('headBase0Notes')), value:0 + 0: text: t('headBase0Text'), notes: t('headBase0Notes'), value:0 warrior: #0: text: "No Helm", notes:'No headgear.', value:0 - 1: text: (-> i18n.t('headWarrior1Text')), notes: (-> i18n.t('headWarrior1Notes', {str: 2})), str: 2, value:15 - 2: text: (-> i18n.t('headWarrior2Text')), notes: (-> i18n.t('headWarrior2Notes', {str: 4})), str: 4, value:25 - 3: text: (-> i18n.t('headWarrior3Text')), notes: (-> i18n.t('headWarrior3Notes', {str: 6})), str: 6, value:40 - 4: text: (-> i18n.t('headWarrior4Text')), notes: (-> i18n.t('headWarrior4Notes', {str: 9})), str: 9, value:60 - 5: text: (-> i18n.t('headWarrior5Text')), notes: (-> i18n.t('headWarrior5Notes', {str: 12})), str: 12, value:80, last: true + 1: text: t('headWarrior1Text'), notes: t('headWarrior1Notes', {str: 2}), str: 2, value:15 + 2: text: t('headWarrior2Text'), notes: t('headWarrior2Notes', {str: 4}), str: 4, value:25 + 3: text: t('headWarrior3Text'), notes: t('headWarrior3Notes', {str: 6}), str: 6, value:40 + 4: text: t('headWarrior4Text'), notes: t('headWarrior4Notes', {str: 9}), str: 9, value:60 + 5: text: t('headWarrior5Text'), notes: t('headWarrior5Notes', {str: 12}), str: 12, value:80, last: true rogue: #0: text: "No Hood", notes:'No headgear.', value:0 - 1: text: (-> i18n.t('headRogue1Text')), notes: (-> i18n.t('headRogue1Notes', {per: 2})), per: 2, value:15 - 2: text: (-> i18n.t('headRogue2Text')), notes: (-> i18n.t('headRogue2Notes', {per: 4})), per: 4, value:25 - 3: text: (-> i18n.t('headRogue3Text')), notes: (-> i18n.t('headRogue3Notes', {per: 6})), per: 6, value:40 - 4: text: (-> i18n.t('headRogue4Text')), notes: (-> i18n.t('headRogue4Notes', {per: 9})), per: 9, value:60 - 5: text: (-> i18n.t('headRogue5Text')), notes: (-> i18n.t('headRogue5Notes', {per: 12})), per: 12, value:80, last: true + 1: text: t('headRogue1Text'), notes: t('headRogue1Notes', {per: 2}), per: 2, value:15 + 2: text: t('headRogue2Text'), notes: t('headRogue2Notes', {per: 4}), per: 4, value:25 + 3: text: t('headRogue3Text'), notes: t('headRogue3Notes', {per: 6}), per: 6, value:40 + 4: text: t('headRogue4Text'), notes: t('headRogue4Notes', {per: 9}), per: 9, value:60 + 5: text: t('headRogue5Text'), notes: t('headRogue5Notes', {per: 12}), per: 12, value:80, last: true wizard: #0: text: "No Hat", notes:'No headgear.', value:0 - 1: text: (-> i18n.t('headWizard1Text')), notes: (-> i18n.t('headWizard1Notes', {per: 2})), per: 2, value:15 - 2: text: (-> i18n.t('headWizard2Text')), notes: (-> i18n.t('headWizard2Notes', {per: 3})), per: 3, value:25 - 3: text: (-> i18n.t('headWizard3Text')), notes: (-> i18n.t('headWizard3Notes', {per: 5})), per: 5, value:40 - 4: text: (-> i18n.t('headWizard4Text')), notes: (-> i18n.t('headWizard4Notes', {per: 7})), per: 7, value:60 - 5: text: (-> i18n.t('headWizard5Text')), notes: (-> i18n.t('headWizard5Notes', {per: 10})), per: 10, value:80, last: true + 1: text: t('headWizard1Text'), notes: t('headWizard1Notes', {per: 2}), per: 2, value:15 + 2: text: t('headWizard2Text'), notes: t('headWizard2Notes', {per: 3}), per: 3, value:25 + 3: text: t('headWizard3Text'), notes: t('headWizard3Notes', {per: 5}), per: 5, value:40 + 4: text: t('headWizard4Text'), notes: t('headWizard4Notes', {per: 7}), per: 7, value:60 + 5: text: t('headWizard5Text'), notes: t('headWizard5Notes', {per: 10}), per: 10, value:80, last: true healer: #0: text: "No Circlet", notes:'No headgear.', value:0 - 1: text: (-> i18n.t('headHealer1Text')), notes: (-> i18n.t('headHealer1Notes', {int: 2})), int: 2, value:15 - 2: text: (-> i18n.t('headHealer2Text')), notes: (-> i18n.t('headHealer2Notes', {int: 3})), int: 3, value:25 - 3: text: (-> i18n.t('headHealer3Text')), notes: (-> i18n.t('headHealer3Notes', {int: 5})), int: 5, value:40 - 4: text: (-> i18n.t('headHealer4Text')), notes: (-> i18n.t('headHealer4Notes', {int: 7})), int: 7, value:60 - 5: text: (-> i18n.t('headHealer5Text')), notes: (-> i18n.t('headHealer5Notes', {int: 9})), int: 9, value:80, last: true + 1: text: t('headHealer1Text'), notes: t('headHealer1Notes', {int: 2}), int: 2, value:15 + 2: text: t('headHealer2Text'), notes: t('headHealer2Notes', {int: 3}), int: 3, value:25 + 3: text: t('headHealer3Text'), notes: t('headHealer3Notes', {int: 5}), int: 5, value:40 + 4: text: t('headHealer4Text'), notes: t('headHealer4Notes', {int: 7}), int: 7, value:60 + 5: text: t('headHealer5Text'), notes: t('headHealer5Notes', {int: 9}), int: 9, value:80, last: true special: 0: text: (-> i18n.t('headSpecial0Text')), notes: (-> i18n.t('headSpecial0Notes', {int: 20})), int: 20, value:150, canOwn: ((u)-> +u.backer?.tier >= 45) 1: text: (-> i18n.t('headSpecial1Text')), notes: (-> i18n.t('headSpecial1Notes', {attrs: 6})), con: 6, str: 6, per: 6, int: 6, value:170, canOwn: ((u)-> +u.contributor?.level >= 3) @@ -182,36 +187,36 @@ gear = springMage: event: events.spring, specialClass: 'wizard', text:'Swiss Cheese Hat', notes:'This hat stores lots of powerful magic! Try not to nibble it. Adds 7 points to PER. Limited Edition 2014 Spring Gear.',value: 40,per: 7 springHealer: event: events.spring, specialClass: 'healer', text:'Crown of Friendship', notes:"This crown symbolizes loyalty and companionship. A dog is an adventurer's best friend, after all! Adds 7 points to INT. Limited Edition 2014 Spring Gear.", value: 40, int: 7 mystery: - 201402: text: (-> i18n.t('headMystery201402Text')), notes: (-> i18n.t('headMystery201402Notes')), mystery:mystery['201402'], value: 10 + 201402: text: t('headMystery201402Text'), notes: t('headMystery201402Notes'), mystery:mystery['201402'], value: 10 shield: base: - 0: text: (-> i18n.t('shieldBase0Text')), notes: (-> i18n.t('shieldBase0Notes')), value:0 + 0: text: t('shieldBase0Text'), notes: t('shieldBase0Notes'), value:0 #changed because this is what shows up for all classes, including those without shields warrior: #0: text: "No Shield", notes:'No shield.', value:0 - 1: text: (-> i18n.t('shieldWarrior1Text')), notes: (-> i18n.t('shieldWarrior1Notes', {con: 2})), con: 2, value:20 - 2: text: (-> i18n.t('shieldWarrior2Text')), notes: (-> i18n.t('shieldWarrior2Notes', {con: 3})), con: 3, value:35 - 3: text: (-> i18n.t('shieldWarrior3Text')), notes: (-> i18n.t('shieldWarrior3Notes', {con: 5})), con: 5, value:50 - 4: text: (-> i18n.t('shieldWarrior4Text')), notes: (-> i18n.t('shieldWarrior4Notes', {con: 7})), con: 7, value:70 - 5: text: (-> i18n.t('shieldWarrior5Text')), notes: (-> i18n.t('shieldWarrior5Notes', {con: 9})), con: 9, value:90, last: true + 1: text: t('shieldWarrior1Text'), notes: t('shieldWarrior1Notes', {con: 2}), con: 2, value:20 + 2: text: t('shieldWarrior2Text'), notes: t('shieldWarrior2Notes', {con: 3}), con: 3, value:35 + 3: text: t('shieldWarrior3Text'), notes: t('shieldWarrior3Notes', {con: 5}), con: 5, value:50 + 4: text: t('shieldWarrior4Text'), notes: t('shieldWarrior4Notes', {con: 7}), con: 7, value:70 + 5: text: t('shieldWarrior5Text'), notes: t('shieldWarrior5Notes', {con: 9}), con: 9, value:90, last: true rogue: - 0: text: (-> i18n.t('weaponRogue0Text')), notes: (-> i18n.t('weaponRogue0Notes')), str: 0, value: 0 - 1: text: (-> i18n.t('weaponRogue1Text')), notes: (-> i18n.t('weaponRogue1Notes', {str: 2})), str: 2, value: 20 - 2: text: (-> i18n.t('weaponRogue2Text')), notes: (-> i18n.t('weaponRogue2Notes', {str: 3})), str: 3, value: 35 - 3: text: (-> i18n.t('weaponRogue3Text')), notes: (-> i18n.t('weaponRogue3Notes', {str: 4})), str: 4, value: 50 - 4: text: (-> i18n.t('weaponRogue4Text')), notes: (-> i18n.t('weaponRogue4Notes', {str: 6})), str: 6, value: 70 - 5: text: (-> i18n.t('weaponRogue5Text')), notes: (-> i18n.t('weaponRogue5Notes', {str: 8})), str: 8, value: 90 - 6: text: (-> i18n.t('weaponRogue6Text')), notes: (-> i18n.t('weaponRogue6Notes', {str: 10})), str: 10, value: 120, last: true + 0: text: t('weaponRogue0Text'), notes: t('weaponRogue0Notes'), str: 0, value: 0 + 1: text: t('weaponRogue1Text'), notes: t('weaponRogue1Notes', {str: 2}), str: 2, value: 20 + 2: text: t('weaponRogue2Text'), notes: t('weaponRogue2Notes', {str: 3}), str: 3, value: 35 + 3: text: t('weaponRogue3Text'), notes: t('weaponRogue3Notes', {str: 4}), str: 4, value: 50 + 4: text: t('weaponRogue4Text'), notes: t('weaponRogue4Notes', {str: 6}), str: 6, value: 70 + 5: text: t('weaponRogue5Text'), notes: t('weaponRogue5Notes', {str: 8}), str: 8, value: 90 + 6: text: t('weaponRogue6Text'), notes: t('weaponRogue6Notes', {str: 10}), str: 10, value: 120, last: true wizard: {} #0: text: "No Shield", notes:'No shield.', def: 0, value:0, last: true healer: #0: text: "No Shield", notes:'No shield.', def: 0, value:0 - 1: text: (-> i18n.t('shieldHealer1Text')), notes: (-> i18n.t('shieldHealer1Notes', {con: 2})), con: 2, value:20 - 2: text: (-> i18n.t('shieldHealer2Text')), notes: (-> i18n.t('shieldHealer2Notes', {con: 4})), con: 4, value:35 - 3: text: (-> i18n.t('shieldHealer3Text')), notes: (-> i18n.t('shieldHealer3Notes', {con: 6})), con: 6, value:50 - 4: text: (-> i18n.t('shieldHealer4Text')), notes: (-> i18n.t('shieldHealer4Notes', {con: 9})), con: 9, value:70 - 5: text: (-> i18n.t('shieldHealer5Text')), notes: (-> i18n.t('shieldHealer5Notes', {con: 12})), con: 12, value:90, last: true + 1: text: t('shieldHealer1Text'), notes: t('shieldHealer1Notes', {con: 2}), con: 2, value:20 + 2: text: t('shieldHealer2Text'), notes: t('shieldHealer2Notes', {con: 4}), con: 4, value:35 + 3: text: t('shieldHealer3Text'), notes: t('shieldHealer3Notes', {con: 6}), con: 6, value:50 + 4: text: t('shieldHealer4Text'), notes: t('shieldHealer4Notes', {con: 9}), con: 9, value:70 + 5: text: t('shieldHealer5Text'), notes: t('shieldHealer5Notes', {con: 12}), con: 12, value:90, last: true special: 0: text: (-> i18n.t('shieldSpecial0Text')), notes: (-> i18n.t('shieldSpecial0Notes', {per: 20})), per: 20, value:150, canOwn: ((u)-> +u.backer?.tier >= 45) 1: text: (-> i18n.t('shieldSpecial1Text')), notes: (-> i18n.t('shieldSpecial1Notes', {attrs: 6})), con: 6, str: 6, per: 6, int:6, value:170, canOwn: ((u)-> +u.contributor?.level >= 5) @@ -228,7 +233,7 @@ gear = base: 0: text: (-> i18n.t('backBase0Text')), notes: (-> i18n.t('backBase0Notes')), value:0 mystery: - 201402: text: (-> i18n.t('backMystery201402Text')), notes: (-> i18n.t('headMystery201402Notes')), mystery:mystery['201402'], value: 10 + 201402: text: t('backMystery201402Text'), notes: t('backMystery201402Notes'), mystery:mystery['201402'], value: 10 201404: text: 'Twilight Butterfly Wings', notes: "Be a butterfly and flutter by!", mystery:mystery['201404'], value: 10 special: wondercon_red: text: 'Mighty Cape', notes: 'Swishes with strength and beauty. Special edition convention armor.', value: 0, mystery:mystery.wondercon @@ -292,7 +297,7 @@ _.each gearTypes, (type) -> --------------------------------------------------------------- ### -api.potion = type: 'potion', text: (-> i18n.t('potionText')), notes: (-> i18n.t('potionNotes')), value: 25, key: 'potion' +api.potion = type: 'potion', text: t('potionText'), notes: t('potionNotes'), value: 25, key: 'potion' ### --------------------------------------------------------------- @@ -338,11 +343,11 @@ api.spells = wizard: fireball: - text: (-> i18n.t('spellWizardFireballText')) + text: t('spellWizardFireballText') mana: 10 lvl: 11 target: 'task' - notes: (-> i18n.t('spellWizardFireballNotes')) + notes: t('spellWizardFireballNotes') cast: (user, target) -> # I seriously have no idea what I'm doing here. I'm just mashing buttons until numbers seem right-ish. Anyone know math? bonus = user._statsComputed.int * user.fns.crit('per') @@ -353,11 +358,11 @@ api.spells = user.party.quest.progress.up += diminishingReturns(bonus*.1,50,30) if user.party.quest.key mpheal: - text: (-> i18n.t('spellWizardMPHealText')) + text: t('spellWizardMPHealText') mana: 30 lvl: 12 target: 'party' - notes: (-> i18n.t('spellWizardMPHealNotes')), + notes: t('spellWizardMPHealNotes'), cast: (user, target)-> _.each target, (member) -> bonus = Math.ceil(user._statsComputed.int * .1) @@ -365,60 +370,60 @@ api.spells = member.stats.mp += bonus earth: - text: (-> i18n.t('spellWizardEarthText')) + text: t('spellWizardEarthText') mana: 35 lvl: 13 target: 'party' - notes: (-> i18n.t('spellWizardEarthNotes')), + notes: t('spellWizardEarthNotes'), cast: (user, target) -> _.each target, (member) -> member.stats.buffs.int ?= 0 member.stats.buffs.int += Math.ceil(user._statsComputed.int * .05) frost: - text: (-> i18n.t('spellWizardFrostText')), + text: t('spellWizardFrostText'), mana: 40 lvl: 14 target: 'self' - notes: (-> i18n.t('spellWizardFrostNotes')), + notes: t('spellWizardFrostNotes'), cast: (user, target) -> user.stats.buffs.streaks = true warrior: smash: - text: (-> i18n.t('spellWarriorSmashText')) + text: t('spellWarriorSmashText') mana: 10 lvl: 11 target: 'task' - notes: (-> i18n.t('spellWarriorSmashNotes')) + notes: t('spellWarriorSmashNotes') cast: (user, target) -> target.value += 2.5 * (user._statsComputed.str / (user._statsComputed.str + 50)) * user.fns.crit('con') user.party.quest.progress.up += Math.ceil(user._statsComputed.str * .2) if user.party.quest.key defensiveStance: - text: (-> i18n.t('spellWarriorDefensiveStanceText')) + text: t('spellWarriorDefensiveStanceText') mana: 25 lvl: 12 target: 'self' - notes: (-> i18n.t('spellWarriorDefensiveStanceNotes')) + notes: t('spellWarriorDefensiveStanceNotes') cast: (user, target) -> user.stats.buffs.con ?= 0 user.stats.buffs.con += Math.ceil(user._statsComputed.con * .05) valorousPresence: - text: (-> i18n.t('spellWarriorValorousPresenceText')) + text: t('spellWarriorValorousPresenceText') mana: 20 lvl: 13 target: 'party' - notes: (-> i18n.t('spellWarriorValorousPresenceNotes')) + notes: t('spellWarriorValorousPresenceNotes') cast: (user, target) -> _.each target, (member) -> member.stats.buffs.str ?= 0 member.stats.buffs.str += Math.ceil(user._statsComputed.str * .05) intimidate: - text: (-> i18n.t('spellWarriorIntimidateText')) + text: t('spellWarriorIntimidateText') mana: 15 lvl: 14 target: 'party' - notes: (-> i18n.t('spellWarriorIntimidateNotes')) + notes: t('spellWarriorIntimidateNotes') cast: (user, target) -> _.each target, (member) -> member.stats.buffs.con ?= 0 @@ -426,20 +431,20 @@ api.spells = rogue: pickPocket: - text: (-> i18n.t('spellRoguePickPocketText')) + text: t('spellRoguePickPocketText') mana: 10 lvl: 11 target: 'task' - notes: (-> i18n.t('spellRoguePickPocketNotes')) + notes: t('spellRoguePickPocketNotes') cast: (user, target) -> bonus = (if target.value < 0 then 1 else target.value+2) + (user._statsComputed.per * 0.5) user.stats.gp += 25 * (bonus / (bonus + 75)) backStab: - text: (-> i18n.t('spellRogueBackStabText')) + text: t('spellRogueBackStabText') mana: 15 lvl: 12 target: 'task' - notes: (-> i18n.t('spellRogueBackStabNotes')) + notes: t('spellRogueBackStabNotes') cast: (user, target) -> _crit = user.fns.crit('str', .3) target.value += _crit * .03 @@ -448,22 +453,22 @@ api.spells = user.stats.gp += bonus # user.party.quest.progress.up += bonus if user.party.quest.key # remove hurting bosses for rogues, seems OP for now toolsOfTrade: - text: (-> i18n.t('spellRogueToolsOfTradeText')) + text: t('spellRogueToolsOfTradeText') mana: 25 lvl: 13 target: 'party' - notes: (-> i18n.t('spellRogueToolsOfTradeNotes')) + notes: t('spellRogueToolsOfTradeNotes') cast: (user, target) -> ## lasts 24 hours ## _.each target, (member) -> member.stats.buffs.per ?= 0 member.stats.buffs.per += Math.ceil(user._statsComputed.per * .03) stealth: - text: (-> i18n.t('spellRogueStealthText')) + text: t('spellRogueStealthText') mana: 45 lvl: 14 target: 'self' - notes: (-> i18n.t('spellRogueStealthNotes')) + notes: t('spellRogueStealthNotes') cast: (user, target) -> user.stats.buffs.stealth ?= 0 ## scales to user's # of dailies; maxes out at 100% at 100 per ## @@ -471,41 +476,41 @@ api.spells = healer: heal: - text: (-> i18n.t('spellHealerHealText')) + text: t('spellHealerHealText') mana: 15 lvl: 11 target: 'self' - notes: (-> i18n.t('spellHealerHealNotes')) + notes: t('spellHealerHealNotes') cast: (user, target) -> user.stats.hp += (user._statsComputed.con + user._statsComputed.int + 5) * .075 user.stats.hp = 50 if user.stats.hp > 50 brightness: - text: (-> i18n.t('spellHealerBrightnessText')) + text: t('spellHealerBrightnessText') mana: 15 lvl: 12 target: 'self' - notes: (-> i18n.t('spellHealerBrightnessNotes')) + notes: t('spellHealerBrightnessNotes') cast: (user, target) -> _.each user.tasks, (target) -> return if target.type is 'reward' target.value += 1.5 * (user._statsComputed.int / (user._statsComputed.int + 40)) protectAura: - text: (-> i18n.t('spellHealerProtectAuraText')) + text: t('spellHealerProtectAuraText') mana: 30 lvl: 13 target: 'party' - notes: (-> i18n.t('spellHealerProtectAuraNotes')) + notes: t('spellHealerProtectAuraNotes') cast: (user, target) -> ## lasts 24 hours ## _.each target, (member) -> member.stats.buffs.con ?= 0 member.stats.buffs.con += Math.ceil(user._statsComputed.con * .15) heallAll: - text: (-> i18n.t('spellHealerHealAllText')) + text: t('spellHealerHealAllText') mana: 25 lvl: 14 target: 'party' - notes: (-> i18n.t('spellHealerHealAllNotes')) + notes: t('spellHealerHealAllNotes') cast: (user, target) -> _.each target, (member) -> member.stats.hp += (user._statsComputed.con + user._statsComputed.int + 5) * .04 @@ -513,11 +518,11 @@ api.spells = special: snowball: - text: (-> i18n.t('spellSpecialSnowballText')) + text: t('spellSpecialSnowballText') mana: 0 value: 1 target: 'user' - notes: (-> i18n.t('spellSpecialSnowballNotes')) + notes: t('spellSpecialSnowballNotes') cast: (user, target) -> target.stats.buffs.snowball = true target.achievements.snowball ?= 0 @@ -525,11 +530,11 @@ api.spells = user.items.special.snowball-- salt: - text: (-> i18n.t('spellSpecialSaltText')) + text: t('spellSpecialSaltText') mana: 0 value: 5 target: 'self' - notes: (-> i18n.t('spellSpecialSaltNotes')) + notes: t('spellSpecialSaltNotes') cast: (user, target) -> user.stats.buffs.snowball = false user.stats.gp -= 5 @@ -554,21 +559,21 @@ api.special = api.spells.special api.dropEggs = # value & other defaults set below - Wolf: text: (-> i18n.t('dropEggWolfText')), adjective: (-> i18n.t('dropEggWolfAdjective')) - TigerCub: text: (-> i18n.t('dropEggTigerCubText')), mountText: (-> i18n.t('dropEggTigerCubMountText')), adjective: (-> i18n.t('dropEggTigerCubAdjective')) - PandaCub: text: (-> i18n.t('dropEggPandaCubText')), mountText: (-> i18n.t('dropEggPandaCubMountText')), adjective: (-> i18n.t('dropEggPandaCubAdjective')) - LionCub: text: (-> i18n.t('dropEggLionCubText')), mountText: (-> i18n.t('dropEggLionCubMountText')), adjective: (-> i18n.t('dropEggLionCubAdjective')) - Fox: text: (-> i18n.t('dropEggFoxText')), adjective: (-> i18n.t('dropEggFoxAdjective')) - FlyingPig: text: (-> i18n.t('dropEggFlyingPigText')), adjective: (-> i18n.t('dropEggFlyingPigAdjective')) - Dragon: text: (-> i18n.t('dropEggDragonText')), adjective: (-> i18n.t('dropEggDragonAdjective')) - Cactus: text: (-> i18n.t('dropEggCactusText')), adjective: (-> i18n.t('dropEggCactusAdjective')) - BearCub: text: (-> i18n.t('dropEggBearCubText')), mountText: (-> i18n.t('dropEggBearCubMountText')), adjective: (-> i18n.t('dropEggBearCubAdjective')) + Wolf: text: t('dropEggWolfText'), adjective: t('dropEggWolfAdjective') + TigerCub: text: t('dropEggTigerCubText'), mountText: t('dropEggTigerCubMountText'), adjective: t('dropEggTigerCubAdjective') + PandaCub: text: t('dropEggPandaCubText'), mountText: t('dropEggPandaCubMountText'), adjective: t('dropEggPandaCubAdjective') + LionCub: text: t('dropEggLionCubText'), mountText: t('dropEggLionCubMountText'), adjective: t('dropEggLionCubAdjective') + Fox: text: t('dropEggFoxText'), adjective: t('dropEggFoxAdjective') + FlyingPig: text: t('dropEggFlyingPigText'), adjective: t('dropEggFlyingPigAdjective') + Dragon: text: t('dropEggDragonText'), adjective: t('dropEggDragonAdjective') + Cactus: text: t('dropEggCactusText'), adjective: t('dropEggCactusAdjective') + BearCub: text: t('dropEggBearCubText'), mountText: t('dropEggBearCubMountText'), adjective: t('dropEggBearCubAdjective') _.each api.dropEggs, (egg,key) -> _.defaults egg, canBuy:true value: 3 key: key - notes: (-> i18n.t('eggNotes', {eggText: egg.text(), eggAdjective: egg.adjective()})) + notes: t('eggNotes', {eggText: egg.text, eggAdjective: egg.adjective}) mountText: egg.text api.questEggs = @@ -582,7 +587,7 @@ _.each api.questEggs, (egg,key) -> canBuy:false value: 3 key: key - notes: (-> i18n.t('eggNotes', {eggText: egg.text(), eggAdjective: egg.adjective()})) + notes: t('eggNotes', {eggText: egg.text, eggAdjective: egg.adjective}) mountText: egg.text api.eggs = _.assign(_.cloneDeep(api.dropEggs), api.questEggs) @@ -599,18 +604,18 @@ api.specialMounts = 'LionCub-Ethereal': true api.hatchingPotions = - Base: value: 2, text: (-> i18n.t('hatchingPotionBase')) - White: value: 2, text: (-> i18n.t('hatchingPotionWhite')) - Desert: value: 2, text: (-> i18n.t('hatchingPotionDesert')) - Red: value: 3, text: (-> i18n.t('hatchingPotionRed')) - Shade: value: 3, text: (-> i18n.t('hatchingPotionShade')) - Skeleton: value: 3, text: (-> i18n.t('hatchingPotionSkeleton')) - Zombie: value: 4, text: (-> i18n.t('hatchingPotionZombie')) - CottonCandyPink: value: 4, text: (-> i18n.t('hatchingPotionCottonCandyPink')) - CottonCandyBlue: value: 4, text: (-> i18n.t('hatchingPotionCottonCandyBlue')) - Golden: value: 5, text: (-> i18n.t('hatchingPotionGolden')) + Base: value: 2, text: t('hatchingPotionBase') + White: value: 2, text: t('hatchingPotionWhite') + Desert: value: 2, text: t('hatchingPotionDesert') + Red: value: 3, text: t('hatchingPotionRed') + Shade: value: 3, text: t('hatchingPotionShade') + Skeleton: value: 3, text: t('hatchingPotionSkeleton') + Zombie: value: 4, text: t('hatchingPotionZombie') + CottonCandyPink: value: 4, text: t('hatchingPotionCottonCandyPink') + CottonCandyBlue: value: 4, text: t('hatchingPotionCottonCandyBlue') + Golden: value: 5, text: t('hatchingPotionGolden') _.each api.hatchingPotions, (pot,key) -> - _.defaults pot, {key, value: 2, notes: (-> i18n.t('hatchingPotionNotes', {potText: pot.text()}))} + _.defaults pot, {key, value: 2, notes: t('hatchingPotionNotes', {potText: pot.text})} api.pets = _.transform api.dropEggs, (m, egg) -> _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> @@ -621,82 +626,82 @@ api.questPets = _.transform api.questEggs, (m, egg) -> m2[egg.key + "-" + pot.key] = true api.food = - Meat: text: (-> i18n.t('foodMeat')), target: 'Base', article: '' - Milk: text: (-> i18n.t('foodMilk')), target: 'White', article: '' - Potatoe: text: (-> i18n.t('foodPotatoe')), target: 'Desert', article: 'a ' - Strawberry: text: (-> i18n.t('foodStrawberry')), target: 'Red', article: 'a ' - Chocolate: text: (-> i18n.t('foodChocolate')), target: 'Shade', article: '' - Fish: text: (-> i18n.t('foodFish')), target: 'Skeleton', article: 'a ' - RottenMeat: text: (-> i18n.t('foodRottenMeat')), target: 'Zombie', article: '' - CottonCandyPink: text: (-> i18n.t('foodCottonCandyPink')), target: 'CottonCandyPink', article: '' - CottonCandyBlue: text: (-> i18n.t('foodCottonCandyBlue')), target: 'CottonCandyBlue', article: '' + Meat: text: t('foodMeat'), target: 'Base', article: '' + Milk: text: t('foodMilk'), target: 'White', article: '' + Potatoe: text: t('foodPotatoe'), target: 'Desert', article: 'a ' + Strawberry: text: t('foodStrawberry'), target: 'Red', article: 'a ' + Chocolate: text: t('foodChocolate'), target: 'Shade', article: '' + Fish: text: t('foodFish'), target: 'Skeleton', article: 'a ' + RottenMeat: text: t('foodRottenMeat'), target: 'Zombie', article: '' + CottonCandyPink: text: t('foodCottonCandyPink'), target: 'CottonCandyPink', article: '' + CottonCandyBlue: text: t('foodCottonCandyBlue'), target: 'CottonCandyBlue', article: '' # FIXME what to do with these extra items? Should we add "targets" (plural) for food instead of singular, so we don't have awkward extras? #Cheese: text: 'Cheese', target: 'Golden' #Watermelon: text: 'Watermelon', target: 'Golden' #SeaWeed: text: 'SeaWeed', target: 'Golden' - Cake_Skeleton: canBuy: false, text: (-> i18n.t('foodCakeSkeleton')), target: 'Skeleton', article: '' - Cake_Base: canBuy: false, text: (-> i18n.t('foodCakeBase')), target: 'Base', article: '' - Cake_CottonCandyBlue: canBuy: false, text: (-> i18n.t('foodCakeCottonCandyBlue')), target: 'CottonCandyBlue', article: '' - Cake_CottonCandyPink: canBuy: false, text: (-> i18n.t('foodCakeCottonCandyPink')), target: 'CottonCandyPink', article: '' - Cake_Shade: canBuy: false, text: (-> i18n.t('foodCakeShade')), target: 'Shade', article: '' - Cake_White: canBuy: false, text: (-> i18n.t('foodCakeWhite')), target: 'White', article: '' - Cake_Golden: canBuy: false, text: (-> i18n.t('foodCakeGolden')), target: 'Golden', article: '' - Cake_Zombie: canBuy: false, text: (-> i18n.t('foodCakeZombie')), target: 'Zombie', article: '' - Cake_Desert: canBuy: false, text: (-> i18n.t('foodCakeDesert')), target: 'Desert', article: '' - Cake_Red: canBuy: false, text: (-> i18n.t('foodCakeRed')), target: 'Red', article: '' + Cake_Skeleton: canBuy: false, text: t('foodCakeSkeleton'), target: 'Skeleton', article: '' + Cake_Base: canBuy: false, text: t('foodCakeBase'), target: 'Base', article: '' + Cake_CottonCandyBlue: canBuy: false, text: t('foodCakeCottonCandyBlue'), target: 'CottonCandyBlue', article: '' + Cake_CottonCandyPink: canBuy: false, text: t('foodCakeCottonCandyPink'), target: 'CottonCandyPink', article: '' + Cake_Shade: canBuy: false, text: t('foodCakeShade'), target: 'Shade', article: '' + Cake_White: canBuy: false, text: t('foodCakeWhite'), target: 'White', article: '' + Cake_Golden: canBuy: false, text: t('foodCakeGolden'), target: 'Golden', article: '' + Cake_Zombie: canBuy: false, text: t('foodCakeZombie'), target: 'Zombie', article: '' + Cake_Desert: canBuy: false, text: t('foodCakeDesert'), target: 'Desert', article: '' + Cake_Red: canBuy: false, text: t('foodCakeRed'), target: 'Red', article: '' # Tests hack, put honey last so the faux random picks it up in unit tests - Honey: text: (-> i18n.t('foodHoney')), target: 'Golden', article: '' + Honey: text: t('foodHoney'), target: 'Golden', article: '' - Saddle: text: (-> i18n.t('foodSaddleText')), value: 5, notes: (-> i18n.t('foodSaddleNotes')) + Saddle: text: t('foodSaddleText'), value: 5, notes: t('foodSaddleNotes') _.each api.food, (food,key) -> - _.defaults food, {value: 1, key, notes: (-> i18n.t('foodNotes')), canBuy:true} + _.defaults food, {value: 1, key, notes: t('foodNotes'), canBuy:true} api.quests = evilsanta: canBuy:false - text: (-> i18n.t('questEvilSantaText')) # title of the quest (eg, Deep into Vice's Layer) - notes: (-> i18n.t('questEvilSantaNotes')) - completion: (-> i18n.t('questEvilSantaCompletion')) + text: t('questEvilSantaText') # title of the quest (eg, Deep into Vice's Layer) + notes: t('questEvilSantaNotes') + completion: t('questEvilSantaCompletion') value: 4 # Gem cost to buy, GP sell-back #mechanic: enum['perfectDailies', ...] boss: - name: (-> i18n.t('questEvilSantaBoss')) # name of the boss himself (eg, Vice) + name: t('questEvilSantaBoss') # name of the boss himself (eg, Vice) hp: 300 str: 1 # Multiplier of users' missed dailies drop: items: [ - {type: 'mounts', key: 'BearCub-Polar', text: (-> i18n.t('questEvilSantaDropBearCubPolarMount'))} + {type: 'mounts', key: 'BearCub-Polar', text: t('questEvilSantaDropBearCubPolarMount')} ] gp: 20 exp: 100 # Exp bonus from defeating the boss evilsanta2: canBuy:false - text: (-> i18n.t('questEvilSanta2Text')) - notes: (-> i18n.t('questEvilSanta2Notes')) - completion: (-> i18n.t('questEvilSanta2Completion')) + text: t('questEvilSanta2Text') + notes: t('questEvilSanta2Notes') + completion: t('questEvilSanta2Completion') value: 4 previous: 'evilsanta' collect: - tracks: text: (-> i18n.t('questEvilSanta2CollectTracks')), count: 20 - branches: text: (-> i18n.t('questEvilSanta2CollectBranches')), count: 10 + tracks: text: t('questEvilSanta2CollectTracks'), count: 20 + branches: text: t('questEvilSanta2CollectBranches'), count: 10 drop: items: [ - {type: 'pets', key: 'BearCub-Polar', text: (-> i18n.t('questEvilSanta2DropBearCubPolarPet'))} + {type: 'pets', key: 'BearCub-Polar', text: t('questEvilSanta2DropBearCubPolarPet')} ] gp: 20 exp: 100 gryphon: - text: (-> i18n.t('questGryphonText')) - notes: (-> i18n.t('questGryphonNotes')) - completion: (-> i18n.t('questGryphonCompletion')) + text: t('questGryphonText') + notes: t('questGryphonNotes') + completion: t('questGryphonCompletion') value: 4 # Gem cost to buy, GP sell-back boss: - name: (-> i18n.t('questGryphonBoss')) # name of the boss himself (eg, Vice) + name: t('questGryphonBoss') # name of the boss himself (eg, Vice) hp: 300 str: 1.5 # Multiplier of users' missed dailies drop: @@ -709,12 +714,12 @@ api.quests = exp: 125 hedgehog: - text: (-> i18n.t('questHedgehogText')) - notes: (-> i18n.t('questHedgehogNotes')) - completion: (-> i18n.t('questHedgehogCompletion')) + text: t('questHedgehogText') + notes: t('questHedgehogNotes') + completion: t('questHedgehogCompletion') value: 4 # Gem cost to buy, GP sell-back boss: - name: (-> i18n.t('questHedgehogBoss')) # name of the boss himself (eg, Vice) + name: t('questHedgehogBoss') # name of the boss himself (eg, Vice) hp: 400 str: 1.25 # Multiplier of users' missed dailies drop: @@ -747,54 +752,54 @@ api.quests = vice1: - text: (-> i18n.t('questVice1Text')) - notes: (-> i18n.t('questVice1Notes')) + text: t('questVice1Text') + notes: t('questVice1Notes') value: 4 lvl: 30 boss: - name: (-> i18n.t('questVice1Boss')) + name: t('questVice1Boss') hp: 750 str: 1.5 drop: items: [ - {type: 'quests', key: "vice2", text: (-> i18n.t('questVice1DropVice2Quest'))} + {type: 'quests', key: "vice2", text: t('questVice1DropVice2Quest')} ] gp: 20 exp: 100 vice2: - text: (-> i18n.t('questVice2Text')) - notes: (-> i18n.t('questVice2Notes')) + text: t('questVice2Text') + notes: t('questVice2Notes') value: 4 lvl: 35 previous: 'vice1' collect: - lightCrystal: text: (-> i18n.t('questVice2CollectLightCrystal')), count: 45 + lightCrystal: text: t('questVice2CollectLightCrystal'), count: 45 drop: items: [ - {type: 'quests', key: 'vice3', text: (-> i18n.t('questVice2DropVice3Quest'))} + {type: 'quests', key: 'vice3', text: t('questVice2DropVice3Quest')} ] gp: 20 exp: 75 vice3: - text: (-> i18n.t('questVice3Text')) - notes: (-> i18n.t('questVice3Notes')) - completion: (-> i18n.t('questVice3Completion')) + text: t('questVice3Text') + notes: t('questVice3Notes') + completion: t('questVice3Completion') previous: 'vice2' value: 4 lvl: 40 boss: - name: (-> i18n.t('questVice3Boss')) + name: t('questVice3Boss') hp: 1500 str: 3 drop: items: [ - {type: 'gear', key: "weapon_special_2", text: (-> i18n.t('questVice3DropWeaponSpecial2'))} - {type: 'eggs', key: 'Dragon', text: (-> i18n.t('questVice3DropDragonEgg'))} - {type: 'eggs', key: 'Dragon', text: (-> i18n.t('questVice3DropDragonEgg'))} - {type: 'hatchingPotions', key: 'Shade', text: (-> i18n.t('questVice3DropShadeHatchingPotion'))} - {type: 'hatchingPotions', key: 'Shade', text: (-> i18n.t('questVice3DropShadeHatchingPotion'))} + {type: 'gear', key: "weapon_special_2", text: t('questVice3DropWeaponSpecial2')} + {type: 'eggs', key: 'Dragon', text: t('questVice3DropDragonEgg')} + {type: 'eggs', key: 'Dragon', text: t('questVice3DropDragonEgg')} + {type: 'hatchingPotions', key: 'Shade', text: t('questVice3DropShadeHatchingPotion')} + {type: 'hatchingPotions', key: 'Shade', text: t('questVice3DropShadeHatchingPotion')} ] gp: 100 exp: 1000 @@ -830,28 +835,28 @@ _.each api.quests, (v,key) -> repeat = {m:true,t:true,w:true,th:true,f:true,s:true,su:true} api.userDefaults = habits: [ - {type: 'habit', text: (-> i18n.t('defaultHabit1Text')), notes: (-> i18n.t('defaultHabit1Notes')), value: 0, up: true, down: false, attribute: 'per' } - {type: 'habit', text: (-> i18n.t('defaultHabit2Text')), notes: (-> i18n.t('defaultHabit2Notes')), value: 0, up: false, down: true, attribute: 'con'} - {type: 'habit', text: (-> i18n.t('defaultHabit3Text')), notes: (-> i18n.t('defaultHabit3Notes')), value: 0, up: true, down: true, attribute: 'str'} + {type: 'habit', text: t('defaultHabit1Text'), notes: t('defaultHabit1Notes'), value: 0, up: true, down: false, attribute: 'per' } + {type: 'habit', text: t('defaultHabit2Text'), notes: t('defaultHabit2Notes'), value: 0, up: false, down: true, attribute: 'con'} + {type: 'habit', text: t('defaultHabit3Text'), notes: t('defaultHabit3Notes'), value: 0, up: true, down: true, attribute: 'str'} ] dailys: [ - {type: 'daily', text: (-> i18n.t('defaultDaily1Text')), notes: (-> i18n.t('defaultDaily1Notes')), value: 0, completed: false, repeat: repeat, attribute: 'per' } - {type: 'daily', text: (-> i18n.t('defaultDaily2Text')), notes: (-> i18n.t('defaultDaily2Notes')), value: 3, completed: false, repeat: repeat, attribute: 'str' } - {type: 'daily', text: (-> i18n.t('defaultDaily3Text')), notes: (-> i18n.t('defaultDaily3Notes')), value: -10, completed: false, repeat: repeat, attribute: 'int' } + {type: 'daily', text: t('defaultDaily1Text'), notes: t('defaultDaily1Notes'), value: 0, completed: false, repeat: repeat, attribute: 'per' } + {type: 'daily', text: t('defaultDaily2Text'), notes: t('defaultDaily2Notes'), value: 3, completed: false, repeat: repeat, attribute: 'str' } + {type: 'daily', text: t('defaultDaily3Text'), notes: t('defaultDaily3Notes'), value: -10, completed: false, repeat: repeat, attribute: 'int' } ] todos: [ - {type: 'todo', text: (-> i18n.t('defaultTodo1Text')), notes: (-> i18n.t('defaultTodo1Notes')), value: -3, completed: false, attribute: 'per' } + {type: 'todo', text: t('defaultTodo1Text'), notes: t('defaultTodo1Notes'), value: -3, completed: false, attribute: 'per' } ] rewards: [ - {type: 'reward', text: (-> i18n.t('defaultReward1Text')), notes: (-> i18n.t('defaultReward1Notes')), value: 20 } - {type: 'reward', text: (-> i18n.t('defaultReward2Text')), notes: (-> i18n.t('defaultReward2Notes')), value: 10 } + {type: 'reward', text: t('defaultReward1Text'), notes: t('defaultReward1Notes'), value: 20 } + {type: 'reward', text: t('defaultReward2Text'), notes: t('defaultReward2Notes'), value: 10 } ] tags: [ - {name: (-> i18n.t('defaultTag1'))} - {name: (-> i18n.t('defaultTag2'))} - {name: (-> i18n.t('defaultTag3'))} + {name: t('defaultTag1')} + {name: t('defaultTag2')} + {name: t('defaultTag3')} ]