summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/items/rand_sc_heal.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt
index c3aef8c0..8fe893e6 100644
--- a/npc/items/rand_sc_heal.txt
+++ b/npc/items/rand_sc_heal.txt
@@ -34,13 +34,24 @@
@val1 += (.@old_val1 * .@old_delay) / @delay;
}
}
+ else
+ {
+ @val1 = @val3;
+ }
return;
}
OnUse:
if (@delay <= 0) close;
- @val1 = rand (@min, @max) / @delay;
+ // minimum between @min and bVit / 2 * BaseLevel / 10
+ .@vitality_bonus = min (@min, readparam (bVit) * BaseLevel / 20);
+ .@rand_heal_val = rand (@min, @max);
+
+ // val1 is the heal value without the vitality bonus
+ @val1 = .@rand_heal_val / @delay;
+ @val3 = (.@rand_heal_val + .@vitality_bonus) / @delay;
+
if (@val1 <= 0) close;
@delay *= 1000; // Put the delay in ms