For example, what if your theoretical weapon has accuracy = firing*0.5 + throwing*0.5 ? Which experience point would you award?
From looking at the file, Piratez does include a mortar which uses 0.5 throwing and 0.5 shooting.
No matter what you decide to code in case of a tie, the mod itself can choose to set one of the accuracyMultipliers to 0.5 and 0.501, to explicity state the tie-breaker.
About the existing experience given by grenades/proxies : It works because battle items have a _previousOwner field, it points to who threw or dropped it.
If/when item sets off, this field is passed to the
new ExplosionBState()as the last (optional) argument. In turn, when
ExplosionBState::explode() calls
TileEngine::explode(), it passes this unit as the last (optional) argument.
There are two cases where
TileEngine::explode() receives a unit : when a fired weapon causes AOE, and when an explosive item which was carried by someone sets off. It's tricky because at this point in the code, there's no longer any track of HOW the damage was caused.