I checked everything according to the conditions five times – it works with and without a castle, and in every way. Most likely, you, Zubr, had some kind of bug. In Nesher's properties, a script for VICTORY over the purple player is written for the defeat condition. But it won't work for a human player. The VICTORY script is assigned to players by color, owner, and enemy; in my opinion, the best thing is to set it for the purple player.
And should we make a sequel?