I hate spending money blindly on castle upgrades just to find out what it unlocks, because it's just a waste of money when what I unlock isn't something I want buy. Plus there are times where I'd like to unlock specific upgrades (like the class upgrades) and knowing the shortest path to unlock it would be very useful.
To this end I'd like a list of the castle upgrades and the skills required to unlock each upgrade. An answer making use of an image similiar to this XCOM research tree would be ideal.