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:
Rene Cordier
2018-08-17 17:06:58 +07:00
committed by Matteo Pagliazzi
parent ec444384f4
commit 7630c02e13
4 changed files with 68 additions and 1 deletions

View File

@@ -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;
},