“Rivals” is episode eleven of season two of Star Trek: Deep Space Nine.
A conman, Martus Mazur, from a race nicknamed the Listeners – people find them easy to talk to, a good ability for a conman – is arrested by Odo as he’s casing a mark. Whilst he is in lockup, he becomes acquainted with another prisoner, who has an unusual gambling device, one he claims ruined his life. The prisoner plays it, wins, and dies, and the conman inherits his gambling machine – which doesn’t look that impressive. All you do is press a button, and it makes lights and sounds. Then Martus is released from jail, as the charges against him are dropped.
Martus’s luck seems to improve. He decides to replicate the machine, on a larger scale and multiple times, and opens a gambling hall in competition with Quark. Things seem to be going well for him. Meanwhile, on the station people are suffering from unusually good or unusually bad luck. It seems the gambling device is tinkering with probabilities.
Julian Bashir is still annoying Chief O’Brien, this time on a racquetball court.