This page explores some of the detail and math behind S/L (Save/Load - explanation) and the RNG (Random Number Generator), for those who are interested in such stuff...
The first thing to state is that the RNG is not randomly calculated whenever you take an action with a random component. After much testing it's become clear that whenever you enter a floor of a maze an 'RNG table' is generated, looking something like the below:
The actual table will be much longer than this of course, but you get the idea.
Now the success and failure of each action will be calculated by checking the difficulty of the action against the entry on the table, in sequence, and determining the outcome of each 'roll'.
For actions which are not pass/fail, such as determining which type of swordsman scroll you'll get, I've theorised that each outcome would have a number range against it, so the game will check the number in the table and give the relevant result.
SO WHAT I hear you cry, well there are multiple outcomes of this, the first being that you can avoid expensive upgrade failures using the S/L method, knowing that they are repeatable, you can go into a level, spam upgrade attempts, note which one in the sequence passed, and load and burn a sequence on something else and get your success.
You can also use this to get only the swordsmanship scrolls you want, same technique.
Lastly, S/L 30 most likely resets the table (unconfirmed)
Getting hit (hit or dodge)
Hitting the enemy (hit or dodge)
Item upgrades (pass/fail)
Chest contents (unlikely on table)
Drops (likely on table)
Things which could be further investigated are as follows:
1. Confirmation of what uses the RNG table
2. Whether there is definitely only one table or if anything has a separate table
3. Percentage difficulties for gear upgrades (can be done by establishing table using SL and combat tests)
4. As above for swordsman scrolls
Not a comprehensive list...