54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
from mappings import get_farm_function
|
|
|
|
def auto_unlock(element):
|
|
prev_level = num_unlocked(element) - 1
|
|
level = num_unlocked(element)
|
|
|
|
while prev_level != level:
|
|
cost = get_cost(element, level)
|
|
|
|
for item in cost:
|
|
farm(item, cost[item])
|
|
|
|
unlock(element)
|
|
|
|
prev_level = level
|
|
level = num_unlocked(element)
|
|
|
|
def farm(item, amount):
|
|
cb = get_farm_function(item)
|
|
cb(amount)
|
|
|
|
def main():
|
|
ten = 10
|
|
hundred = ten * ten
|
|
thousand = ten * hundred
|
|
million = thousand * thousand
|
|
billion = thousand * million
|
|
|
|
farm(Items.Gold, 10 * million)
|
|
farm(Items.Wood, 10 * billion)
|
|
farm(Items.Power, 10 * thousand)
|
|
farm(Items.Cactus, 10 * million)
|
|
farm(Items.Pumpkin, 10 * million)
|
|
farm(Items.Carrot, 10 * billion)
|
|
farm(Items.Hay, 10 * billion)
|
|
|
|
def simulation_main():
|
|
unlocks = Unlocks
|
|
items = {
|
|
Items.Weird_Substance: 1000000000.0,
|
|
Items.Power: 1000000000.0
|
|
}
|
|
globals = {}
|
|
seed = -1
|
|
simulate("main_leaderboard", unlocks, items, globals, seed, 1024 ** 2)
|
|
|
|
def leaderboard_main():
|
|
leaderboard_run(Leaderboards.Maze_Single, "main_leaderboard", 1024 ** 2)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
# simulation_main()
|
|
# leaderboard_main()
|