guard.c

nightmare3_fluffos_v2/lib/domains/Praxis/obj/mon/guard.c · 476 B

From the archive nightmare3_fluffos_v2.zip

Download the archive   « Back to the archive contents

#include <std.h>
#include <rooms.h>

inherit MONSTER;

private object __Target;

void heart_beat() {
    monster::heart_beat();
    if(__Target && environment(__Target) != environment(this_object())) {
      message("say", "%^BOLD%^%^RED%^The guard tells you: %^RESET%^"+
          "An' where do ya think you're goin' buster??", __Target);
      __Target->move_player(environment(this_object()));
    }
}

void set_target(object ob) {
    if(!ob) return;
    __Target = ob;
}

Site Stats

Snippets: 1791
Codebases: 571