mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
Diminish critical hit bonus towards 450%
This commit is contained in:
parent
3d2c7e8854
commit
af130a701c
1 changed files with 3 additions and 1 deletions
|
|
@ -1158,7 +1158,9 @@ api.wrap = (user, main=true) ->
|
|||
|
||||
crit: (stat='str', chance=.03) ->
|
||||
#console.log("Crit Chance:"+chance*(1+user._statsComputed[stat]/100))
|
||||
if user.fns.predictableRandom() <= chance*(1+user._statsComputed[stat]/100) then 1.5 + (.02*user._statsComputed[stat])
|
||||
s = user._statsComputed[stat]
|
||||
if user.fns.predictableRandom() <= chance*(1 + s/100)
|
||||
1.5 + 4*s/(s + 200)
|
||||
else 1
|
||||
|
||||
###
|
||||
|
|
|
|||
Loading…
Reference in a new issue