#============================
# Wands
#============================
+!wand of wonder
+
wand of stone to mud#!k!s
wand of teleport other#!k!s
wand of disintegrate#!k!s
wand of rockets#!k!s
+wand of dragon's flame#!k!s
+wand of dragon's frost#!k!s
-~wand of dragon's flame#!k!s
-~wand of dragon's frost#!k!s
-~wand of drain life#!k!s
+# Magic-eaters should pick every wand except for useless ones.
+?:[EQU $CLASS Magic-Eater]
+magical devices:wand
+# Otherwise leave these wands on the floor.
+?:[NOT [EQU $CLASS Magic-Eater]]
+~wand of drain life#!k!s
~wand of confuse monster
~wand of sleep monster
+?:1
#============================
# Staffs
staff of healing#!k!s!d
staff of power#!k!s!d
+# Magic-eaters should pick every staff.
+?:[EQU $CLASS Magic-Eater]
+magical devices:staff
+?:1
+
#============================
# Rods
#============================
rod of stone to mud#!k!s
-~rod of confuse monster#!k!s
-~rod of sleep monster
-~rod of acid bolts
rod of acid balls
-~rod of fire bolts
rod of fire balls
-~rod of frost bolts
rod of cold balls
-~rod of lightning bolts
rod of lightning balls
+# Magic-eaters should pick every rod.
+?:[EQU $CLASS Magic-Eater]
+magical devices:rod
+
+# Otherwise leave these wands on the floor.
+?:[NOT [EQU $CLASS Magic-Eater]]
+~rod of acid bolts
+~rod of fire bolts
+~rod of frost bolts
+~rod of lightning bolts
+
+~rod of confuse monster#!k!s
+~rod of sleep monster
+?:1
#============================
# Chest
!amulet of adornment
!amulet of teleportation
+#============================
+# Class: Magic-Eater
+#============================
+?:[EQU $CLASS Magic-Eater]
+
+# Staff of Perception
+A:\e\e\e\\mAf
+P:^o
+
+# Rod of Trap Location
+A:\e\e\e\\mCa
+P:^t
+
+# Rod of Illumination
+A:\e\e\e\\mCe
+P:Q
+
+# Wand of Magic Missile
+A:\e\e\e\\mBp*t*\e
+P:X
+
+# Wand of Stinking Cloud
+A:\e\e\e\\mBo*t*\e
+P:^c
+
+# Wand of Stone to Mud
+A:\e\e\e\\mBg
+P:S
+
+?:1
+
#============================
# Class: Ninja
#============================
lights
poison needle
gold statue
-!wand of wonder
!statue
armors:dragon#%all
!unreadable second spellbooks
?:[AND [GEQ $LEVEL 10] [NOT [EQU $CLASS Weaponsmith]]]
-!{average}
-!(+0,+0)
-!,+0]
+average weapons
+average armors
?:[AND [GEQ $LEVEL 25] [NOT [EQU $CLASS Weaponsmith]]]
-!{good}
+good weapons
+good armors
?:[AND [GEQ $LEVEL 49] [NOT [EQU $CLASS Weaponsmith]]]
-!{excellent}
+ego weapons
+ego armors
?:1
~unreadable third spellbooks