diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-07-18 14:32:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-07-18 14:32:49 -0300 |
commit | 5b6f8a2fcb85398afb917cba337678d93500d1b8 (patch) | |
tree | 3e9751dd11005e438eb0fecdfc1cf547d9f406ba /npc/config/magic.txt | |
parent | 3437f72074da87da0445fda0a44ba56e87c0609d (diff) | |
download | serverdata-5b6f8a2fcb85398afb917cba337678d93500d1b8.tar.gz serverdata-5b6f8a2fcb85398afb917cba337678d93500d1b8.tar.bz2 serverdata-5b6f8a2fcb85398afb917cba337678d93500d1b8.tar.xz serverdata-5b6f8a2fcb85398afb917cba337678d93500d1b8.zip |
Summon magic: Each skill level now raises summoned monster HP in 1% (except lv 1)
Diffstat (limited to 'npc/config/magic.txt')
-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; } |