summaryrefslogtreecommitdiff
path: root/npc/config/magic.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-09-13 22:24:30 -0300
committerJesusaves <cpntb1@ymail.com>2020-09-13 22:24:30 -0300
commitd14b00ad3b384f9cb559aa84f1aa55ee578eaae9 (patch)
treec891de4ea3df81bd7babb09bbea798f72464875b /npc/config/magic.txt
parent512abfa1751a1cff72d4f6509bded0317d2fe8a4 (diff)
downloadserverdata-d14b00ad3b384f9cb559aa84f1aa55ee578eaae9.tar.gz
serverdata-d14b00ad3b384f9cb559aa84f1aa55ee578eaae9.tar.bz2
serverdata-d14b00ad3b384f9cb559aa84f1aa55ee578eaae9.tar.xz
serverdata-d14b00ad3b384f9cb559aa84f1aa55ee578eaae9.zip
Fix HP bug on summoning
Diffstat (limited to 'npc/config/magic.txt')
-rw-r--r--npc/config/magic.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 2825f3830..2d5d1c649 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -118,11 +118,11 @@ function script SummonMagic {
.@mids=summon("Summoned Monster", .@id, .@lifetime);
.@bhp=getunitdata(.@mids, UDT_MAXHP);
// Each skill level raises HP in 5%
- .@lvx=max(0, (.@lv-1)*.@bhp/20);
+ .@lvx=.@bhp + max(0, (.@lv-1)*.@bhp/20);
// Abizit makes bonus HP vary (like AdjustSpellpower)
.@lvx = .@lvx * (80 + abizit() * rand2(5,10)) / 100;
- setunitdata(.@mids, UDT_MAXHP, .@bhp+.@lvx);
- setunitdata(.@mids, UDT_HP, .@bhp+.@lvx);
+ setunitdata(.@mids, UDT_MAXHP, .@lvx);
+ setunitdata(.@mids, UDT_HP, .@lvx);
// Reconfigure monster modes
.@opt=getunitdata(.@mids, UDT_MODE);
// Disable looting