Add two dice objects: a magic die and a plastic die. Both appear as “game die” when unidentified, are made of plastic, and weigh 2. Dice can be rolled by applying them or throwing them (upward or downward).

Magic dice are chargeable. They start out with 3-5 charges; uncursed charging adds 1 and blessed adds d3, up to a maximum of 7. The die can only be recharged twice.

Rolling either type of die produces a message “The die spins around and lands on [number].” Plastic dice and non-cursed magic dice use a d20 with even probability; cursed magic dice bias the result towards lower numbers such that the probability of each possible roll is proportional to 20 minus that roll (so there is a 19/170 chance of a 1, an 18/170 chance of a 2, etc.)

The effects are:

Roll Effect Message
1 You are hit by a death ray that ignores reflection and possibly magic resistance and possibly even life saving. “The die blasts you with a death ray!”
2 You are stunned, confused, blinded, and deafened for 200 turns, paralyzed for 15 turns, and inflicted with deadly illness. “You stagger and your vision blurs…”
3 You lose a random intrinsic as if a gremlin stole it. Usual intrinsic loss message
4 You suffer amnesia as if you had read a cursed scroll, and lose a point of Intelligence; this can kill you via brainlessness if it’s at 3. “You feel like your brain is getting sucked out…”
5 You suffer a standard curse items effect. “You feel as if you need some help.”
6 You lose one point in d3 different attributes that are not equal to 3, and abuse all other attributes. Usual attribute loss message
7 You gain one point of Luck, unless Luck is already +10. “You feel lucky!”
8 You take d20 physical damage (half damage does not help). “You feel excruciating pain all over your body!”
9-10 Nothing happens.  
11 A random item is generated on your square. Unspecified what happens if you are not on solid ground. “Suddenly, you see an object at your feet!”
12 You get the effect of a blessed potion of full healing. Usual full healing message
13 You lose one point of Luck, unless Luck is already -10. “You feel unlucky!”
14 You gain one point in d3 different attributes that are not at their maximum, and exercise the rest. Usual attribute gain message
15 You identify all your possessions.  
16 You gain an experience level. Usual level gain message
17 You get enlightenment. “You feel self-knowledgeable…”
18 You gain a random intrinsic that you don’t already have that could have come from a corpse. Usual intrinsic gain message
19 Your inventory is randomly blessed. “The die emits a light blue aura.”
20 You get a wish. “You may wish for an object.”

One possible alteration is to do away with both the instadeath and the wish, because it’s been pointed out that nearly all the negative effects are recoverable. The player has an incentive to hold off on rolling the die until they have the wherewithal to recover from most of the negative effects, and then roll it as much as possible in hopes of getting a wish, while suffering few permanent issues. Giving the die a chance to just unavoidably end the game to compensate for wishing abuse may be unsatisfying.