diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-04-29 22:06:27 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-04-29 22:06:27 -0300 |
commit | 010157499659b9cec0e2770a08bbf5abed3eba6c (patch) | |
tree | a04ad6dcc2b4b35dfe36b763ab295e13edc6e7f5 | |
parent | 8cec328bede6381ddddb0eb3394aa43dd4007e46 (diff) | |
download | serverdata-010157499659b9cec0e2770a08bbf5abed3eba6c.tar.gz serverdata-010157499659b9cec0e2770a08bbf5abed3eba6c.tar.bz2 serverdata-010157499659b9cec0e2770a08bbf5abed3eba6c.tar.xz serverdata-010157499659b9cec0e2770a08bbf5abed3eba6c.zip |
Adjust Candor Bloodbath to be harder and less laggy. Tested, it butchered me =(
-rw-r--r-- | npc/006-9/ctrl.txt | 72 |
1 files changed, 62 insertions, 10 deletions
diff --git a/npc/006-9/ctrl.txt b/npc/006-9/ctrl.txt index 46b1fe39b..648e01b6a 100644 --- a/npc/006-9/ctrl.txt +++ b/npc/006-9/ctrl.txt @@ -53,6 +53,8 @@ OnTimer4000: .diff += 1; if (.diff == 75) mapannounce "006-9","Five minutes have passed, changing spawn pattern!",0; + if (.diff == 225) + mapannounce "006-9", "Fifteen minutes have passed, changing spawn pattern!", 0; if (.diff == 450) mapannounce "006-9", "Half hour has passed, changing spawn pattern!", 0; if (.diff == 900) @@ -74,13 +76,13 @@ OnTimer2000: // Spawn logic function spawn { .@lv = getarg(0); - if (.@lv < 450) { + if (.@lv < 225) { .@mb[0] = MagicGoblin; .@mb[1] = IceMaggot; } // Artillery - if (.@lv > 40) + if (is_between2(40, .@lv, 450)) array_push(.@mb, RobinBandit); if (.@lv > 50) array_push(.@mb, DustGatling); @@ -291,17 +293,67 @@ function spawn { .@lv *= 3; // 12 -> 36 mobs /* Spawn them and make hostile */ - .@mid = any_of(.@mb); - .@m=areamonster("006-9", 35, 63, 36, 65, strmobinfo(1, .@mid), .@mid, 1); - set_aggro(.@m); - /* After five minutes, spawn some globally */ - freeloop(true); - for (.@i = 0; .@i < 1+(.@lv / 75); .@i++) { + // But ONLY if there are less than 2500 monsters and you are on pattern 1 + // Or if you're in pattern 4 and there aren't enough critters in the map + if (.@lv < 450 || + (.@lv < 900 && mobcount("006-9", "all") < 1200) || + (.@lv >= 900 && mobcount("006-9", "all") < 600)) { .@mid = any_of(.@mb); - .@m=areamonster("006-9", 20, 20, getmapinfo(MAPINFO_SIZE_X,"006-9"), getmapinfo(MAPINFO_SIZE_Y,"006-9"), strmobinfo(1, .@mid), .@mid, 1); + .@m=areamonster("006-9", 35, 63, 36, 65, strmobinfo(1, .@mid), .@mid, 1); set_aggro(.@m); + } else if (.@lv > 450) { + // Otherwise, we'll randomly evolve a monster into a super-boss + // Ascended units cannot be killed. Double ascension is possible. + do { + getunits(BL_MOB, .@lucky, 1, "006-9", 20, 20, + rand2(getmapinfo(MAPINFO_SIZE_X,"006-9")-40)+20, + rand2(getmapinfo(MAPINFO_SIZE_Y,"006-9")-40)+20); + sleep(2); // To prevent map-server from collapsing + } while (.@lucky == 0); + // Visual aspect of the ascension + setunitdata(.@lucky, UDT_CLASS, Birb); + unittalk(.@lucky, "*This unit has ascended*"); + immortal(.@lucky); // Jump straight to "plain unkillable" levels + setunitdata(.@lucky, UDT_CRIT, 32767); // Always does criticals + // Retrieve some data + .@atk1 = getunitdata(.@lucky, UDT_ATKMIN); + .@atk2 = getunitdata(.@lucky, UDT_ATKMAX); + .@atkR = getunitdata(.@lucky, UDT_ATKRANGE); + .@aspd = getunitdata(.@lucky, UDT_ADELAY); + .@wspd = getunitdata(.@lucky, UDT_SPEED); + .@mode = getunitdata(.@lucky, UDT_MODE); + // Damage multiplier: ×3 + setunitdata(.@lucky, UDT_ATKMIN, .@atk1 * 3); + setunitdata(.@lucky, UDT_ATKMAX, .@atk2 * 3); + // Increase attack range in 2 + setunitdata(.@lucky, UDT_ATKRANGE, .@atkR + 2); + // Make them faster, both to move as to attack + setunitdata(.@lucky, UDT_ADELAY, min(100, .@aspd - 80)); + setunitdata(.@lucky, UDT_SPEED, min(100, .@wspd - 35)); + // Set their AI to something more fearsome, if it isn't set yet + .@mode = .@mode | MD_NOKNOCKBACK; + .@mode = .@mode | MD_ANGRY; + .@mode = .@mode | MD_CASTSENSOR_IDLE; + .@mode = .@mode | MD_BOSS; + .@mode = .@mode | MD_DETECTOR; + .@mode = .@mode | MD_CHANGETARGET_CHASE; + setunitdata(.@lucky, UDT_MODE, .@mode); + // And mark them as something else for all eyes to see + setunitname(.@lucky, "ASCENDED MONSTER"); + } else { + // Otherwise, nothing happens (although you could get a penalty?) + } + /* After five minutes, spawn some globally */ + // These will bypass the monster amount protection from earlier every 40s + if (.diff % 10 == 1 || mobcount("006-9", "all") < 1000) { + freeloop(true); + for (.@i = 0; .@i < 1+(.@lv / 75); .@i++) { + .@mid = any_of(.@mb); + .@m=areamonster("006-9", 20, 20, getmapinfo(MAPINFO_SIZE_X,"006-9"), getmapinfo(MAPINFO_SIZE_Y,"006-9"), strmobinfo(1, .@mid), .@mid, 1); + set_aggro(.@m); + } + freeloop(false); } - freeloop(false); return; } |