[CF-Devel] patch for generators to create special ability monsters

Mark Wedel mwedel at sonic.net
Sun Apr 14 21:44:55 CDT 2002


Norbert Irmer wrote:

>
     
      Hi,
     
     >
     
     
     >
     
      Putting a monster in the inventory of the generator and copying it, is
     
     >
     
      a nice idea, since it is more flexible and faster. Perhaps one could even
     
     >
     
      use the 'copy_object()' function for it.
     
     

  Probably.  The code to have the generators inventory make a monster should be 
pretty easy - it would be something like  if (generator->inv) then 
obj_to_create=generator->inv; else obj_to_create=generator->other_arch (or 
something pretty close to that).

  The other really nice thing about using a monster in the inventory is then 
that map editor can use its standard object interface to change it.

  The potential tricky part is that the process_object loop probably expects 
monsters to be on a map.  The easiest approach, which probably would not break 
anything, is to put a check in at the top level such that if op->type==monster 
&& op->map==NULL continue (althought I think you would need to check for 
FLAG_IS_MONSTER, but not sure).


>
     
      The 'move_creator()' function has a big contra, it currently just handles
     
     >
     
      single square things (that was the reason, i used the 'generate_monster()'
     
     >
     
      function, which works fine).
     
     

  I'm also pretty sure that the move_creator is designed to create one item, so 
it also wouldn't create an objects (monsters) abilities, treasures, etc.



    
    


More information about the crossfire mailing list