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.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/npc/items/legacy_heal.txt b/npc/items/legacy_heal.txt
index 3ff0e1e60..62b501668 100644
--- a/npc/items/legacy_heal.txt
+++ b/npc/items/legacy_heal.txt
@@ -22,6 +22,10 @@ OnUse:
end;
}
+ // Decide the healing bonus type. We have four types: S, L, G and M
+ // By default, we use 'S'
+ .@skill = SC_S_LIFEPOTION;
+
// minimum between @min and bVit / 2 * BaseLevel / 10
@min = min(@max, readparam(bVit) * BaseLevel / 20);
@val1 = rand(@min, @max);
@@ -30,8 +34,8 @@ OnUse:
// We now have @val1 (new effect), @delay (new delay)
// But do we have .@v and .@d (old effect and delay)?
- .@v=getstatus(getarg(0), 1);
- .@d=getstatus(getarg(0), 4) * 1000;
+ .@v=getstatus(.@skill, 1);
+ .@d=getstatus(.@skill, 4) * 1000;
// If there WAS an effect previously, get ponderate average
if (.@v > 0) {
@@ -39,10 +43,6 @@ OnUse:
@delay=ponderate_avg(@delay, @val1, .@d, .@v);
}
- // Decide the healing bonus type. We have four types: S, L, G and M
- // By default, we use 'S'
- .@skill = SC_S_LIFEPOTION;
-
// Apply the effect and finish
sc_end .@skill;
sc_start2 .@skill, @delay, @val1, 1;