mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
Fixing healing light not being castable when user full hp (#10603)
* Fixing healing light not being castable on server and client sides when user has already full health Adding integration test for spell cast of healing light when full health Adding test for heal cast if user has full health * Fixing ESLint syntax in the spells test files
This commit is contained in:
committed by
Matteo Pagliazzi
parent
ec444384f4
commit
7630c02e13
@@ -211,6 +211,7 @@ spells.healer = {
|
||||
target: 'self',
|
||||
notes: t('spellHealerHealNotes'),
|
||||
cast (user) {
|
||||
if (user.stats.hp >= 50) throw new NotAuthorized(t('messageHealthAlreadyMax')(user.language));
|
||||
user.stats.hp += (statsComputed(user).con + statsComputed(user).int + 5) * 0.075;
|
||||
if (user.stats.hp > 50) user.stats.hp = 50;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user