From 2635db9e51307a727fd99d11fd40e08f7ce2f01b Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Mon, 6 Jan 2014 18:10:36 -0700 Subject: [PATCH] winter: weapons should be 2nd best, not 1st. Some refactoring --- dist/habitrpg-shared.js | 115 +++++++++++++--------------------------- script/content.coffee | 34 ++++++------ 2 files changed, 55 insertions(+), 94 deletions(-) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 73e99c9a5c..083d175097 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -9167,7 +9167,7 @@ var global=self;/** },{}],5:[function(require,module,exports){ (function() { - var api, diminishingReturns, gear, moment, repeat, _; + var api, diminishingReturns, events, gear, moment, repeat, _; _ = require('lodash'); @@ -9183,6 +9183,13 @@ var global=self;/** */ + events = { + winter: { + start: '2013-12-31', + end: '2014-02-01' + } + }; + gear = { weapon: { base: { @@ -9430,58 +9437,46 @@ var global=self;/** }) }, yeti: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), text: "Yeti-Tamer Spear", - notes: 'Limited Edition 2013 Winter Gear! This spear allows its user to command any yeti. Increases STR by 18.', - str: 18, - value: 120 + notes: 'Limited Edition 2013 Winter Gear! This spear allows its user to command any yeti. Increases STR by 15.', + str: 15, + value: 90 }, ski: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === '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 10.', - str: 10, - value: 120 + 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.', + str: 8, + value: 90 }, candycane: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'wizard'; }), twoHanded: true, text: "Candy Cane Staff", - notes: "Limited Edition 2013 Winter Gear! A powerful mage's staff. Powerfully DELICIOUS, we mean! Two-handed weapon. Increases INT by 18 and PER by 9.", - int: 18, - per: 9, - value: 200 + notes: "Limited Edition 2013 Winter Gear! A powerful mage's staff. Powerfully DELICIOUS, we mean! Two-handed weapon. Increases INT by 15 and PER by 7.", + int: 15, + per: 7, + value: 160 }, snowflake: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'healer'; }), text: "Snowflake Wand", - notes: 'Limited Edition 2013 Winter Gear! This wand sparkles with unlimited healing power. Increases INT by 11.', - int: 11, - value: 120 + notes: 'Limited Edition 2013 Winter Gear! This wand sparkles with unlimited healing power. Increases INT by 9.', + int: 9, + value: 90 } } }, @@ -9661,10 +9656,7 @@ var global=self;/** }) }, yeti: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), @@ -9674,10 +9666,7 @@ var global=self;/** value: 90 }, ski: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'rogue'; }), @@ -9687,10 +9676,7 @@ var global=self;/** value: 90 }, candycane: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'wizard'; }), @@ -9700,10 +9686,7 @@ var global=self;/** value: 90 }, snowflake: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'healer'; }), @@ -9890,19 +9873,13 @@ var global=self;/** }) }, nye: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, text: "Absurd Party Hat", notes: "You've received an Absurd Party Hat! Wear it with pride while ringing in the New Year!", value: 0 }, yeti: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), @@ -9912,10 +9889,7 @@ var global=self;/** value: 60 }, ski: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'rogue'; }), @@ -9925,10 +9899,7 @@ var global=self;/** value: 60 }, candycane: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'wizard'; }), @@ -9938,10 +9909,7 @@ var global=self;/** value: 60 }, snowflake: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'healer'; }), @@ -10097,10 +10065,7 @@ var global=self;/** }) }, yeti: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'warrior'; }), @@ -10110,10 +10075,7 @@ var global=self;/** value: 70 }, ski: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'rogue'; }), @@ -10123,10 +10085,7 @@ var global=self;/** value: 70 }, snowflake: { - event: { - start: '2013-12-31', - end: '2014-02-01' - }, + event: events.winter, canOwn: (function(u) { return u.stats["class"] === 'healer'; }), diff --git a/script/content.coffee b/script/content.coffee index 4d41293597..9914d699ee 100644 --- a/script/content.coffee +++ b/script/content.coffee @@ -9,6 +9,8 @@ moment = require 'moment' --------------------------------------------------------------- ### +events = + winter: {start:'2013-12-31',end:'2014-02-01'} gear = weapon: @@ -61,10 +63,10 @@ gear = 3: text: "Mustaine's Milestone Mashing Morning Star", notes:"Meetings, monsters, malaise: managed! Mash! Increases STR, INT, and CON by 17 each.", str: 17, int: 17, con: 17, value:200, canOwn: ((u)-> +u.backer?.tier >= 300) # Winter event gear - yeti: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Spear", notes:'Limited Edition 2013 Winter Gear! This spear allows its user to command any yeti. Increases STR by 18.', str: 18, value:120 - ski: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is '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 10.', str: 10, value: 120 - candycane: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'wizard' ), twoHanded: true, text: "Candy Cane Staff", notes:"Limited Edition 2013 Winter Gear! A powerful mage's staff. Powerfully DELICIOUS, we mean! Two-handed weapon. Increases INT by 18 and PER by 9.", int: 18, per: 9, value:200 - snowflake: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Wand", notes:'Limited Edition 2013 Winter Gear! This wand sparkles with unlimited healing power. Increases INT by 11.', int: 11, value:120 + yeti: event: events.winter, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Spear", notes:'Limited Edition 2013 Winter Gear! This spear allows its user to command any yeti. Increases STR by 15.', str: 15, value:90 + ski: event: events.winter, canOwn: ((u)->u.stats.class is '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.', str: 8, value: 90 + candycane: event: events.winter, canOwn: ((u)->u.stats.class is 'wizard' ), twoHanded: true, text: "Candy Cane Staff", notes:"Limited Edition 2013 Winter Gear! A powerful mage's staff. Powerfully DELICIOUS, we mean! Two-handed weapon. Increases INT by 15 and PER by 7.", int: 15, per: 7, value:160 + snowflake: event: events.winter, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Wand", notes:'Limited Edition 2013 Winter Gear! This wand sparkles with unlimited healing power. Increases INT by 9.', int: 9, value:90 armor: base: @@ -103,10 +105,10 @@ gear = 2: text: "Jean Chalard's Noble Tunic", notes:'Makes you extra fluffy! Increases CON and INT by 25 each.', int: 25, con: 25, value:200, canOwn: ((u)-> +u.backer?.tier >= 300) #Winter event - yeti: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Robe", notes:'Limited Edition 2013 Winter Gear! Fuzzy and fierce. Increases CON by 9.', con: 9, value:90 - ski: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'rogue' ), text: "Ski-sassin Parka", notes:'Limited Edition 2013 Winter Gear! Full of secret daggers and ski trail maps. Increases PER by 15.', per: 15, value:90 - candycane: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'wizard' ), text: "Candy Cane Robe", notes:'Limited Edition 2013 Winter Gear! Spun from sugar and silk. Increases INT by 9.', int: 9, value:90 - snowflake: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Robe", notes:'Limited Edition 2013 Winter Gear! A robe to keep you warm, even in a blizzard. Increases CON by 15.', con: 15, value:90 + yeti: event: events.winter, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Robe", notes:'Limited Edition 2013 Winter Gear! Fuzzy and fierce. Increases CON by 9.', con: 9, value:90 + ski: event: events.winter, canOwn: ((u)->u.stats.class is 'rogue' ), text: "Ski-sassin Parka", notes:'Limited Edition 2013 Winter Gear! Full of secret daggers and ski trail maps. Increases PER by 15.', per: 15, value:90 + candycane: event: events.winter, canOwn: ((u)->u.stats.class is 'wizard' ), text: "Candy Cane Robe", notes:'Limited Edition 2013 Winter Gear! Spun from sugar and silk. Increases INT by 9.', int: 9, value:90 + snowflake: event: events.winter, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Robe", notes:'Limited Edition 2013 Winter Gear! A robe to keep you warm, even in a blizzard. Increases CON by 15.', con: 15, value:90 head: base: @@ -145,11 +147,11 @@ gear = 2: text: "Nameless Helm", notes:'A testament to those who gave of themselves while asking nothing in return. Increases INT and STR by 25 each.', int: 25, str: 25, value:200, canOwn: ((u)-> +u.backer?.tier >= 300) #Winter event - nye: event: {start:'2013-12-31',end:'2014-02-01'}, text: "Absurd Party Hat", notes:"You've received an Absurd Party Hat! Wear it with pride while ringing in the New Year!", value: 0 - yeti: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Helm", notes:'Limited Edition 2013 Winter Gear! An adorably fearsome hat. Increases STR by 9.', str: 9, value:60 - ski: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is '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.", per: 9, value:60 - candycane: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is '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.", per: 7, value:60 - snowflake: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Crown", notes:'Limited Edition 2013 Winter Gear! The wearer of this crown is never cold. Increases INT by 7.', int: 7, value:60 + nye: event: events.winter, text: "Absurd Party Hat", notes:"You've received an Absurd Party Hat! Wear it with pride while ringing in the New Year!", value: 0 + yeti: event: events.winter, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Helm", notes:'Limited Edition 2013 Winter Gear! An adorably fearsome hat. Increases STR by 9.', str: 9, value:60 + ski: event: events.winter, canOwn: ((u)->u.stats.class is '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.", per: 9, value:60 + candycane: event: events.winter, canOwn: ((u)->u.stats.class is '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.", per: 7, value:60 + snowflake: event: events.winter, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Crown", notes:'Limited Edition 2013 Winter Gear! The wearer of this crown is never cold. Increases INT by 7.', int: 7, value:60 shield: base: @@ -183,9 +185,9 @@ gear = 1: text: "Crystal Shield", notes:'Shatters arrows and deflects the words of naysayers. Increases all attributes by 6.', con: 6, str: 6, per: 6, int:6, value:170, canOwn: ((u)-> +u.contributor?.level >= 5) #Winter event - yeti: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Shield", notes:'Limited Edition 2013 Winter Gear! This shield reflects light from the snow. Increases CON by 7.', con: 7, value:70 - ski: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is '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 CON by 9.', con: 9, value:70 - snowflake: event: {start:'2013-12-31',end:'2014-02-01'}, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Shield", notes:'Limited Edition 2013 Winter Gear! Every shield is unique. Increases CON by 9.', con: 9, value:70 + yeti: event: events.winter, canOwn: ((u)->u.stats.class is 'warrior' ), text: "Yeti-Tamer Shield", notes:'Limited Edition 2013 Winter Gear! This shield reflects light from the snow. Increases CON by 7.', con: 7, value:70 + ski: event: events.winter, canOwn: ((u)->u.stats.class is '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 CON by 9.', con: 9, value:70 + snowflake: event: events.winter, canOwn: ((u)->u.stats.class is 'healer' ), text: "Snowflake Shield", notes:'Limited Edition 2013 Winter Gear! Every shield is unique. Increases CON by 9.', con: 9, value:70 ### The gear is exported as a tree (defined above), and a flat list (eg, {weapon_healer_1: .., shield_special_0: ...}) since