Re: Some stuff about spells..

From: ShadowLord (dkoepke@california.com)
Date: 06/23/96


On Sat, 22 Jun 1996, Ground Zero Enterprises wrote:

> Now on to more important things, has anyone stayed with the current 
> spello() system but made it a bit more flexible?  I recently was creating
> a spell 'gate' that could only target players so I added target flags 
> TAR_PLR_WORLD and TAR_PLR_ROOM but I am also planning on adding a flag 
> TAR_SPEC that would pass to a diffrent function and determine is a target 
> is valid.  Then for example it would be easier for you to create a spell 
> that only targets elves or warrios or mobs that have full hit points.  I 
> als changed the section of spello() that was a TRUE/FALSE check for 
> violent to an int so it could record bitvectors and renamed it flags.  
> Since I haven't added many spells it was easy to change all of the TRUEs 
> to CAST_VIOLENCE and all the FALSEs to CAST_NONE.  I mainly did this 
> because i wanted to have sort of, levels of violence.  For example 
> although 'word of recall' wouldn't start a fight but it may not be 
> allowed in a PEACEFUL room so that characters couldn't be moved to a 
> room  where they could be stolen from.  I was just curious if anyone had 
> done something similar and if so what methods they used to go about it.  

TAR_CHAR, TAR_CHAR_ROOM, and TAR_MANUAL seem to take care of the things
you added.  If you want only players you can add a little check in the
actual case statement for the individual spells.  That seems fairly
flexible to me.

As for the CAST_VIOLENCE thing you added, I used it for spell routines.
I have delays in the spell casting system so the players would cast
something and get a few messages while the spells were going through a
routine.  So if I wanted to add some special routine for a spell, like
making the player sit down and do a few emotes before finishing the spell,
or making suddenly start to fly, I could.

	-dak



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