Re: Guard [LONG]

From: Fizal (amustapa@yahoo.com)
Date: 04/20/99


--- Fizal <amustapa@YAHOO.COM> wrote:
> Hmm... did I missed anything? Hopefully not.

Yup, I actually did. Forgot to mention that you need to do some form of
check to see if the person being hit is being guarded by someone.
That'll be in the damage() or hit() function (fight.c). Hmm... maybe
hit() would be better, but that's my opinion.

Where in the function? Hmm... after the sanity check to make sure that
the victim and attacker are in the same room would be good. Then:

  if (victim is being guarded by someone)
    if (that someone is in the same room) {
       /* Make the person guarding rescue the victim */
       Stop victim and attacker from fighting
       Make attacker and rescuer fight each other
       Point the victim pointer to the rescuer
       Give some nifty message to the people involved

       /* Maybe make rescuer stop guarding victim now? */
       Null associated pointers
    } else
      give message that rescuer's not around

BTW, again, if this is a skill, maybe throw in a check to see if the
player has the skill before letting him/her/it guard another.

G'luck! :)

===
Afizal Mustapa
Petaling Jaya, Malaysia
(amustapa@hotmail.com)



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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