I'm not sure what version of circle you're running, but in bpl15
this area is actually very well commented. I'll copy the comment
with my reply below.
At 02:31 PM 03/26/1999 -0500, you wrote:
>
>Yes, both results still do the same thing which does not make any sense.
>
>This is what it means to me, that is why I am asking:
I think the problem you are having here is that you are considering
skill_message and dam_message to be the same thing. They aren't.
skill messages are special responses to certain situations. dam
messages are a sort of catch all message.
What the code as it's written now does is basically try to use
skill_message if at all possible. If all of that fails then it
goes back to dam_message.
>
> if (!IS_WEAPON(attacktype))
> skill_message(dam, ch, victim, attacktype);
> else
> if (GET_POS(victim) == POS_DEAD || dam == 0)
> dam_message(dam, ch, victim, attacktype);
>
# Beginning of comment removed #
# my remarks will be prefaced with a #
* If we are _not_ attacking with a weapon (i.e. a spell), always use
* skill_message. If we are attacking with a weapon: If this is a miss or a
* death blow, send a skill_message if one exists; if not, default to a
* dam_message. Otherwise, always send a dam_message.
*/
if (!IS_WEAPON(attacktype))
# as the comment states if we are _not_ attacking with a weapon, use
# skill message. This is what this check does.
skill_message(dam, ch, victim, attacktype);
else {
# We must be attacking with a weapon so let's go to this block
if (GET_POS(victim) == POS_DEAD || dam == 0) {
# If while attacking with the weapon we miss or kill the poor victim
# then we'll send a skill message if one exists
if (!skill_message(dam, ch, victim, attacktype))
# Check for a valid skill message here (set up in lib/misc/messages
# if I remember right). Been awhile, so forgive me :)
# If we do have a valid skill message, then that message will be
# sent out, if we don't then we'll use generic dam_message so
# at least something is sent.
dam_message(dam, ch, victim, attacktype);
} else {
# If we get here than the attack was neither a deathblow nor a miss
# so we'll just use generic dam_message
dam_message(dam, ch, victim, attacktype);
}
}
I have a tendency of rambling when I write messages, so hopefully this
clears it up :)
Just remember that skill_message and dam_message are two completely
different functions.
Sean
+------------------------------------------------------------+
| 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