This is a hack of the NES Final Fantasy (FF1) that changes the way spell charges (MP) are used: if you cast a level-N spell but don’t have any level-N charges left, it will consume a higher-level charge, if you have any.
In other words: you can sacrifice a spell charge of one level to cast a spell of a lower level. The game will use the lowest-level spell charge that will work for the spell you’re trying to cast.
For example: if your Black Mage is out of level-3 spell charges for LIT2, but still has level-4 and level-5 charges remaining, you can still cast LIT2: it will consume the level-4 charges first, then level-5, and so on. Only if you have no level-3 through level-8 charges remaining, will you be unable to cast the level-3 spell.
This is a relatively small ASM (code) hack to implement those rules. It works for spellcasting both inside and outside of battle.
Conversely, the hack implements only those rules. You
should be able to apply the patch to an existing hack in
order to include those rules, without changing anything else.
(Unless the hack has already made use of some of the scant free
space that this hack makes use of: mainly the
“FINAL FANTASY” ASCII text near the end of the ROM,
and a bit of free space just before that.)
Feel free to use this in your own hack; if you do, I only ask for due credit.