diff options
-rw-r--r-- | db/constants.conf | 21 | ||||
-rw-r--r-- | npc/config/magic.txt | 10 | ||||
-rw-r--r-- | npc/functions/filters.txt | 3 |
3 files changed, 32 insertions, 2 deletions
diff --git a/db/constants.conf b/db/constants.conf index 5b564ef61..a048d65d6 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -71,6 +71,27 @@ constants_db: { bc_blue: 16 bc_woe: 32 + comment__: "Monster Modes" + MD_NONE: 0 + MD_CANMOVE: 1 + MD_LOOTER: 2 + MD_AGGRESSIVE: 4 + MD_ASSIST: 8 + MD_CASTSENSOR_IDLE: 16 + MD_BOSS: 32 + MD_PLANT: 64 + MD_CANATTACK: 128 + MD_DETECTOR: 256 + MD_CASTSENSOR_CHASE: 512 + MD_CHANGECHASE: 1024 + MD_ANGRY: 2048 + MD_CHANGETARGET_MELEE: 4096 + MD_CHANGETARGET_CHASE: 8192 + MD_TARGETWEAK: 16384 + MD_NOKNOCKBACK: 32768 + MD_RANDOMTARGET: 65536 + //MD_MASK: 0 + comment__: "Mapflags" mf_nomemo: 0 mf_noteleport: 1 diff --git a/npc/config/magic.txt b/npc/config/magic.txt index e843be6f5..77c14a43e 100644 --- a/npc/config/magic.txt +++ b/npc/config/magic.txt @@ -123,6 +123,16 @@ function script SummonMagic { .@lvx = .@lvx * (80 + abizit() * rand2(5,10)) / 100; setunitdata(.@mids, UDT_MAXHP, .@bhp+.@lvx); setunitdata(.@mids, UDT_HP, .@bhp+.@lvx); + // Reconfigure monster modes + .@opt=getunitdata(.@mids, UDT_MODE); + // Disable looting + if (.@opt & MD_LOOTER) + .@opt=.@opt^MD_LOOTER; + // All summons can suffer knockback + if (.@opt & MD_NOKNOCKBACK) + .@opt=.@opt^MD_NOKNOCKBACK; + // Save new options + setunitdata(.@mods, UDT_MODE, .@opt); } dispbottom l("All monsters summoned!"); return; diff --git a/npc/functions/filters.txt b/npc/functions/filters.txt index fd9928647..01e3a8569 100644 --- a/npc/functions/filters.txt +++ b/npc/functions/filters.txt @@ -121,7 +121,6 @@ function script filter_friendly { // filter_notboss( id ) function script filter_notboss { - // 32 = MD_BOSS - return (!(getunitdata(getarg(0), UDT_MODE) & 32)); + return (!(getunitdata(getarg(0), UDT_MODE) & MD_BOSS)); } |