Re: Weapon Spells

From: Skylar (skylar@ifconfig.intserv.com)
Date: 07/09/96


On Wed, 10 Jul 1996, Malcor wrote:

> At 10:02 AM 7/8/96 -0500, you wrote:
> >        
> >I have added the weapon spell patch and it works great, however
> >I am wondering if anyone has added a feature that allows items
> >to have spells such as invisibility... So, if a player was to 
> >wield/wear this item, they would be invisible, and stay invisible
> >during combat. (that last part not necessairly a big concern).
> >
> >Thanks in advance!
> >
> >Chuck
> >
> >

-code snipped-

> Now make that the spell on the weapon for invis, the check only checks for
> the SPELL_INVISIBILITY, and the spell is SPELL_IMPROVED_INVISIBILITY so
> therefore it will not check it and you will stay invis :)

Hm, neat idea, and the code looks fine, but I think damage() checks for
AFF_INVISIBLE, and the appear() function it calls checks for the spell
and removes that, but also removes bits AFF_INVISIBLE and AFF_HIDE 
willy-nilly, without making any checks at all... wont you need to change
the initial check..

if (IS_AFFECTED(ch, AFF_INVISIBLE | AFF_HIDE))
  appear(ch);

to something like...

if ((IS_AFFECTED(ch, AFF_INVISIBLE) && 
     !affected_by_spell(ch, SPELL_IMPROVED_INVISIBILITY)) ||
    IS_AFFECTED(ch, AFF_HIDE))
  appear(ch);


Hmm, you might need a check right in appear() as well, for people that
are affected by improved invis but also hiding... or am I totally wrong
here?


-Sky



This archive was generated by hypermail 2b30 : 12/07/00 PST