From 4681fc6c96ccefc64f836867ab807a6e2bc7aeed Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Thu, 17 Sep 2015 08:08:09 -0500 Subject: [PATCH] Move card types to separate file --- common/script/content/card-types.js | 22 ++++++++++++++++++++++ common/script/content/index.coffee | 16 +--------------- 2 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 common/script/content/card-types.js diff --git a/common/script/content/card-types.js b/common/script/content/card-types.js new file mode 100644 index 0000000000..e86672875b --- /dev/null +++ b/common/script/content/card-types.js @@ -0,0 +1,22 @@ +let cardTypes = { + greeting: { + key: 'greeting', + messageOptions: 4, + yearRound: true + }, + nye: { + key: 'nye', + messageOptions: 5 + }, + thankyou: { + key: 'thankyou', + messageOptions: 4, + yearRound: true + }, + valentine: { + key: 'valentine', + messageOptions: 4 + } +}; + +module.exports = cardTypes; diff --git a/common/script/content/index.coffee b/common/script/content/index.coffee index 19d3ce6d9f..554e4204f2 100644 --- a/common/script/content/index.coffee +++ b/common/script/content/index.coffee @@ -549,21 +549,7 @@ api.gearTypes = gearTypes api.spells = require('./spells/index.js') -api.cardTypes = - greeting: - key: 'greeting' - messageOptions: 4 - yearRound: true - nye: - key: 'nye' - messageOptions: 5 - thankyou: - key: 'thankyou' - messageOptions: 4 - yearRound: true - valentine: - key: 'valentine' - messageOptions: 4 +api.cardTypes = require('./card-types') # Intercept all spells to reduce user.stats.mp after casting the spell _.each api.spells, (spellClass) ->