This is in Shattered Pixel Dungeon. Went into the shop after getting enough money to buy the Ankh and was followed by a bat. Without paying attention I fought the bat and my shocking sword’s ability went off twice, bouncing into the shopkeep and making him leave. Maybe I’m just a bit salty and it’s my fault for not paying attention to the first hit/warning from the shopkeep, but I don’t think the shocking sword enchantment should threaten the shopkeep like that.
Definitely punishing. Just never fight in the shop keep room as a rule. I haven’t lost the shop keep in more than probably 100 of my last run attempts, with maybe the exception when I had the thieves armband