ShareShortcuts

Grindy Game

Win by getting 20 of each class: Warrior, Magician, and Builder!

xalaeth
Fork “Grindy Game”

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
54K
Saved
1
Actions
102
Category
Fun
Version
1.0
Language
EN

Win by getting 20 of each class: Warrior, Magician, and Builder! Build your empire and get $$$

What's New

Version 1.0

First release

Version History
1.0 Dec 20, 2020

First release

What it does

102 actions
  1. Show Alert
  2. Calculate
  3. Set Variable
    Shut up
  4. Calculate
  5. Set Variable
    Magicians
  6. Set Variable
    Builders
  7. Set Variable
    Warriors
  8. Set Variable
    Builder $
  9. Set Variable
    Magician $
  10. Set Variable
    Warrior $
  11. Calculate
  12. Set Variable
    $
  13. Calculate
  14. Repeat
  15. Choose from Menu
    What will you do?
  16. Choose from Menu
    Skip turns
  17. Choose from Menu
    How many turns?
  18. Choose from Menu
    1
  19. Wait
  20. Calculate
  21. Set Variable
    $
  22. Choose from Menu
    2
  23. Wait
  24. Calculate
  25. Calculate
  26. Set Variable
    $
  27. Choose from Menu
    5
  28. Wait
  29. Calculate
  30. Calculate
  31. Set Variable
    $
  32. Choose from Menu
    10
  33. Wait
  34. Calculate
  35. Calculate
  36. Set Variable
    $
  37. Choose from Menu
    20
  38. Wait
  39. Calculate
  40. Calculate
  41. Set Variable
    $
  42. Choose from Menu
    30
  43. Wait
  44. Calculate
  45. Calculate
  46. Set Variable
    $
  47. Choose from Menu
    Shop
  48. Choose from Menu
    Who will you hire? You have …$
  49. Choose from Menu
    Builder (Builder $)
  50. If
  51. Calculate
  52. Set Variable
    Builders
  53. Calculate
  54. Set Variable
    $
  55. Calculate
  56. Set Variable
    Builder $
  57. If
  58. Choose from Menu
    Warrior (Warrior $)
  59. If
  60. Calculate
  61. Set Variable
    Warriors
  62. Calculate
  63. Set Variable
    $
  64. Calculate
  65. Set Variable
    Warrior $
  66. If
  67. Choose from Menu
    Magician (Magician $)
  68. If
  69. Calculate
  70. Set Variable
    Magicians
  71. Calculate
  72. Set Variable
    $
  73. Calculate
  74. Set Variable
    Magician $
  75. If
  76. Choose from Menu
    My empire
  77. Show Alert
  78. Calculate
  79. Random Number
  80. Calculate
  81. Set Variable
    $
  82. Calculate
  83. Calculate
  84. Calculate
  85. Set Variable
    $
  86. Round Number
  87. Set Variable
    $
  88. If
  89. If
  90. If
  91. If
  92. If
  93. Show Alert
  94. Choose from Menu
    Keep playing?
  95. Choose from Menu
    Yep!
  96. Calculate
  97. Set Variable
    Shut up
  98. Choose from Menu
    I’m done.
  99. Stop This Shortcut
  100. If
  101. If
  102. If

View as code
Beta

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

#include 'actions/math'
#define color darkblue
#define glyph horse

confirm("Builders get you 1$ per turn. Warriors get you a random amount of money depending on their raid. Magicians multiply your money by a small amount. Get twenty of each type and win the game! Good luck!")
@ShutUp = 0 + 0
@Magicians = 1 + 0
@Builders
@Warriors
@Builder
@Magician
@Warrior
@ = 10 + 0
const CalculationResult = 1000000000000000000 + 100

repeat _ for CalculationResult {
	menu "What will you do?" {
	item "Skip turns":
		menu "How many turns?" {
		item "1":
			wait(0)
			@ = @Builders + @
		item "2":
			wait(2)
			const CalculationResult1 = @Builders + @
			@ = CalculationResult1 * 2
		item "5":
			wait(5)
			const CalculationResult2 = @Builders + @
			@ = CalculationResult2 * 5
		item "10":
			wait(10)
			const CalculationResult3 = @Builders + @
			@ = CalculationResult3 * 10
		item "20":
			wait(20)
			const CalculationResult4 = @Builders + @
			@ = CalculationResult4 * 20
		item "30":
			wait(30)
			const CalculationResult5 = @Builders + @
			@ = CalculationResult5 * 30
		}
	item "Shop":
		menu "Who will you hire? You have {@}$ " {
		item "Builder ({@Builder})":
			if @ >= @Builder {
				@Builders = @Builders + 1
				@ = @ - @Builder
				@Builder = @Builder * 4
			} else {
			}
		item "Warrior ({@Warrior})":
			if @ >= @Warrior {
				@Warriors = @Warriors + 1
				@ = @ - @Warrior
				@Warrior = @Warrior * 6
			} else {
			}
		item "Magician ({@Magician})":
			if @ >= @Magician {
				@Magicians = @Magicians + 1
				@ = @ - @Magician
				@Magician = @Magician * 8
			} else {
			}
		}
	item "My empire":
		confirm("Magicians: {@Magicians}\nWarriors: {@Warriors}\nBuilders:{@Builders}\nMoney: {@}")
	}
	const CalculationResult6 = @Builders + @
	const RandomNumber = randomNumber(0, @Warriors)
	@ = RandomNumber + CalculationResult6
	const CalculationResult7 = @Magicians / 1000
	const CalculationResult8 = @ * CalculationResult7
	@ = CalculationResult8 + @
	round(@)
	@
	if @ShutUp == 1 {
	} else {
		if @Magicians >= 20 {
			if @Builders >= 20 {
				if @Warriors >= 20 {
					confirm("🪅🪅🎊🎊🎉🎉You win!🎉🎉🎊🎊🪅🪅")
					menu "Keep playing?" {
					item "Yep!":
						@ShutUp = 1 + 0
					item "I’m done.":
						stop()
					}
				} else {
				}
			} else {
			}
		} else {
		}
	}
}
Open in Cherri Playground 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