Re: [CODE]Weapon skills

From: Peter Ajamian (pajamian@cheapsam.com)
Date: 12/08/99


Emil Nilimaa wrote:
>
> ok,
>
> I wanna make weapon skills for all sorts of weapons,
> like 1h slashing etc.
>
> then instead of thaco, im gonna use this skill.

Add skills for your various weapon types in the same manner you would
use to add any skills except don't create commands for the skills.

Value 0 of weapon objects is currently unused, you can use this value to
define the weapon type, have that type correspond to the skills you
added.

grep the source for the thaco function, and replace all the prototypes
with...

int thaco(struct char_data *ch);

change the name of the old thaco function to bare_hand_thaco

also change any place that calls thaco so it uses the above format for
it's args.

write a new thaco function (an untested example follows) that returns
the thac0 based on the following formula...

int thaco(struct char_data *ch)
{
  struct obj_data *wielded = GET_EQ(ch, WEAR_WIELD);

  if (wielded && GET_OBJ_TYPE(wielded) == ITEM_WEAPON &&
GET_OBJ_VAL(wielded, 0)) {
    return (20 - (GET_SKILL(ch, GET_OBJ_VAL(wielded, 0)) / 5));
  } else
    return bare_hand_thaco((int)GET_CLASS(ch), (int)GET_LEVEL(ch));
}

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST