upgrade discount is an original glest feature. Look at magics initiate. he needs 2 energy to morph and gets one back after morphing.
Actually, there's no such thing as upgrade discount. There is
<discount value=""/> as John mentioned, which returns resources AFTER the morphing is complete, as a percentage. In GAE, there's also
<cost-modifier value=""/> which does the same thing, but takes the resource cost off BEFORE (so you don't need the full resources to begin the morph). However, it is not a child of
<upgrade-requirements />.
As a future note, you can find the correct syntax of EVERY XML tag in Glest and the majority of GAE/MG tags on the wiki, with syntax highlighting and full explanations.
Command XMLs such as for morph are here:
https://docs.megaglest.org/XML/CommandsAnd a full list here:
https://docs.megaglest.org/XMLs