mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
classes: add .3*PER to chanceMultiplier in drops. Add .5+(.05*STR) to
crits (.03 chance) This is a temporary until we get all the numbers worked out. @SabreCat
This commit is contained in:
parent
953e062cbe
commit
64db3041da
2 changed files with 13 additions and 5 deletions
8
dist/habitrpg-shared.js
vendored
8
dist/habitrpg-shared.js
vendored
|
|
@ -11508,10 +11508,11 @@ var process=require("__browserify_process");(function() {
|
|||
});
|
||||
};
|
||||
addPoints = function() {
|
||||
var afterStreak, gpMod, intMod, streakBonus;
|
||||
var afterStreak, crit, gpMod, intMod, streakBonus;
|
||||
crit = user.fns.predictableRandom() <= .03 ? 1.5 + (.05 * user._statsComputed.str) : 1;
|
||||
intMod = 1 + (user._statsComputed.int / 100);
|
||||
stats.exp += Math.round(delta * XP * intMod * task.priority);
|
||||
gpMod = delta * task.priority;
|
||||
stats.exp += Math.round(delta * XP * intMod * task.priority * crit);
|
||||
gpMod = delta * task.priority * crit;
|
||||
gpMod *= user._statsComputed.per * .3;
|
||||
return stats.gp += task.streak ? (streakBonus = task.streak / 100 + 1, afterStreak = gpMod * streakBonus, gpMod > 0 ? user._tmp.streakBonus = afterStreak - gpMod : void 0, afterStreak) : gpMod;
|
||||
};
|
||||
|
|
@ -11702,6 +11703,7 @@ var process=require("__browserify_process");(function() {
|
|||
chanceMultiplier = Math.abs(delta);
|
||||
chanceMultiplier *= priority;
|
||||
chanceMultiplier += streak;
|
||||
chanceMultiplier += user._statsComputed.per * .3;
|
||||
max = 0.75;
|
||||
a = 0.1;
|
||||
alpha = a * max * chanceMultiplier / (a * chanceMultiplier + max);
|
||||
|
|
|
|||
|
|
@ -667,12 +667,17 @@ api.wrap = (user) ->
|
|||
delta += nextDelta
|
||||
|
||||
addPoints = ->
|
||||
# Critical
|
||||
crit =
|
||||
if user.fns.predictableRandom() <= .03 then 1.5 + (.05*user._statsComputed.str)
|
||||
else 1
|
||||
|
||||
# Exp Modifier
|
||||
intMod = 1 + (user._statsComputed.int / 100)
|
||||
stats.exp += Math.round(delta * XP * intMod * task.priority)
|
||||
stats.exp += Math.round(delta * XP * intMod * task.priority * crit)
|
||||
|
||||
# GP modifier
|
||||
gpMod = delta * task.priority
|
||||
gpMod = delta * task.priority * crit
|
||||
gpMod *= (user._statsComputed.per *.3) # Factor in PER
|
||||
stats.gp +=
|
||||
if task.streak
|
||||
|
|
@ -833,6 +838,7 @@ api.wrap = (user) ->
|
|||
chanceMultiplier = Math.abs(delta)
|
||||
chanceMultiplier *= priority # multiply chance by reddness
|
||||
chanceMultiplier += streak # streak bonus
|
||||
chanceMultiplier += user._statsComputed.per*.3
|
||||
|
||||
# Temporary solution to lower the maximum drop chance to 75 percent. More thorough
|
||||
# overhaul of drop changes is needed. See HabitRPG/habitrpg#1922 for details.
|
||||
|
|
|
|||
Loading…
Reference in a new issue