Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # shrine money reward pseudocode
- # shrine odds for money are a flat 10% always
- def money_reward():
- money = get_money()
- if money > 1000000:
- rand = get_random_number(20)
- elif money > 500000:
- rand = get_random_number(30)
- elif money > 100000:
- rand = get_random_number(40)
- else:
- rand = get_random_number(50)
- if rand < 21:
- # 100% with more than 1m
- # 66.7% with less than 1m but more than 500k
- # 50% with less than 500k but more than 100k
- # 40% with less than 100k
- money += money * 0.2
- elif rand < 31:
- # 0% with more than 1m
- # 33.3% with less than 1m but more than 500k
- # 25% with less than 500k but more than 100k
- # 20% with less than 100k
- money += money * 0.5
- elif rand < 41:
- # 0% with more than 1m
- # 0% with less than 1m but more than 500k
- # 25% with less than 500k but more than 100k
- # 20% with less than 100k
- money += money * 1
- else:
- # 0% with more than 1m
- # 0% with less than 1m but more than 500k
- # 0% with less than 500k but more than 100k
- # 20% with less than 100k
- money += money * 2
Add Comment
Please, Sign In to add comment