From 11eca31d2f8882b62517c0a6367e102dd5721d0d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 6 Sep 2020 14:56:28 -0300 Subject: Disable looting mode from summons. Also ensure all summons can suffer from knockback. There are other stuff I could do, but for now, it is not necessary --- npc/config/magic.txt | 10 ++++++++++ npc/functions/filters.txt | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'npc') 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)); } -- cgit v1.2.3-60-g2f50