summaryrefslogtreecommitdiff
path: root/npc/items/legacy_heal.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/items/legacy_heal.txt')
-rw-r--r--npc/items/legacy_heal.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/items/legacy_heal.txt b/npc/items/legacy_heal.txt
index f9e737234..2f3484080 100644
--- a/npc/items/legacy_heal.txt
+++ b/npc/items/legacy_heal.txt
@@ -30,11 +30,12 @@ function script ItHeal {
.@skill = SC_S_LIFEPOTION;
// Vitality can improve the healing amount
- .@min = max(.@max, .@min + (.@min * readparam2(bVit) / 100));
+ .@min = min(.@max, .@min + (.@min * readparam2(bVit) / 100));
.@max = .@max + (.@max * readparam2(bVit) / 240);
// Obtain the real healing
- @val1 = rand2(.@min, .@max);
+ @val1 = rand2(.@min, .@max) / .@delay;
+ debugmes "Heal %d-%d/%d = %d", .@min, .@max, .@delay, @val1;
.@delay *= 1000; // Put the delay in ms