Based off the work originally done by CaptainMuscles - https://www.romhacking.net/hacks/1769/
And another thanks to Disch for his disassembly work that makes doing these things both fun and fast!
Edit: Several bugs fixed since the original post!
This link is to a Google Drive folder. In the folder are 6 files:
* 2 versions of Bank C.asm for use with Disch's Disassembly
* A stand-alone Dynamic Action ReJiggered patch, one with normal enemy regen, one with bonus enemy regen
* A version of the Dynamic Action ReJiggered patch to be merged with FF Restored, one with normal enemy regen, one with bonus enemy regen - note that due to overlapping edits, these two take out FF Restored's ability to have enemy damaged by the poison ailment. If you tweak spells in your own rom to inflict the poison ailment on enemies, it will have no effect, like in the original game. These two are addendums to FF Restored! Patch Restored in first, then one of these.https://drive.google.com/open?id=14CImXsgmcxyqwl87ClSNJOZITlQxKxdQ
The aim of this was to fix the bugs and quirks of the original. I've done a bit of testing so far to catch those game-freezing bugs and other anomalies, but some weird things might have slipped through.
Running needs to be stress-tested, due to the triple RTS I had to put in. On some turns, a successful run would say "Close call" then continue the battle, while others would actually run from it. I've confirmed this is due to the original double RTS skipping back to the @NextTurn part of DoBattleRound, as the same issue was found when defeating all enemies--the battle would just continue on. But it only did this half the time, so a triple RTS might end up being just as bad in some cases?
Enemy roster and command menu only opens up when a character can act.
Character does not step back until they perform an action.
Pressing B while choosing a command will only reset the cursor, nothing else.
Player poison effect happens at the end of their action, instead of all poisoned players getting damaged at the end of the battle round.
Enemy regeneration effect happens at the end of their action, instead of all regenerating enemies regenerating at the end of a battle round.
If a character is muted, trying to pick an action other than Fight or Run will result in a brief "Silenced" message popping up.
I've done my best to make sure the original game's addresses are intact, with the most notable exception being "InputCharacterBattleCommand", where I put the NOPs above it rather than below, so that the space might be used without interrupting the flow into "Battle_MainMenu_APressed"--and since the routine above it needed to be extended by 2 bytes anyway.
Stepping back has been added to the Running Attempt routine, and some useless code has been NOP'd out to make room for that, as well as a triple RTS to fix a bug I made.
Enemy regeneration has been shortened to not loop through all enemies.1
BacktrackBattleCommand has been almost entirely replaced by a check to see if a character is muted. Battle_MainMenu_APressed has been given a JSR to this check, moving the first half of it it upward 3 bytes.
Just about the entirety of UndoCharacterBattleCommand has been replaced with more robust Turn taking routines:
* A check has been added to make sure a player is alive (not stoned or dead) before even drawing commands for their turn.
* If alive, draw roster box, command box, get input, and perform their action.
* Check if the battle is over - does a double RTS out of the PlayerTurn routine, so requires another check to double RTS out of the BattleRound routine.
* If not over, apply poison.
* Update character HP and status.
* Return and check again if the battle is over.
* Do their turn as normal
* Update character HP and status
* Check if the battle is over (player died or enemy died of confusion)
(this was causing a bug and is not needed)
* Apply regeneration to enemy
* Return and check again if the battle is over.1
On Enemy Regeneration:
First, does Enemy regeneration still work? I haven't tested it without the loop code.
Second, regenerative enemies gain 3 HP per turn. They include Catman, Troll, Seatroll, Phantom, Vampire, WzVamp, WzOgre, WrWolf, WarMech. By the time you encounter them, 3 HP is laughable (with maybe the exception of the WrWolf.)
I've included a second patch that allows all regenerative enemies to regain their 3 HP after every
enemy action. So a WrWolf with a backup of 5 wolves would gain 18 HP per round.