diff options
Diffstat (limited to 'npc/functions/maze.txt')
-rw-r--r-- | npc/functions/maze.txt | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/npc/functions/maze.txt b/npc/functions/maze.txt index d03160c18..68a1886f8 100644 --- a/npc/functions/maze.txt +++ b/npc/functions/maze.txt @@ -141,7 +141,7 @@ function script InitMaze { } ///////////////////////////////////////////////////////////////////////////////// -// MazeMobs(level=BaseLevel, chests=yes, density_redux=10, map=MAZE_MAP$) +// MazeMobs(level=BaseLevel, chests=yes, density_redux=10, map=MAZE_MAP$, buff=0) // Puts monsters on the maze. Less density_redux is more mobs. function script MazeMobs { .@m$=getarg(3, MAZE_MAP$); @@ -389,10 +389,25 @@ function script MazeMobs { /* Spawn them and make hostile */ freeloop(true); + debugmes "[Maze] Summoned %s Lv %d mobs in %s", fnum(.@tl), .@lv, .@m$; for (.@i = 0; .@i < 1+(.@tl); .@i++) { .@mid = any_of(.@mb); .@m=areamonster(.@m$, 20, 20, .@mx, .@my, strmobinfo(1, .@mid), .@mid, 1); set_aggro(.@m); + if (getarg(4, 0) > 0) { + .@bat=getunitdata(.@m, UDT_ATKMAX)+(.@s*2/3); + .@bai=getunitdata(.@m, UDT_ATKMIN)+(.@s/2); + .@bdf=getunitdata(.@m, UDT_DEF)+(.@s/3); + .@bht=min(32767, getunitdata(.@m, UDT_HIT)+(.@s*3/5)); + .@bhp=getunitdata(.@m, UDT_MAXHP); + .@s = getarg(4, 1); + setunitdata(.@m, UDT_ATKMAX, .@bat); + setunitdata(.@m, UDT_HIT, .@bht); + setunitdata(.@m, UDT_ATKMIN, .@bai); + setunitdata(.@m, UDT_DEF, .@bdf); + setunitdata(.@m, UDT_MAXHP, (.@bhp * (100+.@s)) / 100); + setunitdata(.@m, UDT_HP, (.@bhp * (100+.@s)) / 100); + } } freeloop(false); return; |