Polymorph trap

A polymorph trap changes you to a new species, in the same manner as a polymorph spell, potion or wand. They are generated whenever (Dlvl+XPlvl)/2 >= 8.

Effects
You, and the trap, are not affected if you have either magic resistance or unchanging. Otherwise, the following may happen:


 * If you have polymorph control, you get to choose which monster to become
 * If you are wearing dragon scales or dragon scale mail, you turn into that colour dragon
 * If you have lycanthropy, you switch between your animal and were forms
 * If you are a vampire or vampire bat, you switch between the two
 * Otherwise, you have a (19-Con)/20 chance of suffering a system shock: you sustain d30 damage and exercise your constitution.

If none of the above happened, you polymorph into a random monster, or "feel like a new ". (this redistributes your attributes and changes your level up or down).

This transformation will destroy your shirt, body armor and cloak if you polymorph into something LARGE or bigger, a non-humanoid MEDIUM or bigger, or a gargoyle or marilith (wings and extra arms don't fit).

The trap then disappears.

Monster usage
Monsters can use polymorph traps. Weak monsters sometimes deliberately step on them for a chance of becoming something nastier. When a monster uses the trap, it is not used up.

If a monster uses a polymorph trap, you can sometimes hear it from anywhere on the level:

You hear a thud You hear a clank You hear a cracking sound You hear a ripping sound

A thud means a monster slipped out of its body armor. A clank means a shield or helmet fell to the floor as a monster became handless, tiny or horned. A cracking sound means a monster polymorphed into something too big or the wrong shape for its body armor, and the armor was destroyed. A ripping sound means a monster's shirt or cloak was destroyed as it polymorphed into something too big.

Strategy
If you have valuable armor which you would rather not have destroyed by the trap, you can proceed in relative safety by searching ([s]) every square until you find it.

If you are immune to being polymorphed, you can displace your pet onto the trap to have it turn into a random monster. You can keep doing this until your pet is something useful or powerful, or turns into a (baby) gray dragon, at which point it too is magic resistant, and is no longer affected by the trap.