Re: [CODE][BUG] Exploitable bug in do_flee/do_simple_move

From: Mike Breuer (mbreuer@new.rr.com)
Date: 09/30/01


----- Original Message -----
From: "George Greer" <greerga@CIRCLEMUD.ORG>


> Two methods would be:
>
> 1) Each trigger is a list of functions to call.  Each trigger function in
> the list is a generic, shareable SPECIAL.  (e.g.: an aggressive mobile
> on_room_enter trigger and guard shout at criminal on_room_enter trigger)
>
> 2) Each trigger type calls a single special procedure with an argument
that
> it uses to decide what to do.  Each special procedure then can call
> smaller, generic "helper" procedures for stuff like the shared aggressive
> mobile handling.

I use a modified version of special() in interpreter.c for most of my
triggers.  It takes the event as a parameter, and it only returns early when
the original conditions are met AND EVENT_PROCESS_COMMAND is passed (see the
function to understand what I'm talking about).  This means that all of my
functions are implemented as slightly modified, but otherwise ordinary,
specials.

This does not necessarily preclude aggressive mobile triggers, but there's
no reason why mobile_activity couldn't be split up and portions of it (such
as aggression and perhaps memory) called from char_to_room(); the same place
I trigger my EVENT_ROOM_ENTER event.

Personally, I prefer this functionality, because I see mob aggression as
being fundamental to the game as opposed to "special" behavior reserved for
a select few mobs.  A common mechanism for both types of behavior would
necessarily represent a fundamental change in design.  I am not necessarily
opposed to this either; it's just that the other way is less intrusive and
easier to implement.

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST