For example, here is the code for the ice bridge spell. HEAT is a built-in spell that costs 1 mana for each unit heated or cooled. The PILLAR spell casts HEAT once, so it costs 50 mana. The BRIDGE spell casts PILLAR once every loop (10 per sec) so we estimate it being worth PILLAR * 10; 500 mana.