I didn’t do anything to trigger it. I just hit an enemy with the t5 hammer. The weapon was not cursed. This is most certainly a game breaking bug.
Edit: this is Experienced Pixel Dungeon
It ended this particular adventurer’s career, along with his life. That still took some time since his defense value was rather high and warlocks didn’t have a ranged shot on him since he was already swarmed.