Created
February 25, 2017 21:28
-
-
Save xavi-mat/158fe0af280fbc09ca3a918ae9e233a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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