shapechanger hit points (trunk only)
Try to fix the report of a doppelganger (created from using stone- to-flesh on a fake statue of Demogorgon) having 1700 hit points after reverting to its native form. The problem was due to the special monster level of Demogorgon rather than anything to do with shape changers; the actual bug was use of `mdat->mlevel' where it should have been using `mtmp->data->mlevel'. But the whole section of code was rather suspect since it didn't attempt to handle other types of monsters (dragons, golems, elementals) which have non-standard hit points, so I knocked some out. Monsters who have gained or lost levels prior to changing form will no longer carry that adjustment along; the new form will always be a brand new one of its type. However, if the old form is injured at the time of change, the new form will be too (same as before).
This commit is contained in:
@@ -955,6 +955,7 @@ E void FDECL(readmail, (struct obj *));
|
||||
|
||||
E boolean FDECL(is_home_elemental, (struct permonst *));
|
||||
E struct monst *FDECL(clone_mon, (struct monst *,XCHAR_P,XCHAR_P));
|
||||
E void FDECL(newmonhp, (struct monst *,int));
|
||||
E struct monst *FDECL(makemon, (struct permonst *,int,int,int));
|
||||
E boolean FDECL(create_critters, (int,struct permonst *));
|
||||
E struct permonst *NDECL(rndmonst);
|
||||
|
||||
Reference in New Issue
Block a user