I just tried it out and was able to mod warrior to upgrade to a Great Prophet. It cost 20 gold so it must default negative sums to 0.
Might not work that great but I can't see any other way to do it. The integer entry, bUnitClassUpgrade, inside each UnitClassUpgrade tag might have something to do with the upgrade cost but none of the references I've found says what the integer does.