Okay, so I was experimenting and managed to (at least I think) fix the problem, by making a slight script alteration here:
target.item_effect(@item, battler) where I altered it to this- target.item_effect(@item) I tried it and it works, but I am no scripter, so I have no idea if this will cause any problems down the line. Does anyone know if that was a bad move? If so please let me know and I will continue searching for a better solution.
Any input on this would be greatly appreciated. Thank you!