Take your head off first before you go buying. Although it looks bad, it may not be as bad as you think. If the piston has a hole in it, then its game, set and match. But if its only marked, then perhaps just a head job is needed. There are so many engines that have been scrapped that to be honest are salvageable, its just the owners choose the easy way out, and buy a second engine, of which there is usually no history or warranty. At least with your engine, you know what you got!
If you do buy an another engine, then see if you can hear it run first, if possible to a compression test. Or drag one out of a smashed car. At least then you know the car is not being broken or scrapped due to a possible dodgy motor.