fix modifiers - they're helping the user too much :)

This commit is contained in:
Tyler Renelle 2013-02-08 15:45:29 -05:00
parent 6299188bf6
commit f71948ecdf
2 changed files with 23 additions and 25 deletions

View file

@ -3,35 +3,35 @@ _ = require 'underscore'
items = module.exports.items =
weapon: [
{index: 0, text: "Training Sword", classes: "weapon_0", notes:'Training weapon.', modifier: 0.01, value:0}
{index: 1, text: "Sword", classes:'weapon_1', notes:'Increases experience gain by 3%.', modifier: 0.3, value:20}
{index: 2, text: "Axe", classes:'weapon_2', notes:'Increases experience gain by 6%.', modifier: 0.6, value:30}
{index: 3, text: "Morningstar", classes:'weapon_3', notes:'Increases experience gain by 9%.', modifier: 0.9, value:45}
{index: 4, text: "Blue Sword", classes:'weapon_4', notes:'Increases experience gain by 12%.', modifier: 1.2, value:65}
{index: 5, text: "Red Sword", classes:'weapon_5', notes:'Increases experience gain by 15%.', modifier: 1.5, value:90}
{index: 6, text: "Golden Sword", classes:'weapon_6', notes:'Increases experience gain by 18%.', modifier: 1.8, value:120}
{index: 1, text: "Sword", classes:'weapon_1', notes:'Increases experience gain by 3%.', modifier: 0.03, value:20}
{index: 2, text: "Axe", classes:'weapon_2', notes:'Increases experience gain by 6%.', modifier: 0.06, value:30}
{index: 3, text: "Morningstar", classes:'weapon_3', notes:'Increases experience gain by 9%.', modifier: 0.09, value:45}
{index: 4, text: "Blue Sword", classes:'weapon_4', notes:'Increases experience gain by 12%.', modifier: 0.12, value:65}
{index: 5, text: "Red Sword", classes:'weapon_5', notes:'Increases experience gain by 15%.', modifier: 0.15, value:90}
{index: 6, text: "Golden Sword", classes:'weapon_6', notes:'Increases experience gain by 18%.', modifier: 0.18, value:120}
]
armor: [
{index: 0, text: "Cloth Armor", classes: 'armor_0', notes:'Training armor.', modifier: 0.01, value:0}
{index: 1, text: "Leather Armor", classes: 'armor_1', notes:'Decreases HP loss by 3%.', modifier: 0.3, value:30}
{index: 2, text: "Chain Mail", classes: 'armor_2', notes:'Decreases HP loss by 6%.', modifier: 0.6, value:45}
{index: 3, text: "Plate Mail", classes: 'armor_3', notes:'Decreases HP loss by 9%.', modifier: 0.9, value:65}
{index: 4, text: "Red Armor", classes: 'armor_4', notes:'Decreases HP loss by 12%.', modifier: 1.2, value:90}
{index: 5, text: "Golden Armor", classes: 'armor_5', notes:'Decreases HP loss by 15%.', modifier: 1.5, value:120}
{index: 1, text: "Leather Armor", classes: 'armor_1', notes:'Decreases HP loss by 2%.', modifier: 0.02, value:30}
{index: 2, text: "Chain Mail", classes: 'armor_2', notes:'Decreases HP loss by 3%.', modifier: 0.03, value:45}
{index: 3, text: "Plate Mail", classes: 'armor_3', notes:'Decreases HP loss by 4%.', modifier: 0.04, value:65}
{index: 4, text: "Red Armor", classes: 'armor_4', notes:'Decreases HP loss by 5%.', modifier: 0.05, value:90}
{index: 5, text: "Golden Armor", classes: 'armor_5', notes:'Decreases HP loss by 6%.', modifier: 0.06, value:120}
]
head: [
{index: 0, text: "No Helm", classes: 'head_0', notes:'Training armor.', modifier: 0.01, value:0}
{index: 1, text: "Leather Helm", classes: 'head_1', notes:'Decreases HP loss by 3%.', modifier: 0.3, value:30}
{index: 2, text: "Chain Coif", classes: 'head_2', notes:'Decreases HP loss by 6%.', modifier: 0.6, value:45}
{index: 3, text: "Plate Helm", classes: 'head_3', notes:'Decreases HP loss by 9%.', modifier: 0.9, value:65}
{index: 4, text: "Red Helm", classes: 'head_4', notes:'Decreases HP loss by 12%.', modifier: 1.2, value:90}
{index: 5, text: "Golden Helm", classes: 'head_5', notes:'Decreases HP loss by 15%.', modifier: 1.5, value:120}
{index: 0, text: "No Helm", classes: 'head_0', notes:'Training helm.', modifier: 0.01, value:0}
{index: 1, text: "Leather Helm", classes: 'head_1', notes:'Decreases HP loss by 2%.', modifier: 0.02, value:30}
{index: 2, text: "Chain Coif", classes: 'head_2', notes:'Decreases HP loss by 3%.', modifier: 0.03, value:45}
{index: 3, text: "Plate Helm", classes: 'head_3', notes:'Decreases HP loss by 4%.', modifier: 0.04, value:65}
{index: 4, text: "Red Helm", classes: 'head_4', notes:'Decreases HP loss by 5%.', modifier: 0.05, value:90}
{index: 5, text: "Golden Helm", classes: 'head_5', notes:'Decreases HP loss by 6%.', modifier: 0.06, value:120}
]
shield: [
{index: 0, text: "Wooden Shield", classes: 'shield_0', notes:'Training armor.', modifier: 0.01, value:0}
{index: 1, text: "Buckler", classes: 'shield_1', notes:'Decreases HP loss by 3%.', modifier: 0.3, value:30}
{index: 2, text: "Enforced Shield", classes: 'shield_2', notes:'Decreases HP loss by 6%.', modifier: 0.6, value:45}
{index: 3, text: "Red Shield", classes: 'shield_3', notes:'Decreases HP loss by 9%.', modifier: 0.9, value:65}
{index: 4, text: "Golden Shield", classes: 'shield_4', notes:'Decreases HP loss by 12%.', modifier: 1.2, value:90}
{index: 0, text: "Wooden Shield", classes: 'shield_0', notes:'Training shield.', modifier: 0.01, value:0}
{index: 1, text: "Buckler", classes: 'shield_1', notes:'Decreases HP loss by 2%.', modifier: 0.02, value:30}
{index: 2, text: "Enforced Shield", classes: 'shield_2', notes:'Decreases HP loss by 3%.', modifier: 0.3, value:45}
{index: 3, text: "Red Shield", classes: 'shield_3', notes:'Decreases HP loss by 4%.', modifier: 0.04, value:65}
{index: 4, text: "Golden Shield", classes: 'shield_4', notes:'Decreases HP loss by 5%.', modifier: 0.05, value:90}
]
potion: {type: 'potion', text: "Potion", notes: "Recover 15 HP", value: 25, classes: 'potion'}
reroll: {type: 'reroll', text: "Re-Roll", classes: 'reroll', notes: "Resets your tasks. When you're struggling and everything's red, use for a clean slate.", value:0 }

View file

@ -5,7 +5,7 @@ helpers = require './helpers'
browser = require './browser'
schema = require './schema'
items = require './items'
MODIFIER = .03 # each new level, armor, weapon add 3% modifier (this number may change)
MODIFIER = .02 # each new level, armor, weapon add 2% modifier (this number may change)
user = undefined
model = undefined
@ -23,7 +23,6 @@ expModifier = (value, modifiers = {}) ->
weapon = modifiers.weapon || user.get('items.weapon')
lvl = modifiers.lvl || user.get('stats.lvl')
dmg = items.items.weapon[weapon].modifier # each new weapon increases exp gain
debugger
dmg += (lvl-1) * MODIFIER # same for lvls
modified = value + (value * dmg)
return modified
@ -37,7 +36,6 @@ hpModifier = (value, modifiers = {}) ->
armor = modifiers.armor || user.get('items.armor')
head = modifiers.head || user.get('items.head')
shield = modifiers.shield || user.get('items.shield')
debugger
lvl = modifiers.lvl || user.get('stats.lvl')
ac = items.items.armor[armor].modifier + items.items.head[head].modifier + items.items.shield[shield].modifier # each new armor decreases HP loss
ac += (lvl-1) * MODIFIER # same for lvls