Re: Fire Shield / Lightning Shield

From: John (
Date: 12/03/01

----- Original Message -----
From: "David Cole" <tiznor@HOTMAIL.COM>
> Any idea?

The problem arises back one or two steps back. I am assuming your spells
causes damage to be inflicted back onto the attacker? The problem with
what you have is you didnt loop it properly so when the attacker gets
killed, the attacker is now out of the room. Hence, your act() calls
will fail since ch does not exist (since vict is the person who has the
fireshield or lightning shield).

You should outline how you are calling the damage back to the attacker
because this is the main problem.
eg. If you cause damage back in the hit() call and lets say the attacker
has multiple attacks;
    attack1 - hits victim, causes damage back to attacker and attacker
    attack2 - oh crap, the attacker doesnt exist, smack bang crash boom.
eg2, damage call actually calls hit() again
    attack1 - hits victim - ie hit(ch, victim, attack_type); calls
hit(victim, ch, SPELL_FIRESHIELD) and kills ch;
    BUT hit(victim, ch, SPELL_FIRESHIELD) returns back to hit(ch,
victim, attack_type) but ch doesnt exist anymore and bang

Hope this helps.

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 06/24/03 PDT