From 4a6c380dc3986cdc113918d416282f6260b2d3b8 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Tue, 22 Sep 2015 19:58:18 -0500 Subject: [PATCH] Set up warrior set --- common/script/src/content/gear/head.js | 46 +------ .../script/src/content/gear/sets/warrior.js | 115 ++++++++++++++---- common/script/src/content/gear/shield.js | 46 +------ common/script/src/content/gear/weapon.js | 59 +-------- 4 files changed, 102 insertions(+), 164 deletions(-) diff --git a/common/script/src/content/gear/head.js b/common/script/src/content/gear/head.js index d8cb6ef301..541dfec262 100644 --- a/common/script/src/content/gear/head.js +++ b/common/script/src/content/gear/head.js @@ -1,6 +1,8 @@ import {translator as t} from '../helpers'; import events from '../events'; +import {head as warriorHead} from './sets/warrior'; + let head = { base: { 0: { @@ -9,49 +11,7 @@ let head = { value: 0 } }, - warrior: { - 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 - } - }, + warrior: warriorHead, rogue: { 1: { text: t('headRogue1Text'), diff --git a/common/script/src/content/gear/sets/warrior.js b/common/script/src/content/gear/sets/warrior.js index 7ce3a65a08..c4e13d4f84 100644 --- a/common/script/src/content/gear/sets/warrior.js +++ b/common/script/src/content/gear/sets/warrior.js @@ -1,46 +1,117 @@ -import {translator as t} from '../../helpers'; +import {generateGearSet} from '../../helpers'; import events from '../../events'; -export var armor = { +let armor = { 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 } }; + +let head = { + 1: { + str: 2, + value: 15 + }, + 2: { + str: 4, + value: 25 + }, + 3: { + str: 6, + value: 40 + }, + 4: { + str: 9, + value: 60 + }, + 5: { + str: 12, + value: 80, + last: true + } +}; + +let shield = { + 1: { + con: 2, + value: 20 + }, + 2: { + con: 3, + value: 35 + }, + 3: { + con: 5, + value: 50 + }, + 4: { + con: 7, + value: 70 + }, + 5: { + con: 9, + value: 90, + last: true + } +}; + +let weapon = { + 0: { + value: 1 + }, + 1: { + str: 3, + value: 20 + }, + 2: { + str: 6, + value: 30 + }, + 3: { + str: 9, + value: 45 + }, + 4: { + str: 12, + value: 65 + }, + 5: { + str: 15, + value: 90 + }, + 6: { + str: 18, + value: 120, + last: true + } +}; + +generateGearSet(armor, {setName: 'warrior', gearType: 'armor'}); +generateGearSet(head, {setName: 'warrior', gearType: 'head'}); +generateGearSet(shield, {setName: 'warrior', gearType: 'shield'}); +generateGearSet(weapon, {setName: 'warrior', gearType: 'weapon'}); + +export default { + armor: armor, + head: head, + shield: shield, + weapon: weapon, +}; diff --git a/common/script/src/content/gear/shield.js b/common/script/src/content/gear/shield.js index 51fc546937..bbfdf7c8cd 100644 --- a/common/script/src/content/gear/shield.js +++ b/common/script/src/content/gear/shield.js @@ -1,6 +1,8 @@ import {translator as t} from '../helpers'; import events from '../events'; +import {shield as warriorShield} from './sets/warrior'; + let shield = { base: { 0: { @@ -9,49 +11,7 @@ let shield = { value: 0 } }, - warrior: { - 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 - } - }, + warrior: warriorShield, rogue: { 0: { text: t('weaponRogue0Text'), diff --git a/common/script/src/content/gear/weapon.js b/common/script/src/content/gear/weapon.js index 571b0d3e1d..67f9f7c80e 100644 --- a/common/script/src/content/gear/weapon.js +++ b/common/script/src/content/gear/weapon.js @@ -1,6 +1,8 @@ import {translator as t} from '../helpers'; import events from '../events'; +import {weapon as warriorWeapon} from './sets/warrior'; + let weapon = { base: { 0: { @@ -9,62 +11,7 @@ let weapon = { value: 0 } }, - warrior: { - 0: { - text: t('weaponWarrior0Text'), - notes: t('weaponWarrior0Notes'), - value: 1 - }, - 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 - } - }, + warrior: warriorWeapon, rogue: { 0: { text: t('weaponRogue0Text'),