Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = {10,10,0,0}
- c = {1000,100,10,1}
- function find(table,value)
- for i=1,4 do
- if table[i]==value then
- return i
- end
- end
- end
- function minimum(table)
- return math.min(math.min(math.min(table[1],table[2]),table[3]),table[4])
- end
- function choke(value,min,max)
- return math.max(math.min(max, value),min)
- end
- function relent()
- b = {200*(1-1.2^c[1])/(1-1.2)*1.2^a[1],
- 1000^choke(10-a[1],0,10)*10000*(1-2.2^c[2])/(1-2.2)*2.2^a[2],
- 1000^choke(10-a[2],0,10)*100000*(1-2.2^c[3])/(1-2.2)*2.2^a[3],
- 1000^choke(10-a[3],0,10)*1000000*(1-2.2^c[4])/(1-2.2)*2.2^a[4]}
- end
- relent()
- d = {"bullets 1000 times", "explosions 100 times", "railgun 10 times","mouse once"}
- function calculate()
- e = find(b,minimum(b))
- return "Upgrade "..d[e].." to "..a[e]+c[e]
- end
- function outputs()
- print(calculate())
- a[e]=c[e]+a[e]
- relent()
- end
- for i=1,48 do
- outputs()
- end
Advertisement
Add Comment
Please, Sign In to add comment