Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spell setting




Matsuda Takashi writes:
>K.Geppert@cit.gu.edu.au writes:
>>> Wondering if anyone thinks the following is a good enough idea to refine in
>>> crossfire.  I can never remember the name of the spell when I need to cast 
>it,
>>> what with create wall, build wall, and wall of thorns sort of ambiguities.
>>> Could it be arranged that when you type cast keyword, crossfire list all th
>e
>>> spells that you know that begin with that keyword?  For example cast summon
>>> would return summon water elemental, summon air elemental, summon fire
>>> elemental.  
 Just patch command_cast_spell() in server/input.c like:
if (params && strncmp(params, spells[op->contr->known_spells[i]].name, 
strlen(params)))
  continue;

before ifdef near

      else
        for(i=0;i<(int)op->contr->nrofknownspells;i++)
          {
#ifdef SPELLPOINT_LEVEL_DEPEND

Haven't tested, but should work..

>I think that not only magic spell, but other commands
>( save winpos etc. ) are difficult to remember.
>And inputing commands is very bother.
 Yes, if you type those command.. You should bind those command to
keys and just push a button..

>I think zsh-like command expansion may very useful.
>For example;
>	>cast [tab]
[clip]
>Of cause, unknown magic spells are not listed.
 Hum. To implement this (without kludge-code) is to do tab-list. And
then show/complete word in commands.c. For commands there is list
already, for command arguments list could be generated by
special-function for each of those commands which we want tab working
for its arguments.

	++Jam, needs sleep