If I polypile a bunch of elven cloaks (boots, etc), will I get just cloaks (boots, etc)

nethack

I'm in need of a cloak of MR, and have amassed a large collection of elven cloaks and boots as well as a couple of robes. Being magical armor, I know that I have a shot at getting magical armor by polypiling. The wiki says that items stay within class– "potions beget potions, wands beget wands, etc", but doesn't really say "cloaks beget cloaks." Am I right in thinking that I may well end up with a bunch of non=magical gloves, shields, helms, and armor instead of any cloaks at all? Does the material cloth, leather metal)have any bearing?

Best Answer

An object's class is its symbol. Cloaks, gloves, shields, helms, and armor are all displayed in text mode as [, so they're all the same class. As a result, polymorphing a stack of cloaks will produce a mix of shirts, cloaks, armor, gloves, shields, helms, and boots.

The game makes a reasonable effort to match the magical/non-magical status of the result of polymorphing an object. Because your elven cloaks and boots are considered magical, there will be a decided bias towards producing gloves, cloaks, boots, and helms.