On the Subject of Alphabetical Ruling

I used to rule the world - Cs would rise when I gave the word.

This module has nine buttons and two displays, one with a number and letter, and one with the stage number. This module has three stages. In each stage, look up the letter on the top display in the table below, and apply the instruction to the number on the top display. Modulo the final result by 10 and press that digit (if it’s zero, add 1).

When an incorrect number is pressed, the module will stay at its current stage and strike. Correctly getting through all three stages will solve the module.

A Subtract the last digit of the Serial Number. N If there are 2 batteries, 1 holder, and an PS/2 port, subtract the factorial of the last digit of SN. Otherwise, Add the number of Kugelblitz modules.
B Add the number of Parallel ports. O Add 81.
C Add the number of Battery Holders. P Add the number of Serial ports.
D Subtract the number of AA batteries. Q If the number of ports is more than 2, add the number of port plates + 2. Otherwise, enter the digit.
E Add 280. R Add the number of D batteries and the number of PS/2 ports, then subtract the sum of the digits in the serial number. (If this is negative, Make it positive)
F Modulo by 6. S Add the sum of the digits in the serial number.
G Subtract 69. T If the sum of the digits in the serial number is higher than ten, multiply by five. Otherwise, multiply by ten. (If this is at least 100, modulo by 100.)

H–M and U–Z are on page 2.

H Add the number of PS/2 ports. U Add the number of digits in the serial number.
I Subtract the number of OmegaForget modules on the bomb. V If there is a module with the word “Forget” in it on the bomb, add the number of batteries times two. Otherwise, multiply by 49.
J If the bomb has the module "The Necronomicon" and the last digit of the serial number is not 0 or 9, then reference the wheel chart from The Necronomicon's manual on page 6 and do the following:
- Assign each name to a number 1–8 going clockwise, starting with 1 for Azathoth and ending with 8 for Hastur
- Find the number on the outermost section of the circle under the name with the last digit of the serial number
- Add this number
Otherwise, add the number of PS/2 ports.
W Multiply the digit by 25.
K Add the number of indicators. X Add the sum of Batteries and Battery holders.
L If the number of batteries is four, the number of battery holders is three, and the number of ports is two, input the digit as-is. Otherwise, add three. Y Add the number of port plates minus 1.
M Add the number of modules. Z Add 11.