there should be a chance per shot that a cartridge can be under powered (slightly less damage and does not cycle another round)
or be overpowered. in the case of it being overpowered there would be a 50% chance that the cartridge will do slightly more damage however it would do damage to the gun. and a 50% chance that the cartridge explodes. in the event that it does explode there should be a 70% chance that it ruins your weapon and deals a small amount of damage. and a 30% chance it deals a ton of damage or even just kills you.
the chances should scale based on a couple of things.
1: the condition of your weapon
2:the condition of your cartridges
3: condition of your magazine
4:weather (how could it is and is it raining)
(there should also be chances for other malfunctions but if i list all of them i will be here all night)