This script allows the creation of a "Reflect" state. When a party member casts a spell on an enemy that was given the Reflect buff, the spell is bounced back at the caster.
However, if I use a spell that targets all enemies while only one of them has reflect, none of them will get hurt and the spell will be bounced back at all of my party members.
Is there anyway to make it so that only enemies with reflect are immune to a spell when it targets all enemies? And so that it only gets bounced once for every enemy with reflect?
The main issue here is because if one of my party members has Reflect, when an enemy will cast a spell that targets all of my party, I don't want those without reflect to be immune to the spell. I also don't want the enemy to be punished more than once for every character with the Reflect buff.
Thanks for your help!