[CF-Devel] Monsters not using wands/rods/horns

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Fri May 14 00:40:01 CDT 2004


Nicolas Weeger wrote:

>
     
     
     >
     
      Hum, i'll check my code. I copied only the last fragment, actually 
     
     >
     
      firing the spell, so some checks indeed went to the trash.
     
     >
     
      What would be useful, I think, is to merge as much as the 
     
     >
     
      spell/firing/... code we can so it works for both players & monsters.
     
     >
     
      (not only for this precise case, but for everything)
     
     
  The problem here is that players have intelligence, and monsters don't.

  EG, if as a player, you fire your horn until it has no charges, you're not 
going to try to fire it again immediately.  Likewise, you're not going to fire 
wands with no charges, or use spell items that have useless spells.

  To mimic this logic for monsters, the monster fire code examines the potential 
object, eg, would it actually fire right now (have charges or if horn/rod, 
enough power in it right now).  If not, lets look for another object.

  Once you put that much logic in, there really isn't that much left to do the 
actual firing of the object.  Eg, we know if will fire, so we don't need to 
recheck that all again.

  So for monsters, its really a 'choose and fire logic', where for players, it 
is just a simple fire logic.

>
     
     
     >>
     
       Probably using the same logic makes sense, except as mentioned above, 
     
     >>
     
      if there are cases where a creature is deemed too stupid yet has a 
     
     >>
     
      hand or whatever.
     
     >
     
     
     >
     
     
     >
     
      Then we shouldn't give it the skill 'use magic item' :)
     
     
  Yes.


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list