vampshifting by poly'd hero
Hero polymorphed into a vampire or v.lord can use #monster to switch to vampire bat or fog cloud [or wolf for lord] but it was a one shot polymorph. Remember when current form is a shape-shifted vampire and allow #monster in shifted form to pick another shifted form or the vampire form. Genocide of the alternate shape forces back to base vampire. Genocide of base vampire does too, then reverts to human (or dwarf, &c) as vampires go away. Being killed while shafe-shifted reverts all the way to human rather than to vampire. [Just realized: interaction with Unchanging wasn't taken into consideration so hasn't been tested.] Since 'youmonst' isn't saved and restored, I had to add a field to 'u' to hold youmonst.cham during save/restore. Tested with 3.6.2+ and seemed to be working (except saving while shape-shifted restored as ordinary bat/cloud/wolf because new u.mcham wasn't there to hold youmonst.cham yet). Builds with 3.7.0- but not execution tested yet (I didn't want to clobber my current playground).
This commit is contained in:
@@ -1439,6 +1439,7 @@ E void FDECL(restore_cham, (struct monst *));
|
||||
E boolean FDECL(hideunder, (struct monst *));
|
||||
E void FDECL(hide_monst, (struct monst *));
|
||||
E void FDECL(mon_animal_list, (BOOLEAN_P));
|
||||
E boolean FDECL(valid_vampshiftform, (int, int));
|
||||
E boolean FDECL(validvamp, (struct monst *, int *, int));
|
||||
E int FDECL(select_newcham_form, (struct monst *));
|
||||
E void FDECL(mgender_from_permonst, (struct monst *, struct permonst *));
|
||||
@@ -1708,6 +1709,7 @@ E char *FDECL(killer_xname, (struct obj *));
|
||||
E char *FDECL(short_oname,
|
||||
(struct obj *, char *(*)(OBJ_P), char *(*)(OBJ_P), unsigned));
|
||||
E const char *FDECL(singular, (struct obj *, char *(*)(OBJ_P)));
|
||||
E char *FDECL(just_an, (char *, const char *));
|
||||
E char *FDECL(an, (const char *));
|
||||
E char *FDECL(An, (const char *));
|
||||
E char *FDECL(The, (const char *));
|
||||
|
||||
@@ -184,6 +184,7 @@ struct monst {
|
||||
#define is_vampshifter(mon) \
|
||||
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LORD \
|
||||
|| (mon)->cham == PM_VLAD_THE_IMPALER)
|
||||
#define vampshifted(mon) (is_vampshifter((mon)) && !is_vampire((mon)->data))
|
||||
|
||||
/* mimic appearances that block vision/light */
|
||||
#define is_lightblocker_mappear(mon) \
|
||||
|
||||
@@ -392,6 +392,7 @@ struct you {
|
||||
xchar skill_record[P_SKILL_LIMIT]; /* skill advancements */
|
||||
struct skills weapon_skills[P_NUM_SKILLS];
|
||||
boolean twoweap; /* KMH -- Using two-weapon combat */
|
||||
short mcham; /* vampire mndx if shapeshifted to bat/cloud */
|
||||
|
||||
}; /* end of `struct you' */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user