diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-05-19 19:00:05 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-05-19 19:00:05 -0300 |
commit | 4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113 (patch) | |
tree | bdaec893e42793f3d38bf8a8b9071234dc900a84 /npc/items | |
parent | f92b2d13b09cc87736b15a878f2d0255f7474433 (diff) | |
download | serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.tar.gz serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.tar.bz2 serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.tar.xz serverdata-4196c9f78f2e05ae832bc4be7d3b3c9b2b01f113.zip |
Fix more bugs on healing items
Diffstat (limited to 'npc/items')
-rw-r--r-- | npc/items/legacy_heal.txt | 5 | ||||
-rw-r--r-- | npc/items/rand_sc_heal.txt | 2 |
2 files changed, 4 insertions, 3 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 diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt index 1bf582444..41ea3b3a7 100644 --- a/npc/items/rand_sc_heal.txt +++ b/npc/items/rand_sc_heal.txt @@ -57,7 +57,7 @@ function script ItHeal2 { @val1 = rand2(.@min, .@max); // Calculate delay if it was not given - if (.@delay < 0) { + if (.@delay <= 0) { .@delay=1 + ((.@type*3)/2); } |