Re: [BPL11] ITEM_WEAR

From: Stephen Wolfe (siv@CYBERENET.NET)
Date: 08/19/98


> ok i have a small problem that i was hoping someone knew more about.  If a
> character wears an item that is 5ac on body it multiplies the value 3x so
> now his ac is 85/10 if worn on legs or head the value is 2x what it should
> be so again a 5ac item is now 10 and ac is 90/10.  How do i stop this from
> happening?  Items with same value work fine anywhere else.

wtf? did you bother to at least look for yourself before sending this? i
did a grep for GET_AC, which showed this:

act.informative.c:670:    buf, GET_AC(ch), GET_ALIGNMENT(ch));
act.offensive.c:404:  percent = ((10 - (GET_AC(vict) / 10)) * 2) + number(1, 101);      /* 101% is a complete
act.wizard.c:705:         GET_AC(k), k->points.hitroll, k->points.damroll, GET_SAVE(k, 0),
db.c:2244:  GET_AC(ch) = 100;           /* Basic Armor */
fight.c:813:  victim_ac = GET_AC(victim) / 10;
handler.c:171:    GET_AC(ch) += mod;
handler.c:524:    GET_AC(ch) -= apply_ac(ch, pos);
handler.c:558:    GET_AC(ch) += apply_ac(ch, pos);
medit.c:491:          GET_AC(mob) / 10, GET_HIT(mob), GET_MANA(mob), GET_MOVE(mob),
medit.c:805:      grn, nrm, cyn, GET_AC(mob), nrm,
medit.c:1232:    GET_AC(OLC_MOB(d)) = MAX(-200, MIN(200, atoi(arg)));
spells.c:372:       GET_AC(victim), GET_HITROLL(victim), GET_DAMROLL(victim));

now look at that..there is a function apply_ac that takes as an argument
the wear position..hmm..that looks suspicious, so i opened handler.c and
check it out..low and behold, there it was..different ac factors for
different wear positions..

                        ######  ####### #######  #####
                        #     #    #    #       #     #
                        #     #    #    #       #
                        ######     #    #####   #
                        #   #      #    #       #
                        #    #     #    #       #     #
                        #     #    #    #        #####

siv


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



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