passive-stats balancing round 2
This commit is contained in:
Vendored
+3
-3
@@ -11577,14 +11577,14 @@ var process=require("__browserify_process");(function() {
|
||||
var afterStreak, crit, gpMod, intMod, streakBonus;
|
||||
crit = user.fns.predictableRandom() <= .03 ? 1.5 + (.05 * user._statsComputed.str) : 1;
|
||||
intMod = 1 + (user._statsComputed.int * .075);
|
||||
stats.exp += Math.round(delta * intMod * task.priority * crit);
|
||||
stats.exp += Math.round(delta * intMod * task.priority * crit * 7.5);
|
||||
gpMod = delta * task.priority * crit;
|
||||
gpMod *= 1 + user._statsComputed.per * .03;
|
||||
gpMod *= 1 + user._statsComputed.per * .06;
|
||||
return stats.gp += task.streak ? (streakBonus = task.streak / 100 + 1, afterStreak = gpMod * streakBonus, gpMod > 0 ? user._tmp.streakBonus = afterStreak - gpMod : void 0, afterStreak) : gpMod;
|
||||
};
|
||||
subtractPoints = function() {
|
||||
var conMod, hpMod;
|
||||
conMod = 1 - (user._statsComputed.con / 100);
|
||||
conMod = 1 - (user._statsComputed.con / 250);
|
||||
if (conMod < .1) {
|
||||
conMod = 0.1;
|
||||
}
|
||||
|
||||
+3
-3
@@ -689,13 +689,13 @@ api.wrap = (user) ->
|
||||
# ===== Intelligence =====
|
||||
# TODO Increases Experience gain by .2% per point.
|
||||
intMod = 1 + (user._statsComputed.int * .075)
|
||||
stats.exp += Math.round(delta * intMod * task.priority * crit)
|
||||
stats.exp += Math.round(delta * intMod * task.priority * crit * 7.5)
|
||||
|
||||
# GP modifier
|
||||
gpMod = delta * task.priority * crit
|
||||
# ===== PERCEPTION =====
|
||||
# TODO Increases Gold gained from tasks by .3% per point.
|
||||
gpMod *= (1 + user._statsComputed.per *.03)
|
||||
gpMod *= (1 + user._statsComputed.per *.06)
|
||||
stats.gp +=
|
||||
if task.streak
|
||||
streakBonus = task.streak / 100 + 1 # eg, 1-day streak is 1.1, 2-day is 1.2, etc
|
||||
@@ -708,7 +708,7 @@ api.wrap = (user) ->
|
||||
subtractPoints = ->
|
||||
# ===== CONSTITUTION =====
|
||||
# TODO Decreases HP loss from bad habits / missed dailies by 0.5% per point.
|
||||
conMod = 1 - (user._statsComputed.con / 100)
|
||||
conMod = 1 - (user._statsComputed.con / 250)
|
||||
conMod = 0.1 if conMod < .1
|
||||
hpMod = delta * conMod * task.priority
|
||||
stats.hp += Math.round(hpMod * 10) / 10 # round to 1dp
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
shared = require '../script/index.coffee'
|
||||
_ = require 'lodash'
|
||||
|
||||
id = shared.uuid()
|
||||
user =
|
||||
stats: {class: 'warrior', buffs: {per:0,int:0,con:0,str:0}}
|
||||
items:
|
||||
eggs: {}
|
||||
hatchingPotions: {}
|
||||
food: {}
|
||||
gear:
|
||||
equipped:
|
||||
weapon: 'weapon_warrior_4'
|
||||
armor: 'armor_warrior_4'
|
||||
shield: 'shield_warrior_4'
|
||||
head: 'head_warrior_4'
|
||||
habits: [
|
||||
shared.taskDefaults({id, value: -4})
|
||||
]
|
||||
dailys: []
|
||||
todos: []
|
||||
rewards: []
|
||||
|
||||
shared.wrap(user)
|
||||
s = user.stats
|
||||
console.log "lvl\t\texp\t\thp\t\tgp\t\ttask.value"
|
||||
_.times 10, (n) ->
|
||||
i = n*10 + 1
|
||||
_.merge user.stats, {exp:0, gp:0, hp:50, lvl:i, str:i, con:i, per:i, int:i, mp: 50}
|
||||
user.tasks[id].value = 0
|
||||
delta = user.ops.score params:{id, direction:'up'}
|
||||
console.log "#{s.lvl}\t\t#{s.exp}/#{shared.tnl(user.stats.lvl)}\t\t#{s.hp}\t\t#{s.gp.toFixed(2)}\t\t#{user.tasks[id].value.toFixed(2)} (↑ Δ#{delta.toFixed(2)})"
|
||||
|
||||
user.tasks[id].value = 0
|
||||
delta = user.ops.score params:{id, direction:'down'}
|
||||
console.log "#{s.lvl}\t\t#{s.exp}/#{shared.tnl(user.stats.lvl)}\t\t#{s.hp}\t\t#{s.gp.toFixed(2)}\t\t#{user.tasks[id].value.toFixed(2)} (↓ Δ#{delta.toFixed(2)})"
|
||||
console.log '------------------------------------------------------------'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user