This is a Damage Distribution script that I'm dubbing as 'Spirit Link'.
The way this works, if the target has the 'Spirit Link' state, the damage will be spread out and divided amongst all of the target's allies that also have the 'Spirit Link' state, effectively reducing the damage that the target takes.
This script can also produce a related negative state that will deal a portion of the damage the target took to its allies. This portion will then be divided amongst the target's allies equally, thereby increasing the total damage taken by the troop/party. This would then somewhat emulate 'Cleave' damage, where damage pierces through the target and strikes its allies as well.
This script allows for multiple 'Spirit Link' states, each with their own share percentage rates. Declare the state id's and their corresponding share rates in the script itself.