diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-09-13 22:24:30 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-09-13 22:24:30 -0300 |
commit | d14b00ad3b384f9cb559aa84f1aa55ee578eaae9 (patch) | |
tree | c891de4ea3df81bd7babb09bbea798f72464875b /npc/config/magic.txt | |
parent | 512abfa1751a1cff72d4f6509bded0317d2fe8a4 (diff) | |
download | serverdata-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.txt | 6 |
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 |