sp_arm.c

./lib/skills/obj/sp_arm.c · 659 B

From the archive h7v3.0a.tar.gz

Download the archive   « Back to the archive contents

/* general - spell armor bonus object */

inherit "inherit/base/base_obj";
inherit "inherit/timer";

int ac_bonus;

int set_ac_bonus(int i)  { return ac_bonus = i; }

int armour_class_bonus() { return ac_bonus;     }

void time_out() {
  ac_bonus = 0;
  tell_object(environment(),"The "+ query_name() +" fades...\n");
  if(environment()) environment()->recalc_ac();  
  ::time_out();
}

void dispel_magic() { time_out(); }

status drop(status quit) {
  if(quit) time_out();
  return 1;
}

status id(string str) {
  return str == "external"
      || str == "spell"
      || str == "spell armor"
      || ::id(str);
}

/* Native Mode Move */

#include <move.h>

Site Stats

Snippets: 1791
Codebases: 571