Re: Armor Spells

From: Yoink! (xombi@mtvernon1.accessus.net)
Date: 07/16/96


On Tue, 16 Jul 1996, Brian Menges wrote:

>    I have a few different types of armor spells: The standard 'armor' and two
> new ones: 'barkskin' and 'stoneskin'.  Each one is slightly more powerful than
> the previous version.  The problem I am having is that a player can just cast
> each one on himself or herself to get a very good AC Apply.  What would be the
> best way to make it so that it would only allow one of these spells to be in
> affect at any one time?  I would also like to make it so if a more powerful
> version is cast on the player it would replace the current spell.
> 

Welp the easiest way to do this is to add an affection flag to this spell.
Set it so that when any of these spells are cast onto a character they get
the flag armor. Make them non-accumulative, and add a simple check to the
spell such as:

 if (is affected(ch, AFF_ARMOR))
   send_to_char(" Victim is already protected.\r\n", ch);
   return;
 
If you want them to replace it's just another check.


 \ \\   / //                "If I were a dinosaur, I'd be a licalottapus!"
  \ \\ / //  _____  __       __ ______  ___       -Jonathan "Jax" Armsterd
   \ \/ //  //   \\ |\\     /|| ||   \\ | ||   
    >  <<  ||     ||||\\   //|| |----<< | ||         Hard to believe,
   / /\ \\ ||     |||| \\ // || ||    \\| ||        Harder to killfile!
  / // \ \\ \\___//_||  \//  ||_||____//|_||
 /_//   \_\\       In God We Trust. All others pay cash.



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