fix #H7060 - polymorph zap vs long worm
A polymoprh zap which creates a long worm can hit and transform the same monster again depending upon tail segment placement. Similar behavior occurs if monpolycontrol is set in wizard mode and player chooses 'long worm' for what to transform an existing one into (in which case polymorph fails and zap might hit that same worm again in another segment, prompting player to choose its new shape again). Simplest fix would be to make tail segments be immune to polymorph, but that would prevent players from deliberately attacking the tail (for polymorph attacks only). Next simplest would be to make long worms M2_NOPOLY so that polymorph can't create them, then just live with multiple promptings when monpolycontrol is set. This fix tracks whether a long worm has just been created via polymorph (or explicitly retained its shape via monpolycontrol) and makes further hits on same creature on same zap have no effect. It does so by setting mon->mextra->mcorpsenm to PM_LONG_WORM when a long worm is result of polymorph, and setting context.bypasses to get end-of-zap cleanup. (It doesn't bother discarding mon->mextra if reset of mcorpsenm leaves mextra empty.)
This commit is contained in:
@@ -125,6 +125,8 @@ poly'd shapechanger and hiding mimic will revert to normal when cancelled,
|
||||
like werecreature in beast form and non-Unchanging hero
|
||||
cancelled shapeshifter is no longer able to change shape
|
||||
cancelled shapeshifter hit by polymorph magic will become uncancelled
|
||||
polymorph zap which creates a new long worm (or retains an old one via wizard
|
||||
mode monpolycontrol) can hit that worm multiple times (tail segments)
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
Reference in New Issue
Block a user