Personally, I would use an interface and a variable for this. Create a boolean variable ‘Friend’. Set it true for friends, false for foes (obviously). The interface would then take your instance as a target, and call the function that would return the variable. No casting should be required.