Simulating reactions on Lammps

Good evening,

I need help implementing a reaction where the functionality of individual atoms decreases with the number of broken bonds those atoms have incurred. Take atoms with maximum functionalities of 3 in a network formation process. If an atom initially had 3 bonds, then, upon breaking all those bonds, its functionality will reduce to zero – it can no longer form bonds with other atoms. Likewise, an atom initially having one bond — and if that one bond is broken – can only form 2 bonds; its functionality has dropped to 2. Thank you.

Best,
Seun