mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 00:09:41 +00:00
add pickpocket change from PR by brandonjreid: https://github.com/HabitRPG/habitrpg-shared/pull/331/files#diff-652dbbf3d459e90a3de1a122c063bb6bL502
This commit is contained in:
parent
afef118200
commit
9f77819d94
1 changed files with 4 additions and 2 deletions
|
|
@ -445,6 +445,8 @@ api.gearTypes = gearTypes
|
|||
#
|
||||
diminishingReturns = (bonus, max, halfway=max/2) -> max*(bonus/(bonus+halfway))
|
||||
|
||||
calculateBonus = (value, stat, crit=1, stat_scale=0.5) -> (if value < 0 then 1 else value+1) + (stat * stat_scale * crit)
|
||||
|
||||
api.spells =
|
||||
|
||||
wizard:
|
||||
|
|
@ -543,8 +545,8 @@ api.spells =
|
|||
target: 'task'
|
||||
notes: t('spellRoguePickPocketNotes')
|
||||
cast: (user, target) ->
|
||||
bonus = (if target.value < 0 then 1 else target.value+2) + (user._statsComputed.per * 0.5)
|
||||
user.stats.gp += 25 * (bonus / (bonus + 75))
|
||||
bonus = calculateBonus(target.value, user._statsComputed.per)
|
||||
user.stats.gp += diminishingReturns(bonus, 25, 75)
|
||||
backStab:
|
||||
text: t('spellRogueBackStabText')
|
||||
mana: 15
|
||||
|
|
|
|||
Loading…
Reference in a new issue