ShareShortcuts

Labyrinth

An ever-changing maze, with keys and new challenges with each round

xalaeth
Fork “Labyrinth”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so xalaeth gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
53K
Saved
1
Actions
484
Category
Fun
Version
1.2
Language
EN

An ever-changing maze, with keys and new challenges with each round.

What's New

Version 1.2

Added score, added room 12

Version History
1.2 Jan 15, 2021

Added score, added room 12

1.1 Jan 15, 2021

I messed up in room 14, where you would retrieve the key and infinitely be stuck.

1.0 Jan 15, 2021

First release

What it does

484 actions
  1. Calculate
  2. Set Variable
    Points
  3. Calculate
  4. Set Variable
    Room
  5. Calculate
  6. Set Variable
    D3
  7. Set Variable
    D9
  8. Set Variable
    D10
  9. Set Variable
    D8
  10. Set Variable
    D7
  11. Set Variable
    Key
  12. Set Variable
    D6
  13. Set Variable
    D1
  14. Set Variable
    D2
  15. Set Variable
    D5
  16. Set Variable
    D4
  17. Set Variable
    D13
  18. Random Number
  19. If
  20. Set Variable
    D1
  21. If
  22. Calculate
  23. Set Variable
    D2
  24. If
  25. Random Number
  26. If
  27. Set Variable
    D3
  28. Set Variable
    D5
  29. If
  30. Calculate
  31. Set Variable
    D6
  32. If
  33. If
  34. Random Number
  35. If
  36. Set Variable
    D6
  37. Set Variable
    D3
  38. If
  39. Calculate
  40. Set Variable
    D5
  41. If
  42. If
  43. Random Number
  44. If
  45. Set Variable
    D9
  46. Set Variable
    D10
  47. Set Variable
    D7
  48. If
  49. Calculate
  50. Set Variable
    D8
  51. Set Variable
    D10
  52. If
  53. If
  54. Random Number
  55. If
  56. Set Variable
    D9
  57. Set Variable
    D10
  58. Set Variable
    D8
  59. If
  60. Calculate
  61. Set Variable
    D9
  62. Set Variable
    D7
  63. If
  64. Calculate
  65. Repeat
  66. If
  67. Show Alert
  68. Choose from Menu
    Only the north exit is open.
  69. Choose from Menu
    North
  70. Calculate
  71. Set Variable
    Room
  72. Choose from Menu
    Die
  73. Stop This Shortcut
  74. If
  75. If
  76. Show Alert
  77. Calculate
  78. Choose from Menu
    The only exit is north.
  79. Choose from Menu
    North
  80. Calculate
  81. Set Variable
    Room
  82. Calculate
  83. Set Variable
    D13
  84. If
  85. If
  86. If
  87. Choose from Menu
    East door and south door are open.
  88. Choose from Menu
    South
  89. Calculate
  90. Set Variable
    Room
  91. Choose from Menu
    East
  92. Calculate
  93. Set Variable
    Room
  94. If
  95. Choose from Menu
    Dead end.
  96. Choose from Menu
    East
  97. Calculate
  98. Set Variable
    Room
  99. If
  100. If
  101. If
  102. Choose from Menu
    Three exits. A rare occurrence, in my opinion.
  103. Choose from Menu
    North
  104. Calculate
  105. Set Variable
    Room
  106. Choose from Menu
    West
  107. Calculate
  108. Set Variable
    Room
  109. Choose from Menu
    East
  110. Calculate
  111. Set Variable
    Room
  112. If
  113. Choose from Menu
    Just a boring hallway.
  114. Choose from Menu
    East
  115. Calculate
  116. Set Variable
    Room
  117. Choose from Menu
    West
  118. Calculate
  119. Set Variable
    Room
  120. If
  121. If
  122. Choose from Menu
    The door to where you came from is closed, and you are in the middle of a hall.
  123. Choose from Menu
    West
  124. Calculate
  125. Set Variable
    Room
  126. Choose from Menu
    East
  127. Calculate
  128. Set Variable
    Room
  129. If
  130. If
  131. If
  132. Choose from Menu
    Three exits. The north exit looks as though it were forced open.
  133. Choose from Menu
    North
  134. Calculate
  135. Set Variable
    Room
  136. Choose from Menu
    East
  137. Calculate
  138. Set Variable
    Room
  139. Choose from Menu
    West
  140. Calculate
  141. Set Variable
    Room
  142. If
  143. Choose from Menu
    Plain old hallway.
  144. Choose from Menu
    West
  145. Calculate
  146. Set Variable
    Room
  147. Choose from Menu
    East
  148. Calculate
  149. Set Variable
    Room
  150. If
  151. If
  152. Choose from Menu
    Awesome job! You found a brick wall.
  153. Choose from Menu
    West
  154. Calculate
  155. Set Variable
    Room
  156. If
  157. If
  158. If
  159. Choose from Menu
    The North door looks as though it was forced to be there.
  160. Choose from Menu
    North
  161. Calculate
  162. Set Variable
    Room
  163. Choose from Menu
    East
  164. Calculate
  165. Set Variable
    Room
  166. If
  167. Choose from Menu
    A dead end.
  168. Choose from Menu
    East
  169. Calculate
  170. Set Variable
    Room
  171. If
  172. If
  173. If
  174. If
  175. Choose from Menu
    A three doors are open.
  176. Choose from Menu
    West
  177. Calculate
  178. Set Variable
    Room
  179. Choose from Menu
    East
  180. Calculate
  181. Set Variable
    Room
  182. Choose from Menu
    South
  183. Calculate
  184. Set Variable
    Room
  185. If
  186. Choose from Menu
    Another hallway...
  187. Choose from Menu
    West
  188. Calculate
  189. Set Variable
    Room
  190. Choose from Menu
    East
  191. Calculate
  192. Set Variable
    Room
  193. If
  194. If
  195. Choose from Menu
    An updraft hits you. You must be near the end.
  196. Choose from Menu
    South
  197. Calculate
  198. Set Variable
    Room
  199. Choose from Menu
    West
  200. Calculate

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define color green
#define glyph dice

@Points = 0 + 0
@Room = 1 + 0
@D3 = 0 + 0
@D9
@D10
@D8
@D7
@Key
@D6
@D1
@D2
@D5
@D4
@D13
const RandomNumber = randomNumber(1, 2)

if RandomNumber == 1 {
	@D1 = RandomNumber
} else {
	@D2 = 1 + 0
}

if @D1 == 1 {
	const RandomNumber1 = randomNumber(1, 2)
	if RandomNumber1 == 1 {
		@D3 = RandomNumber1
		@D5 = RandomNumber1
	} else {
		@D6 = 1 + 0
	}
} else {
	if @D2 == 1 {
		const RandomNumber2 = randomNumber(1, 2)
		if RandomNumber2 == 1 {
			@D6 = RandomNumber2
			@D3 = RandomNumber2
		} else {
			@D5 = 1 + 0
		}
	} else {
	}
}

if @D5 == 1 {
	const RandomNumber3 = randomNumber(1, 2)
	if RandomNumber3 == 1 {
		@D9 = RandomNumber3
		@D10 = RandomNumber3
		@D7 = RandomNumber3
	} else {
		@D8 = 1 + 0
		@D10
	}
} else {
}

if @D6 == 1 {
	const RandomNumber4 = randomNumber(1, 2)
	if RandomNumber4 == 1 {
		@D9 = RandomNumber4
		@D10 = RandomNumber4
		@D8 = RandomNumber4
	} else {
		@D9 = 1 + 0
		@D7
	}
} else {
}
const CalculationResult = 100000000 + 1

repeat _ for CalculationResult {
	if @Room == 1 {
		confirm("Welcome to the ever changing maze. Fun fact: this maze has 32 different possibilities! In this game, you want LESS points, not more. So if your friend gets 5 points and you get 6, your friend has the better score. Draw out maps for each maze you explore under only one condition: HAVE FUN!")
		menu "Only the north exit is open." {
		item "North":
			@Room = 5 + 0
		item "Die":
			stop()
		}
	} else {
		if @Room == 2 {
			confirm("Congrats! You found a secret room! -5 points!")
			menu "The only exit is north." {
			item "North":
				@Room = 3 + 0
				@D13 = 0 + 0
			}
		} else {
			if @Room == 3 {
				if @D13 == 1 {
					menu "East door and south door are open." {
					item "South":
						@Room = 2 + 0
					item "East":
						@Room = 4 + 0
					}
				} else {
					menu "Dead end." {
					item "East":
						@Room = 4 + 0
					}
				}
			} else {
				if @Room == 4 {
					if @D1 == 1 {
						menu "Three exits. A rare occurrence, in my opinion." {
						item "North":
							@Room = 9 + 0
						item "West":
							@Room = 3 + 0
						item "East":
							@Room = 5 + 0
						}
					} else {
						menu "Just a boring hallway." {
						item "East":
							@Room = 5 + 0
						item "West":
							@Room = 3 + 0
						}
					}
				} else {
					if @Room == 5 {
						menu "The door to where you came from is closed, and you are in the middle of a hall." {
						item "West":
							@Room = 4 + 0
						item "East":
							@Room = 6 + 0
						}
					} else {
						if @Room == 6 {
							if @D2 == 1 {
								menu "Three exits. The north exit looks as though it were forced open." {
								item "North":
									@Room = 10 + 0
								item "East":
									@Room = 7 + 0
								item "West":
									@Room = 5 + 0
								}
							} else {
								menu "Plain old hallway." {
								item "West":
									@Room = 5 + 0
								item "East":
									@Room = 7 + 0
								}
							}
						} else {
							if @Room == 7 {
								menu "Awesome job! You found a brick wall." {
								item "West":
									@Room = 6 + 0
								}
							} else {
								if @Room == 8 {
									if @D6 == 1 {
										menu "The North door looks as though it was forced to be there." {
										item "North":
											@Room = 13 + 0
										item "East":
											@Room = 9 + 0
										}
									} else {
										menu "A dead end." {
										item "East":
											@Room = 9 + 0
										}
									}
								} else {
									if @Room == 9 {
										if @D3 == 1 {
											if @D1 == 1 {
												menu "A three doors are open." {
												item "West":
													@Room = 8 + 0
												item "East":
													@Room = 10 + 0
												item "South":
													@Room = 4 + 0
												}
											} else {
												menu "Another hallway..." {
												item "West":
													@Room = 8 + 0
												item "East":
													@Room = 10 + 0
												}
											}
										} else {
											if @D1 == 1 {
												menu "An updraft hits you. You must be near the end." {
												item "South":
													@Room = 4 + 0
												item "West":
													@Room = 8 + 0
												}
											}
										}
									} else {
										if @Room == 10 {
											if @D3 == 1 {
												if @D2 == 1 {
													menu "Three exits! Another rare occurrence." {
													item "South":
														@Room = 6 + 0
													item "East":
														@Room = 11 + 0
													item "West":
														@Room = 9 + 0
													}
												} else {
													menu "A ragged, crumbling hallway." {
													item "East":
														@Room = 11 + 0
													item "West":
														@Room = 9 + 0
													}
												}
											} else {
												if @D2 == 1 {
													menu "Fork in the road. Same boring walls of impending doom" {
													item "East":
														@Room = 11 + 0
													item "South":
														@Room = 6 + 0
													}
												}
											}
										} else {
											if @Room == 11 {
												if @D4 == 1 {
													if @D5 == 1 {
														menu "An updraft hits you. Must be close." {
														item "East":
															@Room = 12 + 0
														item "North":
															@Room = 15 + 0
														item "West":
															@Room = 10 + 0
														}
													} else {
														menu "Just another hallway... to a special room..." {
														item "East":
															@Room = 12 + 0
														item "West":
															@Room = 10 + 0
														}
													}
												} else {
													if @D5 == 1 {
														menu "Going up north, closer to the exit..." {
														item "North":
															@Room = 15 + 0
														item "West":
															@Room = 10 + 0
														}
													}
												}
											} else {
												if @Room == 13 {
													if @D7 == 1 {
														if @D6 == 1 {
															menu "It seems hot and muggy in here." {
															item "North":
																@Room = 16 + 0
															item "South":
																@Room = 8 + 0
															item "East":
																@Room = 14 + 0
															}
														} else {
															menu "How did you get to where you are? Did you cheat? I swear it's impossible to get to a room like this but I coded it anyway." {
															item "East":
																@Room = 14 + 0
															item "North":
																@Room = 16 + 0
															}
														}
													} else {
														if @D6 == 1 {
															menu "Room 13, it says on the ceiling... peculiar." {
															item "South":
																@Room = 8 + 0
															item "North":
																@Room = 16 + 0
															}
														}
													}
												} else {
													if @Room == 14 {
														if @D7 == 1 {
															if @D8 == 1 {
																menu "Both doors are open? Another room I think is impossible, but, whatever." {
																item "West":
																	@Room = 13 + 0
																item "East":
																	@Room = 15 + 0
																}
															} else {
																menu "One way out." {
																item "West":
																	@Room = 13 + 0
																}
															}
														} else {
															menu "One way out." {
															item "East":
																@Room = 15 + 0
															}
														}
														if @Key == 0 {
															alert("You got a key!", "")
															@Key = 0 + 1
														}
													} else {
														if @Room == 15 {
															if @D5 == 1 {
																if @D8 == 1 {
																	menu "This is the only room that you MUST go through twice." {
																	item "North":
																		@Room = 17 + 0
																	item "South":
																		@Room = 11 + 0
																	item "West":
																		@Room = 14 + 0
																	}
																} else {
																	menu "Room 15 is boring. You should go to room 14. He always has something to give." {
																	item "South":
																		@Room = 11 + 0
																	item "North":
																		@Room = 16 + 1
																	}
																}
															} else {
																menu "This room is empty. Besides you, I suppose." {
																item "West":
																	@Room = 14 + 0
																item "North":
																	@Room = 17 + 0
																}
															}
														} else {
															if @Room == 16 {
																menu "Just a normal hallway. For once." {
																item "North":
																	@Room = 18 + 0
																item "South":
																	@Room = 13 + 0
																}
															} else {
																if @Room == 17 {
																	menu "Are you actually mapping this place out or are you wandering aimlessly?" {
																	item "North":
																		@Room = 20 + 0
																	item "South":
																		@Room = 15 + 0
																	}
																} else {
																	if @Room == 18 {
																		if @D9 == 1 {
																			menu "The north door seems as though it were right next to you and yet very distant." {
																			item "North":
																				@Room = 3 + 0
																			item "East":
																				@Room = 19 + 0
																			item "South":
																				@Room = 16 + 0
																			}
																		} else {
																			menu "The north door seems as though it were right next to you and yet very distant." {
																			item "North":
																				@Room = 3 + 0
																			item "South":
																				@Room = 16 + 0
																			}
																		}
																	} else {
																		if @Room == 19 {
																			if @D9 == 1 {
																				if @D10 == 1 {
																					menu "Up ahead is a large door made of iron." {
																					item "North":
																						@Room = 24 + 0
																					item "West":
																						@Room = 18 + 0
																					item "East":
																						@Room = 20 + 0
																					}
																				} else {
																					menu "To the north is a door bound in chains and obviously somehow bound in magic, in spite of its luminous glow." {
																					item "North":
																						@Room = 24 + 0
																					item "East":
																						@Room = 20 + 0
																					}
																				}
																			} else {
																				menu "The door ahead is guarded by several statues. As you watch them, they occasionally shift in position." {
																				item "West":
																					@Room = 18 + 0
																				item "North":
																					@Room = 24 + 0
																				}
																			}
																		} else {
																			if @Room == 24 {
																				if @Key == 1 {
																					menu "Use key?" {
																					item "Leave":
																						menu "Congratulations! You have beat the changing maze! You ended with{@Points} points! " {
																						item "Horray for me!":
																							confirm("Bye bye! ")
																							stop()
																						item "No.":
																							confirm("Well fine then. Be that way.")
																							stop()
																						}
																					item "Stay in the dungeon":
																						menu "Go back south, or all the way to the first room?" {
																						item "Go back south":
																							@Room = 19 + 0
																						item "Warp to room 1":
																							@Room = 1 + 0
																						}
																					}
																				} else {
																					menu "After a close look at the door, you realize you need a key." {
																					item "South":
																						@Room = 19 + 0
																					item "???":
																						menu "Well, you can't just stand here!" {
																						item "I can and i will.":
																							@Room = 1 + 0
																						item "Oh yeah. Okay, south":
																							@Room = 19 + 0
																						}
																					}
																				}
																			} else {
																				if @Room == 20 {
																					if @D10 == 1 {
																						menu "The north exit seems to reverberate towards you. " {
																						item "North":
																							@Room = 7 + 0
																						item "West":
																							@Room = 19 + 0
																						item "South":
																							@Room = 17 + 0
																						}
																					} else {
																						menu "The north door seems... out of place." {
																						item "North":
																							@Room = 7 + 0
																						item "South":
																							@Room = 17 + 0
																						}
																					}
																				} else {
																					if @Room == 12 {
																						@Points = @Points - 5
																						menu "You found this secret room, so congrats. -5 points" {
																						item "West":
																							@Room = 11 + 0
																						}
																					} else {
																						confirm("If you're reading this, it means something went terribly wrong...")
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	@Points = @Points + 1
}
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by xalaeth

See All

You Might Also Like

See All
Advertisement