Skip to content

Instantly share code, notes, and snippets.

@xavi-mat
Created February 25, 2017 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xavi-mat/158fe0af280fbc09ca3a918ae9e233a8 to your computer and use it in GitHub Desktop.
Save xavi-mat/158fe0af280fbc09ca3a918ae9e233a8 to your computer and use it in GitHub Desktop.
init python:
import math
import sys
x = 20
y = .3
a = [1,2,3,4]
def Income(n, i):
global x
if i > 0 and i <= .1:
n = n + renpy.random.uniform(1, 3)
elif i > .1 and i <= .2:
n = n + renpy.random.uniform(4, 6)
elif i > .2 and i <= .3:
n = n + renpy.random.uniform(7, 9)
elif i > .3 and i <= .4:
n = n + renpy.random.uniform(10, 12)
elif i > .4 and i <= .5:
n = n + renpy.random.uniform(13, 15)
elif i > .5 and i <= 1:
n = n + renpy.random.uniform(16, 20)
else:
n = n + renpy.random.uniform(16, 20)
x = n
a[0] += 1
renpy.restart_interaction()
screen economy():
timer 0.1 action Function(Income, x, y) repeat True
frame:
xalign 0.5
yalign 0.5
vbox:
text "[x]"
text "[y]"
text "[a]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment