=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Guardians for CircleMUD 3.1 Copyright (C) 2003 Geoff Davis Saturday, May 10th, 2003 geoff@myrapidsys.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 1. Introduction It has always bothered me that no simple way exists for a group to protect its weaker members. This can be a substantial problem if your MUD grants classes such as mages or clerics few hitpoints and poor thac0 scores. So, this is the problem I aimed to solve. Enter guardians. Guardians are characters, player or mobile, who protect another character, as the name would seem to imply. They accomplish this by coming between an attacker and their intended opponent and engaging said attacker. If a guardian in unoccupied with combat, he or she will have a 100% chance of success, but this will rapidly degrade as the guardian intervenes with more attackers. 2. Disclaimer Please do use this patch at your own risk. I can only vouch for the stability of this code under the precise configuration it was tested in. And even then I could easily have overlooked something -- even something simple. I can't guarantee this patch will go in flawlessly on anything but vanilla CircleMUD 3.1, so please, please, *please* backup your MUD source code *before* attempting to apply this patch. I would be very appreciative of any credit given me for my work, but I don't really expect it, and I certainly won't hunt you down and brutalize you if you choose not to do so. I do expect, however, that you will not take credit, yourself, for this code, either implicitly or explicitly, in the event that its origins are divulged. If you make enhancements to this patch, find bugs, or have comments of any civil sort, please do feel free to email me at geoff@myrapidsys.com. I will gladly assist with any *technical* issues or problems with this patch as my time permits. 3. Installation To install this patch, move the cm31-guardians.patch file into your src directory (usually directly underneath your circle-3.1 directory) and execute the following command: % patch < cm31-guardians.patch It is likely, if your MUD is modified at all, that you'll receive some rejects (*.rej files). These will need to be hand-patched. Remember, '+' means add, '-' means remove, and '!' means change. Unfortunately, I really can't assist with patching should you have a problem there, as this process is very well documented on many sites and would consume much too much of my time if I had to conduct classes on it. 4. Known Issues (a) There is no limit to the number of guardians a character can have, but a mildly industrious coder can easily remedy this. As every game is likely to have different needs and expectations of this threshold, I decided to leave it as an excercise for the coder. (b) Mobiles, if used as guardians, may wander unless marked with the sentinel flag. Charmed mobiles, of course, will not. Due to my own personal tastes, I've chosen not to handle this case. (c) Guardianship doesn't impart any sort of grouping. It is possible to guard a player or mobile not part of your current group. Due to my own personal tastes, I've chosen not to handle this case. (d) Guardians are checked in the damage() function in fight.c. It may be more appropriate to move this check into the hit() function if you don't want spells and skills to be able to be guarded against. The current implementation *will* guard against them. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Guardians for CircleMUD 3.1 Copyright (C) 2003 Geoff Davis =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-