def no_rebirth(): """ No Rebirth challenge logic. Basically the same as basic challenge but with no rebirths. """ Navigation.menu('fightBoss') FightBosses.nuke() Helper.sleep(3) # wait for nuke FightBosses.fightBoss() Navigation.menu('inventory') Inventory.loadout(1) # gold heavy Navigation.menu('adventure') Adventure.adventureZone() Adventure.turnIdleOn() # before augments Misc.inputResource(amount='cap', idle=False, energy=True) while Statistics.checkPixelColor(*coords.AUGS_LOCKED, coords.BUTTON_LOCKED_COLOR): print('before augments loop') Navigation.menu('wandoos') Wandoos.addEnergy(cap=False) Wandoos.addMagic(cap=False) Helper.sleep(5) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() Misc.reclaimEnergy() Misc.inputResource(amount='quarter', idle=True, energy=True) Misc.inputResource(amount='quarter', idle=True, energy=True) kc = 0 while Statistics.checkPixelColor( *coords.TM_LOCKED, coords.TM_LOCKED_IRON_PILL) or Statistics.checkPixelColor( *coords.TM_LOCKED, coords.BUTTON_LOCKED_COLOR): print('before tm loop') Navigation.menu('augments') Augmentation.augmentation(aug=1) Augmentation.augmentation(aug=1) Augmentation.augmentation(aug=2) Augmentation.augmentation(aug=3) Augmentation.augmentation(aug=4) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if kc % 5 == 0: Navigation.menu('adventure') Adventure.adventureZone() kc += 1 Navigation.menu('inventory') Inventory.loadout(3) Misc.reclaimAll() kc = 0 while Statistics.checkPixelColor(*coords.BM_LOCKED, coords.BUTTON_LOCKED_COLOR): print('before bm loop') Misc.inputResource(amount='quarter', idle=True, energy=True) Misc.inputResource(amount='quarter', idle=True, energy=True) for _ in range(2): TimeMachine.addEnergy() TimeMachine.addMagic() Navigation.menu('wandoos') Wandoos.addEnergy(cap=True) Wandoos.addEnergy(cap=True) Wandoos.addMagic(cap=True) Navigation.menu('augments') Misc.inputResource(amount='cap', idle=True, energy=True) Augmentation.augmentation(aug=5) Augmentation.augmentation(aug=5) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if kc % 5 == 0: Navigation.menu('adventure') Adventure.adventureZone() kc += 1 Misc.reclaimAll() Navigation.menu('bloodMagic') for i in range(1, 8): BloodMagic.addMagic(magic=i, cap=True) Navigation.menu('wandoos') Wandoos.addEnergy(cap=True) Wandoos.addMagic(cap=True) Navigation.menu('timeMachine') Misc.inputResource(amount='cap', idle=True, energy=False) TimeMachine.addMagic() Misc.inputResource(amount='quarter', idle=True, energy=True) TimeMachine.addEnergy() Navigation.menu('goldDiggers') GoldDiggers.clearActive() GoldDiggers.activate(['STAT', 'WANDOOS', 'MAGIC_BEARD', 'BLOOD']) kc = 0 Challenges.update() print('final loop: ') print('augments, diggers, ygg, wandoos, bm') while Challenges.is_active(): Navigation.menu('augments') Misc.inputResource(amount='half', idle=True, energy=True) Augmentation.augmentation(aug=(kc % 5) + 1) Augmentation.augmentation(aug=(kc % 5) + 1, upgrade=True) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if kc % 5 == 0: Navigation.menu('adventure') Adventure.adventureZone() Navigation.menu('goldDiggers') GoldDiggers.clearActive() GoldDiggers.activate( ['STAT', 'WANDOOS', 'MAGIC_BEARD', 'BLOOD']) Navigation.menu('yggdrasil') Yggdrasil.activate('POWER_ALPHA') Yggdrasil.activate('POWER_BETA') Challenges.update() kc += 1 Navigation.menu('wandoos') Wandoos.addEnergy(cap=True) # release some energy Wandoos.addMagic(cap=True) Navigation.menu('bloodMagic') for i in range(1, 8): BloodMagic.addMagic(magic=i, cap=True) print('done') print(f'starting another {args.challenge}') ChallengeRuns.completed += 1 print(f'completed: {ChallengeRuns.completed}') ChallengeRuns.start(args.challenge)
def no_tm(duration: int): """ Basic challenge logic without TM. Arguments: duration -- duration of current run. """ start = time.time() Navigation.menu('fightBoss') FightBosses.nuke() Helper.sleep(3) # wait for nuke FightBosses.fightBoss() Navigation.menu('inventory') Inventory.loadout(1) # gold heavy Navigation.menu('adventure') Adventure.adventureZone() Adventure.turnIdleOn() # before augments Misc.inputResource(amount='cap', idle=False, energy=True) while (time.time() - start < duration and Statistics.checkPixelColor( *coords.AUGS_LOCKED, coords.BUTTON_LOCKED_COLOR)): print('before augments loop') Navigation.menu('wandoos') Wandoos.addEnergy(cap=False) Wandoos.addMagic(cap=False) Helper.sleep(5) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if time.time() - start < duration: Misc.reclaimEnergy() Misc.inputResource(amount='quarter', idle=True, energy=True) kc = 0 while (time.time() - start < duration and (Statistics.checkPixelColor(*coords.TM_LOCKED, coords.BUTTON_LOCKED_COLOR) or Statistics.checkPixelColor( *coords.TM_LOCKED, coords.TM_LOCKED_IRON_PILL))): print('before tm loop') Navigation.menu('augments') Augmentation.augmentation(aug=1) Augmentation.augmentation(aug=2) Augmentation.augmentation(aug=3) Augmentation.augmentation(aug=4) Helper.sleep(5) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if kc % 5 == 0: Navigation.menu('adventure') Adventure.adventureZone() kc += 1 if time.time() - start < duration: Navigation.menu('inventory') Inventory.loadout(3) Misc.reclaimAll() kc = 0 while (time.time() - start < duration and Statistics.checkPixelColor( *coords.BM_LOCKED, coords.BUTTON_LOCKED_COLOR)): print('before bm loop') Navigation.menu('wandoos') Wandoos.addEnergy(cap=True) Wandoos.addMagic(cap=True) Navigation.menu('augments') Misc.inputResource(amount='half', idle=True, energy=True) Augmentation.augmentation(aug=5) Augmentation.augmentation(aug=4) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if kc % 5 == 0: Navigation.menu('adventure') Adventure.adventureZone() kc += 1 if time.time() - start < duration: Misc.reclaimAll() Navigation.menu('bloodMagic') for i in range(1, 8): BloodMagic.addMagic(magic=i, cap=True) Navigation.menu('wandoos') Wandoos.addEnergy(cap=True) Wandoos.addMagic(cap=True) kc = 0 Challenges.update() while time.time() - start < duration and Challenges.is_active(): print('final loop') Navigation.menu('wandoos') Wandoos.addEnergy(cap=True) # release some energy Wandoos.addMagic(cap=True) Navigation.menu('bloodMagic') for i in range(1, 8): BloodMagic.addMagic(magic=i, cap=True) Navigation.menu('augments') Misc.inputResource(amount='half', idle=True, energy=True) Augmentation.augmentation(aug=(kc % 5) + 1) Augmentation.augmentation(aug=(kc % 5) + 1, upgrade=True) Helper.sleep(3) Navigation.menu('fightBoss') FightBosses.nuke() FightBosses.fightBoss() if kc % 5 == 0: Navigation.menu('adventure') Adventure.adventureZone() Challenges.update() kc += 1 Challenges.update() if Challenges.is_active(): ChallengeRuns.current_run += 1 cr = ChallengeRuns.current_run print(f'next duration: {ChallengeRuns.runs[cr]}') Navigation.menu('fightBoss') Helper.click(*coords.STOP) Rebirth.rebirth() ChallengeRuns.no_tm(ChallengeRuns.runs[cr]) # main else: print('done with challenge') print('starting another one') ChallengeRuns.completed += 1 print(f'completed: {ChallengeRuns.completed}') ChallengeRuns.start(args.challenge)