lantern_fuel.c

skylib_mudos_v1/mudlib/std/effects/magic/lantern_fuel.c · 1.4 KB

From the archive skylib_mudos_v1.tar.gz

Download the archive   « Back to the archive contents

#include <effect.h>
#include "defs.h"

string query_classification() { return "magic.attached.infinite.lantern"; }

string query_shadow_ob() { return SHADOWS + "lantern_fuel"; }

mixed beginning(object player, int length) {
  object who;
  who = player;
  while(environment(who)) {
    who = environment(who);
  }
  tell_room(who, TP->the_short()+"'s "+player->short()+" begins to "
                 "burn with an eerie light.\n", TP);
  tell_object(TP, "Your "+player->short()+" begins to burn with an "
     "eerie glow.\n");
  player->set_lit(1);
  player->set_light(70);
  player->submit_ee(0, length, EE_REMOVE);
  return length;
}

void end(object player, mixed args) {
  object who;
  who = environment(player);
  if (!(player->query_property("fuel"))) {
  	tell_object(who, "Your "+player->short()+" dulls out as it "
  	           "contains no more fuel.\n");
     player->out_of_fuel();
     who->set_light(0);
     return;
}
  if(!living(who) ) return;
  tell_object(who, "Your "+player->short()+" starts burning "
                   "normally, instead of with the strange glow it had.\n");
  player->set_light(60);
  player->remove_extra_look(TO);
  
}

int merge_effect(object player, int new_length, int old_length) {
  object who;
  who = environment(player);
  tell_object(who, "Your "+player->short()+" thrums as it "
   "absorbs the additional magic.\n");
  player->submit_ee(0, new_length, EE_REMOVE);
  return new_length;
}

Site Stats

Snippets: 1791
Codebases: 571