On the Subject of LEGO Removal

You know, people always talk about how painful it is to step on LEGOs. Personally, I think being blown up by them is worse.

A structure of randomly stacked and assorted LEGO bricks is placed onto a multi-colored 16×16 baseplate. The structure is made up of 42-70 bricks, and is 7-10 layers tall. The baseplate also has three screens and a button.
Each brick will be one of 12 sizes from the list in Appendix BRICK on page 3, and one of 28 colors from the palette in Appendix COLOR on page 4.

In order to solve the module, the defuser must dismantle the structure while following three different sequences and an incrementer:

  1. Base Sequence:
    • A sequence of digits 0-3, each standing for different removal orders.
      • 0: Color ID
        • Remove selectables by their Color ID (Appendix COLOR).
      • 1: Size (area)
        • Remove selectables by their area in studs (Appendix BRICK).
      • 2: Support Studs
        • Calculate the # of brick studs each selectable is placed on top of.
      • 3: Layer Number
        • Determine what layer each selectable is placed in.
        • The bottom layer is 0, and the top layer will be between 6-9.
  2. Direction:
    • A binary sequence, applied to digits in Base Sequence.
      • 1 = lowest value first, 0 = highest value first.
  3. Increment Brick:
    • A specific size brick. Removing it from the structure will point the module to the next digit in Base Sequence and Direction, looping to the first digit after passing the last one.

Attempting to remove a brick in the wrong order will incur a strike. This resets each sequence to the first digit, and resets the Increment Brick. The brick you attempted to remove will be left in its place. Example below:

Type of Brick removed: Valid Valid Inc. Inc. Inc. Inc. Invalid
Base Sequence:
Direction:
 
231
010
^
231
010
^
231
010
  ^
231
010
    ^
231
010
^
231
010
  ^
231
010
^
  1. Use the serial # to find the Base Sequence.
    • Remove each letter from the serial #.
      • “81ACH7” ⇒ “817”
    • Replace each digit with the result of this formula:
      • (digit + (# of Beams)) mod 4

  2. Use the serial # to find the Direction.
    • Remove each number from the serial #.
      • “81ACH7” ⇒ “ACH”
    • Convert each letter from Base-36 to Base-10 (A=10, Z=35),
      then replace each with the result of this formula:
      • (letter + (# of Stud bricks)) mod 2
    • If the Direction and Base Sequence are of different lengths,
      you must loop accordingly.
    Ex. Base Sequence: 3210 3, 2, 1, 0… Layer Supp. Size Color
      Direction: 01 0, 1, 0, 1… High Low High Low
  3. Find the Increment Brick.
    • Take the sum of each brick’s size on the current topmost layer,
      modulo 12, then plug it into the brick list in Appendix BRICK.
      • 0 = the Stud, 11 = the 2×4
    • The increment brick will reset upon a strike.


Only selectables are considered when following sequences (bricks with nothing placed on top of them). If removing a brick completely uncovers another, it becomes a new selectable and is now a part of the sequence. Bricks of the same value may be removed in any order.

The Button

Clicking the button will highlight every selectable brick. It’s highly probable for selectables to be hidden behind other bricks, so take care in making sure every selectable is accounted for.

Appendix BRICK

Any of these bricks could appear in the structure. In the list below is a top-down view of each brick, plus a side view if they are a 1×1.

A Beam has a size of 3, and the layer it belongs to is the layer of its base.
All other 1×1s have a size of 1. Singles placed atop one another will never be the same color, and nothing can be placed atop the Stud brick. All other bricks act normally.



Appendix COLOR

The palette is in ROYGBIV order, plus white. Each color starts with its transparent material, then moves from its shade to its tint.

Hovering over a brick will display its Color ID on the three screens.
"Bright Red," would be displayed on the screens as, “002.”

T 0
Red
  1
Maroon
2
Bright Red
 
T 10
Orange
    13
Orange
 
T 20
Yellow
    24
Brgt. Yellow
26
Vanilla
T 30
Green
  32
Earth Green
34
Jade Green
36
Mint
T 40
Blue
  42
Earth Blue
44
Azure
46
Cornflower
T 60
Indigo
  62
Night Blue
64
Indigo
 
T 70
Violet
  71
Dark Plum
72
Violet
73
Bright Pink
T 100
White
120
Black
140
Dark Stone
160
Light Stone
200
White