def create_crystals(self): """ Uses the auto level feature """ coordinates = Planet.COORDINATES pg.click(coordinates.tab) images = [Planet.CRYSTAL, Planet.UP_ALL, Planet.LEVEL] for image in images: helpers.click_image_on_screen(image, coordinates)
def start_action(self): """ This is part 2 of start_action. ActionClass holds part 1""" self.go_to_tab() super().start_action() self.check_if_correct_team() dungeon_info(self) helpers.click_image_on_screen(IMAGE_DICTIONARY[self.CLOSE_BUTTON]) self.is_active = True
def equip_crystals(self): """ Uses the auto equip feature """ coordinates = Planet.COORDINATES pg.click(coordinates.tab) helpers.click_image_on_screen(Planet.CRYSTAL, coordinates) helpers.scroll_to_bottom(coordinates) pg.scroll(500) helpers.click_image_on_screen(Planet.EQUIP_ALL, coordinates)
def remove_clones(self): """ self explanatory """ coordinates = Planet.COORDINATES pg.click(coordinates.tab) images = [IMAGE_DICTIONARY["max"], Planet.UBS, Planet.MINUS] for image in images: helpers.click_image_on_screen(image, coordinates) Planet.POWER_SURGING = False
def start_action(self): """ This can set and collect both campaign and dungeons. """ coordinates = self.get_cords() self.go_to_tab() super().start_action() pg.click(coordinates.hour_12) pg.moveTo(coordinates.safe_spot) helpers.click_image_on_screen(IMAGE_DICTIONARY[self.CLOSE_BUTTON]) self.is_active = True
def upgrade_crystals(self): """ Uses the auto upgrade feature """ coordinates = Planet.COORDINATES pg.click(coordinates.tab) helpers.click_image_on_screen(Planet.CRYSTAL, coordinates) helpers.scroll_to_bottom(coordinates) pg.scroll(500) print("sleeping") time.sleep(5) helpers.click_image_on_screen(Planet.MAX_ALL, coordinates)
def buy_pet_food(self): self.go_to_tab() helpers.click_image_on_screen(IMAGE_DICTIONARY["buy_button"]) time.sleep(0.1) helpers.click_image_on_screen(IMAGE_DICTIONARY["pet_baal_power"]) helpers.click_image_on_screen(IMAGE_DICTIONARY["buy_max"]) helpers.click_image_on_screen(IMAGE_DICTIONARY["yes_button"])
def collect_reward(self): coordinates = self.get_cords() self.go_to_tab() pos = self.action_region_relative if pos[0] == -1: pos = (self.FALL_BACK_POS[0], self.FALL_BACK_POS[1] + 45 * self.camp_index) x = round(pos[0]) y = round(pos[1]) - 15 zone = (x + coordinates.X_PAD, y + coordinates.Y_PAD, x + 400 + coordinates.X_PAD, y + 65 + coordinates.Y_PAD) print(self.REWARD_BUTTON) helpers.click_image_in_zone(IMAGE_DICTIONARY[self.REWARD_BUTTON], zone=zone) pg.moveTo(coordinates.safe_spot) time.sleep(2) helpers.click_image_on_screen(IMAGE_DICTIONARY["close_button"]) time.sleep(0.1) self.is_active = False
def distribute(self): self.go_to_tab() coordinates = self.COORDINATES image = self.DISTRIBUTE if image in coordinates.IMAGE_CACHE: pos = coordinates.IMAGE_CACHE[image] print("got image from cache") else: pos = helpers.click_image_on_screen(image) coordinates.IMAGE_CACHE[image] = pos print("cached image") pg.click(pos) pg.moveTo(coordinates.safe_spot)
def feed(self): self.go_to_tab() helpers.click_image_on_screen(self.FEED)
def finger_flick(self): self.go_to_tab() helpers.click_image_on_screen(self.FINGER_FLICK)
def fight(self): self.go_to_tab() helpers.click_image_on_screen(self.FIGHT)
def create_progress(self, image): """ Will set next at to 2 """ self.go_to_tab() helpers.click_image_on_screen(self.NA_TWO, self.COORDINATES) self.create(image)
def rebirth(self): self.go_to_tab() helpers.click_image_on_screen(IMAGE_DICTIONARY["rebirth"]) helpers.click_image_on_screen(IMAGE_DICTIONARY["yes_button"])
def construct(self): self.go_to_tab() helpers.click_image_on_screen(Divinity.PLUS) self.is_constructed = True
def add_to_div(self): self.go_to_tab() helpers.click_image_on_screen(IMAGE_DICTIONARY["add2"]) pg.moveTo(self.COORDINATES.safe_spot)
def power_surge(self): coordinates = Planet.COORDINATES pg.click(coordinates.tab) helpers.click_image_on_screen(Planet.UBS, coordinates) helpers.click_image_on_screen(Planet.CAP, coordinates) Planet.POWER_SURGING = True
def remove_all_clones(self): self.go_to_tab() helpers.click_image_on_screen(IMAGE_DICTIONARY["max"]) images = [Divinity.GAIN_IMAGE, Divinity.CAPACITY_IMAGE, Divinity.CONVERT_IMAGE, Divinity.WORKER_CLONES_IMAGE] self.add_or_remove_clones(images, 500, 50, Divinity.MINUS)
def cap_max(self): self.go_to_tab() helpers.click_image_on_screen(IMAGE_DICTIONARY["cap_max"]) helpers.click_image_on_screen(IMAGE_DICTIONARY["fill"]) self.add_to_div()
def quick_rebirth(): """ """ pets = Pets("pets") gods = Gods("gods") monuments = Monuments("monuments") creation = Creations("creation") divinity = Divinity("divinity") planet = Planet() time.sleep(1) pets.distribute() time.sleep(1) gods.finger_flick() time.sleep(1) print(f'{Fore.GREEN}MIGHTY_STATUE Starting at:{helpers.time_format()}\n') monuments.build(monuments.MIGHTY_STATUE) time.sleep(1) creation.create_clones_off() creation.create_progress(creation.LIGHT) time.sleep(2) creation.create_clones_on() time.sleep(1) divinity.construct() pg.moveTo(divinity.COORDINATES.safe_spot) time.sleep(1) divinity.construct_upgrades() print(f'{Fore.GREEN}IDLE_CYCLE Starting at:{helpers.time_format()}\n') for _ in range(10): pets.distribute() divinity.add_to_div() divinity.construct_upgrades() time.sleep(10) for _ in range(10): pets.distribute() divinity.add_to_div() divinity.construct_upgrades() time.sleep(30) for _ in range(10): pets.distribute() divinity.add_to_div() divinity.construct_upgrades() time.sleep(60) print(f'{Fore.GREEN}IDLE_CYCLE Finished at:{helpers.time_format()}\n') print( f'{Fore.GREEN}divinity.remove_all_clones() started at:{helpers.time_format()}\n' ) divinity.remove_all_clones() print( f'{Fore.GREEN}divinity.cap_max() started at:{helpers.time_format()}\n') divinity.cap_max() time.sleep(0.5) print( f'{Fore.GREEN}planet.power_surge() started at:{helpers.time_format()}\n' ) planet.power_surge() time.sleep(0.5) print( f'{Fore.GREEN}helpers.click_image_on_screen(IMAGE_DICTIONARY["max"]) started at:{helpers.time_format()}\n' ) helpers.click_image_on_screen(IMAGE_DICTIONARY["max"]) time.sleep(0.5) print( f'{Fore.GREEN}monuments.build(monuments.TEMPLE_OF_GOD) started at:{helpers.time_format()}\n' ) monuments.build(monuments.TEMPLE_OF_GOD) time.sleep(0.5) print( f'{Fore.GREEN}monuments.build(monuments.TEMPLE_OF_GOD) started at:{helpers.time_format()}\n' ) print(f'{Fore.GREEN}IDLE_CYCLE started at:{helpers.time_format()}\n') for _ in range(10): # Idle loop pets.distribute() divinity.add_to_div() time.sleep(120) creation.finished_cycle = creation.check_if_idle() print(f'{Fore.GREEN}IDLE_CYCLE finished at:{helpers.time_format()}\n') print( f'{Fore.GREEN}Creation_cycle_check started at:{helpers.time_format()}\n' ) while not creation.finished_cycle: creation.finished_cycle = creation.check_if_idle() pets.distribute() divinity.add_to_div() time.sleep(30) print( f'{Fore.GREEN}Creation_cycle_check finished at:{helpers.time_format()}\n' ) print( f'{Fore.GREEN}creation.create_specific(creation.WEATHER) started at:{helpers.time_format()}\n' ) creation.create_specific(creation.WEATHER) time.sleep(0.5) pg.keyDown("shift") pg.press("r") pg.keyUp("shift") time.sleep(0.5) print( f'{Fore.GREEN}monuments.build(monuments.BLACK_HOLE) started at:{helpers.time_format()}\n' ) monuments.build(monuments.BLACK_HOLE) time.sleep(12 * 4) pg.keyDown("shift") pg.press("r") pg.keyUp("shift") time.sleep(0.5) print( f'{Fore.GREEN}monuments.upgrade(monuments.BLACK_HOLE) started at:{helpers.time_format()}\n' ) monuments.upgrade(monuments.BLACK_HOLE) time.sleep(5) pg.keyDown("shift") pg.press("r") pg.keyUp("shift") time.sleep(0.5) print( f'{Fore.GREEN}monuments.upgrade(monuments.TEMPLE_OF_GOD) started at:{helpers.time_format()}\n' ) monuments.upgrade(monuments.TEMPLE_OF_GOD) time.sleep(30) # end_of_run() # monuments.black_hole() # monuments.black_hole_upgrade() print( f'{Fore.GREEN}gods.finger_flick() started at:{helpers.time_format()}\n' ) gods.finger_flick() time.sleep(3) for _ in range(3): gods.fight() time.sleep(3) pets.buy_pet_food() time.sleep(0.5) # bp.light_clones() # bp.pet_stones() gods.COORDINATES.IMAGE_CACHE = {} Rebirth("rebirth").rebirth() quick_rebirth()
def create_specific(self, image): """ Will set next at to off """ self.go_to_tab() helpers.click_image_on_screen(self.NA_OFF, self.COORDINATES) self.create(image)