A bug with strength

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 02/20/98


     ok... if a weapon is too heavy and you can't wield it, You get a
     strength spell cast on you and you can now wield the weapon.  but what
     happens when the spell wears off or you remove that hunk of eq that is
     +2 str?  NOTHING!!!!

     so.. here is the fix (note, i have a dual weapon system):


     At the very end of handler.c:affect_total() add
       if(!IS_NPC(ch))
           {
           if((obj=GET_EQ(ch,WEAR_WIELD_2)))
            {
            if(GET_OBJ_WEIGHT(obj)>
               str_app[STRENGTH_APPLY_INDEX(ch)].wield_w)
              {
              act("You lose your grip on $p.",FALSE,ch,obj,0,
                TO_CHAR);
              perform_remove(ch,WEAR_WIELD_2);
              }
            }
           if((obj=GET_EQ(ch,WEAR_WIELD_1)))
            {
            if(GET_OBJ_WEIGHT(obj)>
               str_app[STRENGTH_APPLY_INDEX(ch)].wield_w)
              {
              act("You lose your grip on $p.",FALSE,ch,obj,0,
                TO_CHAR);
              perform_remove(ch,WEAR_WIELD_1);
              }
            }
          }

     We found this out because our players were creating chars with no str,
     putting the stat points into other stats, and then getting strength
     spells.  A warrior logging in with a str of 5?!?!  just silly.

     --Angus


     +------------------------------------------------------------+
     | 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