#include <lib.h>
#include <damage_types.h>
#include <armour_class.h>
#include <armour_types.h>
#include <size.h>
inherit LIB_ARMOUR;
int WearFun(object who);
int CheckWorn();

static void create() {
  ::create();
  SetKeyName("mithril ring");
  SetShort("a stunning mithril ring");
  SetId( ({ "ring" }) );
  SetAdjectives( ({ "stunning", "mithril" }) );
  SetMaterial( ({ "mithril" }) );
  SetWear( (: WearFun :) );
  SetDamagePoints(2500);
  SetArmourType(A_RING);
//  SetProperty("ohtar_flag", 1);
  SetArmourClass(ARMOUR_PLATE);
  SetValue(7500);
  SetPreventDrop("The ring denies being let go.");
  SetDestroyOnSell(1);
  SetLong("This ring is made of solid mithril and is "
          "very well kept. It has small etchings all "
          "through it. Wearing it would likely catch "
          "anyones eye. ");
  SetMass(20);
  SetProperty("history", "This ring was forged in the "
                         "lands of Averath many years "
                         "ago. ");
  SetProperty("magic", "This ring brings great fortune "
                       "to one when needed the most. ");
//  SetStatBonus("luck", 20);
}


int WearFun(object who) {
  send_messages( ({ "wear" }),
    "The ring %^GREEN%^shines%^RESET%^ as $agent_name "
    "$agent_verb it.", who, 0, environment(who) );
  return 1;
}

int CheckWorn() {
  if (GetWorn()) return 20;
  else return 0;
}

int GetSize() {
  object e;
  if (living(e = environment()))
     return e->GetSize();
     return SIZE_MEDIUM;
}
