diff options
Diffstat (limited to 'npc/config')
-rw-r--r-- | npc/config/magic.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt index b5239e9f2..5630cc766 100644 --- a/npc/config/magic.txt +++ b/npc/config/magic.txt @@ -72,8 +72,13 @@ function script SummonMagic { // Cause effect // Summoned monsters live from 45 to 60 seconds, and each skill levels grants 10s extra life // The 35~50 is not a defect, remember skill starts at level 1... - for (.@i = 0; .@i < (.@lv+(.@adj-1))/.@adj; .@i++) - summon("Summoned Monster", .@id, rand(35,50)+.@lv*10); + for (.@i = 0; .@i < (.@lv+(.@adj-1))/.@adj; .@i++) { + .@mids=summon("Summoned Monster", .@id, rand(35,50)+.@lv*10); + .@bhp=getunitdata(.@mids, UDT_MAXHP); + .@lvx=max(0, (.@lv-1)*.@bhp/100); + setunitdata(.@mids, UDT_MAXHP, .@bhp+.@lvx); + setunitdata(.@mids, UDT_HP, .@bhp+.@lvx); + } dispbottom l("All monsters summoned!"); return; } |