Built into the blade of this weapon is a pegboard used in the popular chance game of Clinker. The weapon was clearly made by an artificer with a deep passion for gambling, though it sometimes serves as an idol for a deity of luck and fortune.
---
Clinker's Pegsword
Weapon (greatsword), uncommon (requires attunement)
You have a +1 bonus to attack and damage rolls made with this magic weapon.
This weapon has 3 charges and regains expended charges daily at dawn. When you hit a creature with this weapon, but before you roll for damage, you can activate its internal mechanism for a potential bonus effect (no action required). Then roll for damage. Consult the Pegsword Effect table using the combined value of your damage roll. If you rolled three or more d6s for damage, use only the first two d6s you rolled.
Pegsword Effect
6 or 8 - Your attack is unaffected.
2 - You can immediately make one additional attack with this weapon (no action required).
3-5 - You can add 1d6 to the next attack roll you make against the target before the end of your next turn.
7 - You deal an extra 1d6 weapon damage to the target.
9-11 - The target must subtract 1d6 from the first attack roll it makes against you before the start of your next turn.
12 - You knock the target prone, provided it is Large or smaller.
---
DESIGN COMMENTARY
Before anyone gets funny with the word "Peg," please keep in mind its origins from "Pegboard" where the game is played.
You may recognize the game by its many other names such as "Plinko" or "Pachinko," but those are actually proper nouns. It's a little alarming how there isn't a widely accepted name for this game beside "pegboard ball game." I ended up creating my own ("Clinker") that is as similar to Plinko and "tinker" as possible.
I added a pinball ball launch into the sword's hilt. Fun!
The pegsword's boons were surprising to balance, too. For starters, because it requires attunement, it needed to have a base benefit (+1 weapon). The rest of the boons had to be on par with the opportunity cost for attunement (because a +1 weapon doesn't require attunement). Normally in a game of pegboard ball game, your best boons might be near the edges of the board because it's harder to achieve. However, this weapon uses the 2d6 damage roll to determine its boon (my idea to reduce the rolling delay), so I also had to take into account that rolling 12 damage is already pretty great on its own while rolling 2 damage is unfortunate.
Overall the chances of producing no additional effect (roll total of 6 or 8) is 27.8%. This is the "downside" of the gamble, which isn't that bad.