Here is...  my central routine.

It checks to make sure that if someone died in between, it stops.
Which is very important.  Thats why you DONT want multiply damage in one
call chain (althought, I fixed that with some anti-nesting technology.

It can also be used for scrolls.. etc

bugf, is a printf version of bug

------------------------ clip --------------------
void cast_a_spell(int sn, int lvl, CHAR_DATA *ch, void *vo, int target, int
object)

{

int i=1;

int x=0;

CHAR_DATA *victim;

ROOM_INDEX_DATA *ch_orig_room=NULL, *victim_orig_room=NULL;

if (ch->in_room == NULL) {

bugf("ERROR: cast_a_spell: character not in a room.\n\r");

return;

}


if (skill_table[sn].target == TAR_CHAR_OFFENSIVE) {

if (get_skill(ch,gsn_second_cast) > number_percent()) {

if (number_percent() <= 40)

i++;

check_improve(ch,gsn_second_cast,TRUE,1);

}

if (get_skill(ch,gsn_third_cast) > number_percent()) {

if (number_percent() <= 20)

i++;

check_improve(ch,gsn_third_cast,TRUE,1);

}

}

if (object)

i = 1;

for (x=0; x < i; x++) {

if (skill_table[sn].target == TAR_CHAR_OFFENSIVE) {

{

victim = (CHAR_DATA *)vo;

if (x == 0)

{

ch_orig_room = ch->in_room;

victim_orig_room = victim->in_room;

}

if (victim->in_room != ch->in_room || victim->position == POS_DEAD

|| ch->in_room != ch_orig_room || victim->in_room != victim_orig_room)

return;

}

}

/* check to see if deaths are done between rounds */

(*skill_table[sn].spell_fun)(sn,lvl,ch,vo,target);

}

}

------------------------- clip -------------------
----- Original Message -----
From: "Jason Gauthier" <[EMAIL PROTECTED]>
To: "'Tom Whiting'" <[EMAIL PROTECTED]>; "'Sandi Fallon'"
<[EMAIL PROTECTED]>; <[email protected]>
Sent: Friday, February 08, 2002 5:26 PM
Subject: RE: Re[2]: Multi Casting for magic users (need some help please)


> They must grow their tongues back fast.
>
> Bash does trip the wait state which decreases execution of spell by 50%.
> You could modify that as well.
>
>
> > -----Original Message-----
> > From: Tom Whiting [mailto:[EMAIL PROTECTED]
> > Sent: Friday, February 08, 2002 5:20 PM
> > To: 'Sandi Fallon'; [email protected]
> > Subject: RE: Re[2]: Multi Casting for magic users (need some help
> > please)
> >
> >
> > >>One idea I had (but haven't considered fully, so caveat
> > emptor), is to
> > balance fight with Warriors a little bit by making Mages need an empty
> > hand to get the second cast. I.e., more elaborate gestures mean more
> > power, but darn, you gotta drop that second dagger or shield.
> >
> >
> > Another way to balance fights between Mages and the warrior types I've
> > implemented in DR:
> > A skill called cut:
> > If a warrior/thief is wielding a dagger and is in a fight
> > with a caster,
> > they can cut the caster's tongue out. Now, this doesn't
> > succeed 100% of
> > the time, and only lasts a few ticks, but that few ticks could easily
> > mean the life or death of the non caster.
> >
> > Of course my casters hate it, but it's a ballancing act. If it wasn't
> > in, nobody would fight a mage/cleric/etc, because casters are quite
> > powerful (as they should be).
> >
> > Just another thought of course.
> > -------------------------------------------
> > TJW: Head tech, Dreamless Realms Mud
> > Personal: http://twhiting.kyndig.com
> > Mud: http://drealms.kyndig.com
> > Snippets http://drealms.kyndig.com/snippets
> > Telnet telnet://drealms.kyndig.com:9275
> > The OLC2 Pages http://olc.kyndig.com
> > -------------------------------------------
> >
> >
> >
> > --
> > ROM mailing list
> > [email protected]
> > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> >
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
>


Reply via email to