I've been looking at this since a few days too, and found the above (about damage) and some more ...
The random values are at $00AC-00AF, and randomized at $FDD3:
Carry = ($00AC & 2) xor ($00AD & 2)
Shift $00AC-00AF one bit to the right, with carry
$00AC += 5
$00AD += 7
$00AE += 11
$00AF += 13
This is usually called once per frame, sometimes not, sometimes more (when multiple random values are needed in the same frame?) ... all 4 bytes are used for different things, and the values can even change outside of this function.
Then, for damage (normal attacks):
Before the attack animation (damage is calculated after):
$00AC += $00AD
$007C = $00AC
pow = weapon power
if STR and INT are both below the weapon's requirements (at $E740-E767):
pow /= 2
if ($007C >= #$F0) (1/16 chance for critical hit)
mult = 51
else:
$00AD += $00AE
X = $00AD & #$0F
mult = $9938,X (1/8 chance for 20, 3/8 for 23, and 1/2 for 25)
dmg = STR * (HP digits)²
dmg *= pow / 256
dmg *= mult / 256
dmg *= (255 - defense) / 256
if your side is attacking, and you're in a boss battle, and not on the left tile from Nan Yang (Yuan Shu):
X = battle id
dmg *= $9948,X / 256 (castle defense)
if Cheng Nei is effective:
dmg *= 281 / 256 (1.1x)
if the target is defending:
dmg /= 2
if Ji Rou is effective:
dmg /= 2
if Bei Ji is effective:
dmg *= 2
else if hidden soldier attack (Fu Bing):
dmg *= 179 / 256 (0.7x)
dmg += 1
limit to remaining HP
Also a few more variables:
$0060-0061: Y position (mod 15, / 15)
$0062-0063: X position (mod 16, / 16)
$0075: battle id
$0078: attacker
$0079: target
$007A: side attacking (0: player, 1: enemy)
$6222-6231: various tactic effects, Jie Ce clears them
$61D0-61D9: #$80 = defending
$6221: hidden soldier attack (when Fu Bing is effective)
$6222:
#$01 = Ji Rou
#$02 = Wuo Jian
#$04 = Shui Jian
#$08 = Cheng Nei
$622E-622F: Bei Ji (one bit per character, each side)
$6230-6231: Fu Bing (one bit per character, each side)
My goal with this (hopefully) is to determine the exact results from All-Out (given a starting state) and bruteforce the delays and cancels, as well ... but instead of doing it through the emulator with lua, I'd simulate it all in C so it can calculate much faster, like I've done with Monopoly and Dragon Warrior.
This does mean I'll have to figure out every single thing involved, from formulas to how many times the random values change between uses, and so on, and it seems a little more complicated here ... but once I find out how the turn order is determined, and how enemies use tactics, this should be a good start.