From release notes:
New ability: Magic! (may release a shock, slowdown or poison on enemy killed)
I've looked into the code and looks like based on lvl it randomly throws one of:
if LV>3 then table.insert(weap,'slowdown-capsule') end
if LV>6 then table.insert(weap,'poison-capsule') end
if LV>9 then table.insert(weap,'cluster-grenade') end