[Circle] [code] fighting

From: Mud Administrator (mudadmin@vistech.net)
Date: 11/02/96


Ok, I'm trying to code in a ranged attack system for my mud
using 3 ranges: long, short, and medium

anyways, I've more or less figured everything out that I need to make it 
possible except for in fight.c

since I want weapons to be able to only work perfectly in one range I 
want to make something in fight.c that lowers hitrolls by certain amounts 
for different ranges.... anyways, I'm trying to figure out the most 
effecient way to deal with the hitroll
my current idea is to have an if/else if chain with switch cases in side 
like so:

if(long)
switch(range)
case long
case short
case medium
default
else if (short)
... etc...

anyways, I was wondering if there are any snippets that would help me 
here or if someone could help me out with this(I checked the snippets 
page and it didn't look like there was anything there)

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