> From: "Brandon Andrews" <brandon@MAGICNET.NET>
> Ok. For some reason, chars can not hit mobs at all. Once in every 20
> hits or so it will show a miss message. Otherwise, they it shows nothing
> and the mob doesn't get hit. Can anyone tell me if there is something
> wrong in my void hit()?
>
Yes...you have a misplaced closing brace (see below)
> void hit(struct char_data * ch, struct char_data * victim, int type)
> {
-- snip --
> /* Maybe holding arrow? */
> if (wielded && GET_OBJ_TYPE(wielded) == ITEM_WEAPON) {
> /* Add weapon-based damage if a weapon is being wielded */
> dam += dice(GET_OBJ_VAL(wielded, 1), GET_OBJ_VAL(wielded, 2));
> } else {
>
>
> /* If no weapon, add bare hand damage instead */
> if (IS_NPC(ch)) {
> dam += dice(ch->mob_specials.damnodice,
> ch->mob_specials.damsizedice);
> } else {
> dam += number(0, 2);
> /* Max 2 bare hand damage for players */
> }
>
<-- A closing brace belongs here
> /*
> * Include a damage multiplier if victim isn't ready to fight:
> *
> * Position sitting 1.33 x normal
> * Position resting 1.66 x normal
> * Position sleeping 2.00 x normal
> * Position stunned 2.33 x normal
> * Position incap 2.66 x normal
> * Position mortally 3.00 x normal
> *
> * Note, this is a hack because it depends on the particular
> * values of the POSITION_XXX constants.
> */
> if (GET_POS(victim) < POS_FIGHTING)
> dam *= 1 + (POS_FIGHTING - GET_POS(victim)) / 3;/* dunno */
>
> /* at least 1 hp damage min per hit */
> dam = MAX(1, dam);
>
> if (type == SKILL_BACKSTAB) {
> dam *= backstab_mult(GET_LEVEL(ch));
> damage(ch, victim, dam, SKILL_BACKSTAB);
> } else {
> damage(ch, victim, dam, w_type);
> if (GET_EQ(ch, WEAR_DWIELD) && GET_HIT(victim) > 0)
> double_hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
> }
> }
-- snip --
One of these needs to go.
Mike
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/04/01 PST