Again, something I had to hunt down when doing my Mag–>Res hack, but I figure it won’t hurt to document it since I’m mucking around in range calculations anyway.
80184B4 <-- Determines range for Mag/2 staves. If the range is less than 5, it sets it to 5.
More in detail on what calls it:
The routine is at 08016FCC. The first bl call after that checks if you can wield the staff in question (Checking both weapon levels and statuses like sleep, berserk, silence). Then it loads the weapon’s range on line 08016FF8, and gets its max range on the next line. If the max range is zero, then that indicated a Mag/2 staff.
r6 is made to be 0x63. Don’t know what that signifies, but when Mag/2 range is used, r6 is loaded with 0x63(furing compares and such you’ll see a random cmp r6, #0x63 and that’s what it’s looking for)