I actually avoided handing you the defender data in the might, hit and crit routines, because for just a single character, like in the stats screen, it had some weird effects. But I’ve got them documented now so, idk, maybe I’ll add it back in.
Either use the post-calculation module or the pre(or post)-rng-rolls module. Using the former allows for changed that show up on the R-menu of the unit’s data and for battle-by-battle changes. Use the second for round-by-round changes.
E.g. +5 defense against mounted units – I used post-calculation (Check if the opponent’s class is in the effectiveness pointer for the Zanbato/Longsword and if so, give +5 defense for the wielder)
Always 100% hit – I used pre-rng-rolls(Put 0x64 into the battle stats data)
SNES Criticals – I used post-rng-rolls (check if the critical bit is set in the battle buffer, and if so, change the damage dealt to what the SNES formula would be based on the battle stats data)
When I actually release this and gather all my files, there’ll be a ton of documentation for you to peruse through – you’d probably be most interested in the order of calculations, which is a condensed version of my “Charting The Battle Stat Computations” but also notes where the modules are inserted.
tbh i’m more interested in how things would work if there’s two weapons that both alter final hit in different ways and how the priority is determined if they fight each other
Here’s the latest bundle of all the sources(for the Fire Shell installation), dumps, and documentation you need to develop things. If anything is unclear, let me know so I can update the documentation.