Genericized whether a square is being targeted. Cleaned up legal castle and in check functions.