Thank you HaruN Y and H. G. Muller, that was just what I wanted. It took a little while to understand the capture matrix, but I think I have it working now:
captureMatrix=.=.!...../.=/.=...!...
In the variant I'm working on only Pawns and Bishops can encounter the same friendly piece as themselves, so only they need to be prevented from swapping with each other.
Thank you HaruN Y and H. G. Muller, that was just what I wanted. It took a little while to understand the capture matrix, but I think I have it working now:
captureMatrix=.=.!...../.=/.=...!...
In the variant I'm working on only Pawns and Bishops can encounter the same friendly piece as themselves, so only they need to be prevented from swapping with each other.