As far i know rimworld uses xml just for read fields and data, not for describe any coded behavior.
Unless you are not activating/disattivating boolean, add or remove fields, increase or decrease values, any other kind of code will be ignored.
In other words: since the behavior you described is not used by any other weapon defs in the game should not be possibile to achieve what you are looking for by just modifying some xml code.
I'm have just begin to work on a mod and it's the first code project EVER, even little things are quite challenging to me (but quite fun i would say). However I think your idea could be done by a beginner thou, you should try to read the wiki a for setting up the C# workplace and begin to explore the code, if you want you can also follow the plagueGun tutorial, but i think you can also start right away
Unless you are not activating/disattivating boolean, add or remove fields, increase or decrease values, any other kind of code will be ignored.
In other words: since the behavior you described is not used by any other weapon defs in the game should not be possibile to achieve what you are looking for by just modifying some xml code.
I'm have just begin to work on a mod and it's the first code project EVER, even little things are quite challenging to me (but quite fun i would say). However I think your idea could be done by a beginner thou, you should try to read the wiki a for setting up the C# workplace and begin to explore the code, if you want you can also follow the plagueGun tutorial, but i think you can also start right away