[crossfire] Spellcasting Swords progress

Brendan Lally B.T.Lally at warwick.ac.uk
Sun Jun 5 17:34:00 CDT 2005


>>>
     
     
      nicolas.weeger at laposte.net
      
       06/05/05 09:26 AM >>>
     
     >
     
      The idea is to replace the 'type' field (which stores only one value) 
     
     >
     
      with a binary value, flags indicating what the item can do.
     
     >
     
      So you could have 'is_weapon 1', and 'cast_spell 1' at the same time.
     
     
I quite like this idea, it seems rather elegant, it would also allow types to be changed quite easily. (think statues of monsters that animate themselves, or treasure chests that conditionally become exits)

Ideally the existing flags (no_pick etc,) would be folded in to this too.

>
     
      Drawback, there will be many flags (basically one for each item 
     
     >
     
      type...).
     
     
Wouldn't there be substantial overlap here? you could for example have a casts_spells value, which would cover rods, horns and scrolls

with combinations of flags, it might be possible to define all the existing type checks with relatively few flags (~20-30 maybe)

>
     
      Also requires to convert all existing items (argh), and fix 
     
     >
     
      all maps (argh again). Can probably be done incrementally, ie let 
     
     >
     
      server convert at load time.
     
     
That would be a potential nightmare, although most of the map editing could probably be dealt with by a well crufted perl script.


    
    


More information about the crossfire mailing list