On Fri, 26 Mar 1999, Del wrote: >Quick question here, >In fight.c the following confuses me. > > if (!skill_message(dam, ch, victim, attacktype)) > dam_message(dam, ch, victim, attacktype); > } else { > dam_message(dam, ch, victim, attacktype); > } > >Why have a check if !skill_message and else statement to do the same thing? if (!IS_WEAPON(attacktype)) skill_message(dam, ch, victim, attacktype); else { if (GET_POS(victim) == POS_DEAD || dam == 0) { if (!skill_message(dam, ch, victim, attacktype)) dam_message(dam, ch, victim, attacktype); } else { dam_message(dam, ch, victim, attacktype); } } They are in different 'if' blocks. >Mainly I am trying to figure out how to do a check on weapon type >which I believe i have to check "attacktype" and can not figure out a way to >do it. This is not as simple as I thought. >How can I check to see if the weapon type is slash, whip or whatever? Look at the IS_WEAPON() macro. :) -- George Greer | Shirak's CircleMUD for Windows help greerga@circlemud.org | http://www.connect.ab.ca/~rbmstrk/ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST