Skip to content

Instantly share code, notes, and snippets.

@lmintmate
Last active August 1, 2023 08:58
Show Gist options
  • Save lmintmate/a90a71b064deea2a9dd465b583cf0fb6 to your computer and use it in GitHub Desktop.
Save lmintmate/a90a71b064deea2a9dd465b583cf0fb6 to your computer and use it in GitHub Desktop.
Mythic GME 2e Random Event Checker
# Mythic GME 2e Random Event checker
# author: lmintmate
# MIT license
# I always found it hard to remember after rolling for a Fate Question to check
# if the result was a double digit number (11, 22, 33, 44, 55, 66, 77, 88, or 99),
# the single digit value of which was equal to or less than the current Chaos Factor,
# and as such I could forget to trigger a Random Event.
# So I wrote this little script to hopefully fix that.
# sources:
# https://www.toppr.com/guides/python-guide/examples/python-examples/functions/number-divisible/python-program-find-numbers-divisible-another-number/
# https://www.askpython.com/python/examples/exit-a-python-program
# https://www.w3schools.com/python/python_operators.asp
num = int (input ('Enter the dice roll result:'))
if num == 0 or num > 100:
print ('Please write a number from 1 to 100.')
quit()
chaos = int (input ('Enter the current Chaos Factor:'))
if chaos == 0 or chaos >= 10:
print ('Please write a Chaos Factor number from 1 to 9.')
quit()
if num%11 == 0 and (num / 11 <= chaos):
print ('Random Event.')
else:
print ('No Random Event.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment