Obj Value referencing

From: Dan Argent (MBAX7DJA@FS1.CS.MAN.AC.UK)
Date: 05/12/98


Okay, I'm modifying the ranged weapon patch from the ftp site, to
suit my own purposes , and I've suddenly run into a brick wall.

The problem is that the ranged weapon (i.e. a pistol) is set up as a
separate OLC type with values :
 0) range   1) Missile Vnum  3)Max ammo cap.  4) ammo in at load time

(this follows the other ranged fireweapon patch)

The pistol ammo has values of:

0) not used     1) num dam dice      2) size dam dice     3) size of clip

Now, the problem I've run into is that in fight.c in the  function
"strike missile" it calculates the damage, by referencing the obj
values.

In the orginal ranged weapon patch it would check the value of the
missile held (bows and arrows) so the code is:


  dam = str_app[STRENGTH_APPLY_INDEX(ch)].todam;
  dam += dice(missile->obj_flags.value[1],
              missile->obj_flags.value[2]);
  dam += GET_DAMROLL(ch);

My problem is that I don't know how to reference the values of the
ammo, by way of the value held in the gun values...
eg.. the gun takes ammo vnum 97... and the values 1) and 2) of object
97 are the ones I wish to use with the dice function.

Any ideas...?

ps. If i'm not too co-herent it's because I am ill.

Thanks.

Dan.


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