Revised ranged weapons patch Thanks go to: Scott Warren, who originally wrote this patch, sjmaster@mit.edu, whose do_scan patch provided a nice enhancement for the look_in_direction routine, Malcor, for the multiple object grouping patch, Jeremy Elson, for his continuously outstanding work on CircleMUD. Standard disclaimer: I, the author/editor of this patch, take no responsibility for anything you do with it nor any resulting damage! Incorporate it at your own risk. That said, if you don't mind getting your feet wet tinkering with CircleMUD's code, back up your src/ directory and give this a shot! Install with the following command line: patch -c < (PATH)/ranged.patch If necessary, you can also uninstall with the following command line: patch -cR < (PATH)/ranged.patch Of course, if you needed that explained, don't install this unless you have plenty of time and patience. :) I found the concept behind Scott's patch interesting, so I decided to incorporate it into my MUD. In the process, I opted to make some changes. I changed a lot of the formatting of the code itself, replaced some if/else cascades with for loops, split things up into different routines to eliminate redundancy, and generally did a thing or two to make the whole thing more workable. As noted above, I've borrowed some code from sjmaster's do_scan patch (also edited into a tighter for loop) and incorporated it into the look_in_direction patch. Just in case, I also have incorporated Malcor's multiple item grouping patch - almost a necessity if you're going to have arrows strewn about the place. Of course I didn't leave that alone - I've edited that patch not to group together containers. In practice, I found it easier to loot corpses that weren't grouped. =) An expert coder could probably do much to enhance this patch even further. However, I believe I've improved things enough to make this worth your while. Most of the patched code is now in act.offensive.c and fight.c. Projectiles other than grenades now call the regular damage routine (patched to detect this usage) to take advantage of tried-and-true code, and eliminate many of the loopholes that were in the first incarnation of the patch. Rooms with the PEACE flag are now accounted for; grenades will no longer detonate in them, nor will they harm immortal pc's. The mobiles now react consistently to being shot at. Regular ammunition now has a chance of disappearing with used, and a WAIT_STATE has been added to the usage of missile weapons, both as checks against the abuse of this new-found power of inflicting damage from afar. On the whole, this is a somewhat more playable and less buggy revision. Not to say that it's perfect. You may want to do yet more work to get it up to par. I have ideas of my own... triggering a HUNTING procedure for mobs rather than a simple do_move, or NO_MISSILE flags to make certain mobs invulnerable to ranged attacks, or a new genre of ranged spells, or even mobs that made use of missile weapons. However, if I included such routines this would cease to be a simple patch. Don't forget to read the included ranged_weapons.old.README - it's the text that came with the original weapons patch, and could be useful. Comments? Feedback? I (probably) can be reached at danielh@llamas.cnu.edu! Have fun! Daniel AKA Garadon