On the Subject of Recolored Switches

Oh no, it's one of these module chains again.

Oh no, it's one of these module chains again.

Oh no, it's one of these module chains again.

  • The module has five colored switches and 10 LEDs beneath them. If the switches aren’t colored or there are lit LEDs other than the upper left one, you’re looking at a different module.
  • Each switch can be orange, green, purple, turquoise, blue, or red. The first LED in reading order is one of the colors mentioned above or white, all the other LEDs are unlit.
  • To disarm the module, based on the LEDs, flip a switch each stage for 10 consecutive stages.
  • After a switch is flipped, the next LED in reading order will light up and another input will be requested.
  • If the incorrect switch for a stage is flipped, a strike will be incurred and the switch will not flip.
  • Follow the rules below for each LED.

NOTE: “not present =” means “If the aforementioned switch is not present…”

Orange:
  • If a blue switch is present, flip the 3rd switch.
  • If there is a vowel in the serial number, flip the 1st switch.
  • If an orange LED was present before this, flip the switch above the first orange LED.
  • Otherwise, flip the 5th switch.
Green:
  • If there is a lit CAR, BOB, or NSA, flip a purple switch, not present = 2nd switch.
  • If a Two Factor is present, flip the 1st switch.
  • If there are no red, green, and blue switches, flip any switch.
  • Otherwise, flip the 4th switch.
Purple:
  • If this is the first LED, flip the 5th switch.
  • If the switch above this shares its color with this, flip it.
  • If the number of green and purple switches is greater than the number of lit LEDs, flip a green or purple switch, not present = 3rd switch.
  • Otherwise, flip the 2nd switch.
Turquoise:
  • If this LED is at an even position in reading order, flip the switch above this.
  • If this LED is adjacent to a blue or white LED, flip the 1st switch.
  • If the bomb has no batteries, flip a switch above a lit LED.
  • Otherwise, flip the 3rd switch.
Blue:
  • If there is an unlit FRQ, IND, or SND, flip the switch position equal to the number of indicators.*
  • If this is the last LED of a row, flip the 1st switch.
  • If this LED is on the top row, flip the 5th switch.
  • Otherwise, flip the 3rd switch.
Red:
  • If the sum of the serial number digits < 10, flip the switch position equal to the last digit of the serial number.*
  • If this is the first red LED, flip a red switch, not present= blue switch, not present = 4th switch.
  • If there are any strikes, flip the switch position equal to the number of strikes.*
  • Otherwise, flip the 5th switch.
White:
  • If there is more lit LEDs than unlit LEDs, flip the switch above the first unlit LED in reading order, or the 5th if there are none.
  • If there is any other module with the word "switch" in it's name other than "Recolored Switches", flip the switch whose position is equal to the count of these such modules that are present on the bomb.*
  • If there is a turquoise or orange switch, flip the 3rd switch.
  • If the last character of the serial number is a number, flip the 4th switch.
  • Otherwise, flip the 9th switch.

* If this value is not within 1-5, add or subtract 5 until it is.