percent instead of damage

From: Brian Williams - Nashak (bmw@efn.org)
Date: 02/06/97


Okay, for damage messages, I changed it so that instead
of like hitting someone hard, when you barely hurt them,
although you do like 10 damage, it could still tickle them
if they have 10 million hp, so it will say the messages
depending on the percent of damage you do to the victim,
now my problem is, the 10th message should only show up if you
do 50% of their life damage, but for me, it is showing up
like up to 20 times.. depending on what your damage is
like a 80 hp mob, if you do 2 damage you nearly slay it, etc
also on a 10k mob, you'd nearly slay it like 5 times at 6d6,
but with 1d2 you would nearly slay it about 20 times..
here is what I did to the fight_message
  /* added */
  int percent = GET_HIT(victim) / 100;

  /* changed the old one */
  if (dam == 0)			msgnum = 0;
  else if (dam <= 2*percent)    msgnum = 1;
  else if (dam <= 4*percent)    msgnum = 2;
  else if (dam <= 6*percent)    msgnum = 3;
  else if (dam <= 9*percent)    msgnum = 4;
  else if (dam <= 14*percent)   msgnum = 5;
  else if (dam <= 19*percent)   msgnum = 6;
  else if (dam <= 26*percent)   msgnum = 7;
  else if (dam <= 35*percent)   msgnum = 8;
  else if (dam <= 49*percent)   msgnum = 9;
  else                          msgnum = 10;

I do have 10 messages, so I know that isn't the problem =) Thanks
in advance for any help




        /---------\      /--------/
       / /XXXXXXX\ \    / ////// /
      / ///XXXXX\\\ \  / ////// /
     / /////XXX\\\\\ \/ ////// /    -=-=-=-=-=-=-=-
    / //////  \\\\\\\  ////// /    Brian Williams
   / ////// /\ \\\\\XXX///// /    bmw@efn.org
  / ////// /  \ \\\XXXXX/// /
 / ////// /    \ \XXXXXXX/ / /\  /_ |_|  /\  |/
/--------/      \---------/ /--\  / | | /--\ |\

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



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