Browse Source

Merge branch '76-augment-friendly-stat-name' into 'staging'

Fixes 76

See merge request !38
tags/v0.1.2^2
Big Bad Waffle 7 years ago
parent
commit
71f14d08ec
2 changed files with 10 additions and 3 deletions
  1. +4
    -1
      src/server/items/enchanter.js
  2. +6
    -2
      src/server/items/generators/stats.js

+ 4
- 1
src/server/items/enchanter.js View File

@@ -45,7 +45,10 @@ define([
var value = item.enchantedStats[p]; var value = item.enchantedStats[p];


if (item.stats[p]) { if (item.stats[p]) {
result.addStatMsgs.push('-' + value + ' ' + p);
result.addStatMsgs.push({
stat: p,
value: -value
});
item.stats[p] -= value; item.stats[p] -= value;
if (item.stats[p] <= 0) if (item.stats[p] <= 0)
delete item.stats[p]; delete item.stats[p];


+ 6
- 2
src/server/items/generators/stats.js View File

@@ -245,8 +245,12 @@ define([
value = Math.ceil(random.norm(statBlueprint.min, statBlueprint.max)); value = Math.ceil(random.norm(statBlueprint.min, statBlueprint.max));


if (blueprint.statCount) { if (blueprint.statCount) {
if (result)
result.addStatMsgs.push('+' + value + ' ' + stat);
if (result) {
result.addStatMsgs.push({
stat: stat,
value: value
});
}


if (!item.enchantedStats) if (!item.enchantedStats)
item.enchantedStats = {}; item.enchantedStats = {};


Loading…
Cancel
Save