buglist: cutting Shopkeeper the long worm

Cutting a shopkeeper poly'd as a long worm would generate strange messages
and could result in a crash.  cutworm didn't deal with all the intricacies
of duplicating a monster.   Fixed by changing cutworm() to use clone_mon()
to do most of its dirty work.  It seems to me that without this change,
cutting a tame long worm could also have similar bad effects.
Other side effects of this change:
- clone_mon now takes x,y coordinates, 0,0 results in previous behavior
- clone_mon no longer always makes cloned monsters tame/peaceful if player
  caused the clone, using the same formula previously in cutworm.  Someone
  else may wish to tweak this for gremlins.
- clone_mon will christen the new mon with the old shopkeeper's name, even
  though clones are never shopkeepers (game can't handle 2 for a shop)
- cutworm can now be called during conflict or pet combat, although I
  added no such calls (yet)
This commit is contained in:
cohrs
2003-10-23 02:30:46 +00:00
parent cc52b2f533
commit f4fbe1a13e
7 changed files with 49 additions and 41 deletions

View File

@@ -926,7 +926,7 @@ E void FDECL(readmail, (struct obj *));
/* ### makemon.c ### */
E boolean FDECL(is_home_elemental, (struct permonst *));
E struct monst *FDECL(clone_mon, (struct monst *));
E struct monst *FDECL(clone_mon, (struct monst *,XCHAR_P,XCHAR_P));
E struct monst *FDECL(makemon, (struct permonst *,int,int,int));
E boolean FDECL(create_critters, (int,struct permonst *));
E struct permonst *NDECL(rndmonst);