mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
* Moved critical hit calculation from _addPoints() to _calculateDelta(). Added user as an input argument to _calculateDelta() so for critical hit calculation
* Changed test to expect task value of 1.5 after critical hit
* Revert "Moved critical hit calculation from _addPoints() to _calculateDelta(). Added user as an input argument to _calculateDelta() so for critical hit calculation"
This reverts commit 51b8ab6498.
* Moved critical hit calculation to _changeTaskValue(). Use value stored in user._tmp.crit in _addPoints()
* Test is no longer affected by critical hits
* Removed unneeded comment
* Added WIP test of critical hits
* Want the crit function to return 2 to test critical hits
* Changed crit function to export as a function within an object so that it can be stubbed for testing. References to the crit() function were updated to call crit.crit() instead
* Added test for increased experience on critical hits
This commit is contained in:
committed by
Keith Holliday
parent
fa024e071b
commit
016447ec77
@@ -294,7 +294,7 @@ api.wrap = function wrapUser (user, main = true) {
|
||||
user.fns = {
|
||||
handleTwoHanded: _.partial(importedFns.handleTwoHanded, user),
|
||||
predictableRandom: _.partial(importedFns.predictableRandom, user),
|
||||
crit: _.partial(importedFns.crit, user),
|
||||
crit: _.partial(importedFns.crit.crit, user),
|
||||
randomDrop: _.partial(importedFns.randomDrop, user),
|
||||
autoAllocate: _.partial(importedFns.autoAllocate, user),
|
||||
updateStats: _.partial(importedFns.updateStats, user),
|
||||
|
||||
Reference in New Issue
Block a user