we can do a combination here :
(2) We keep the system but we provide the veterancy when the damage is applied, instead of when the unit dies. This prevents table allocations.
veterancy is gained on damage, up to the amount needed for next level -1
(3) We go back to the 'on-kill' notion, where the killer takes the mass value of the killee. This prevents table allocations.
xp for the unit that gets the kill will allow it to pass the threshold to vet
could also do a version where the kill could vet units in a certain close radius
this would require some separation of the vet bar from the total mass kill/damaged amount (which we want to keep to see how much value the unit got)
i wonder if a small, visual battlefield indicator of units vetting would be worth adding? (yes ex-dota player here)