magic_user spec_proc questions...

From: Mud Admin (empire@www.cedarnet.com)
Date: 07/04/96


I am toying with the notion of rewriting these to make the spell caster 
more 'intelligent,' however I am at a loss...

<from spec_procs.c>

>  if (cmd || GET_POS(ch) != POS_FIGHTING)
>    return FALSE;

Pretty simple, no fighting no spells.

  if (vict == NULL)
    vict = FIGHTING(ch);

Primary victim is the person they are fighting. (What a good idea that is.)

Now, before it gets in too far with the spells that it may cast...I want 
to to basicallly do this:

>  if (GET_LEVEL(ch) >= 7 && !IS_OBJ_STAT(IS_WIELDING(ch), ITEM_MAGIC))
>    cast_spell(ch, IS_WIELDING(ch), NULL, SPELL_ENCHANT_WEAPON);
>    return TRUE;

Hope this is pretty clear. If the weapon they are using is NOT magical, 
they should cast enchant weapon on it. (Level 7 is the min level a magi 
on my MUD can cast it...)

Then I want it to stop fighting.

What I want to have is, say a 1 in 5 chance that they will cast this 
round...and then they will pass to an extensive check of spells they 
could cast. Do they need a magic weapon? How about an armor spell? Can 
they just put their opponenet to sleep? What about a strenght spell? Or 
perhaps just a volly of magic missiles. Etc...So spell casters have abit 
more varity to them...

However, now the magi is NOT casting (or attempting to) the enchant 
weapon. (Which is just my first test cast before I write the whole thing.)

Anyone with some advice AND paitents would be a boon at this point.

--Ziz, NetShamen



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