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:
@@ -2108,6 +2108,10 @@ do_class_genocide()
|
||||
kill_genocided_monsters();
|
||||
update_inventory(); /* eggs & tins */
|
||||
pline("Wiped out all %s.", nam);
|
||||
if (Upolyd && vampshifted(&g.youmonst)
|
||||
/* current shifted form or base vampire form */
|
||||
&& (i == u.umonnum || i == g.youmonst.cham))
|
||||
polyself(3); /* vampshifter back to vampire */
|
||||
if (Upolyd && i == u.umonnum) {
|
||||
u.mh = -1;
|
||||
if (Unchanging) {
|
||||
@@ -2226,6 +2230,10 @@ int how;
|
||||
continue;
|
||||
}
|
||||
ptr = &mons[mndx];
|
||||
/* first revert if current shifted form or base vampire form */
|
||||
if (Upolyd && vampshifted(&g.youmonst)
|
||||
&& (mndx == u.umonnum || mndx == g.youmonst.cham))
|
||||
polyself(3); /* vampshifter (bat, &c) back to vampire */
|
||||
/* Although "genus" is Latin for race, the hero benefits
|
||||
* from both race and role; thus genocide affects either.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user