Routine 03D126 (Miracle Sword level-up bonus)
First, check the user’s weapon = Miracle Sword
Str : C0 : 11000000
Skill : 60 : 01100000
WpnLv : 30 : 00110000
Speed : 18 : 00011000
Luck : 0C : 00001100
Def : 0C : 00001100
HP : 06 : 00000110
Memory[0030] = counter that constantly loops from 0x00 to 0xFF
Memory[0030] AND (values from above table)
If result = 0, then level-up bonus = +2
Otherwise, level-up bonus = +1
So basically, there’s a 25% chance of a proc becoming +2