. Here is how it works.
You regain k*S energy each tick., where S is your speed and k is some constant. You can hold a total Energy of k2 * L, where L is your level.
Ordinary moves:
This move had an energy cost M. When you use the move you lose M energy. If your Energy becomes negative, you have to wait.
Priority Moves:
These have a cost P, but you dont need that much energy to use it. You only need a non-negative amount. So you "borrow" energy. As before, you have to wait to regain energy until it is no longer negative.