def rebirth_init(rt): """Procedure that handles start of rebirth.""" Misc.reclaim_all() # make sure we reset e/m if we run this mid-rebirth FightBoss.nuke(101) # PPP Inventory.loadout(respawn_loadout) Adventure.adventure(highest=True) TimeMachine.time_machine(5e11, magic=True) Augmentation.augments({"CI": 0.7, "ML": 0.3}, 1e12) BloodMagic.blood_magic(8) BloodMagic.toggle_auto_spells() GoldDiggers.gold_diggers() if rt.timestamp.tm_hour > 0 or rt.timestamp.tm_min >= 13: print("assigning adv training") else: duration = (12.5 - rt.timestamp.tm_min) * 60 print(f"doing itopod for {duration} seconds while waiting for adv training to activate") Adventure.itopod_snipe(duration) AdvancedTraining.advanced_training(2e12) GoldDiggers.gold_diggers() Misc.reclaim_bm() Wandoos.wandoos(True) NGU.assign_ngu(Misc.get_idle_cap(2), range(1, 11), False) NGU.assign_ngu(Misc.get_idle_cap(1), range(1, 9), True)
def first_rebirth(duration): """Procedure for first rebirth.""" adv_training_assigned = False NGU.current_boss = 1 NGU.minutes_elapsed = 0 NGU.advanced_training_locked = True NGU.bm_locked = True NGU.tm_locked = True while NGU.current_boss < 18 and NGU.minutes_elapsed < duration: Wandoos.wandoos(True) FightBoss.fight() NGU.update_gamestate() if not NGU.advanced_training_locked and not adv_training_assigned: print("assigning adv") AdvancedTraining.advanced_training(4e11) adv_training_assigned = True Adventure.adventure(highest=True) while NGU.minutes_elapsed < duration: Wandoos.wandoos(True) Augmentation.augments({"SS": 1}, Misc.get_idle_cap(1)) NGU.update_gamestate()
def first_rebirth(duration): """Procedure for first rebirth.""" global current_boss, minutes_elapsed, advanced_training_locked, bm_locked, tm_locked adv_training_assigned = False current_boss = 1 minutes_elapsed = 0 advanced_training_locked = True bm_locked = True tm_locked = True while current_boss < 18 and minutes_elapsed < duration: Wandoos.wandoos(True, True) FightBoss.fight() update_gamestate() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") AdvancedTraining.advanced_training(4e11) adv_training_assigned = True Adventure.adventure(highest=True) while minutes_elapsed < duration: Wandoos.wandoos(True, True) Augmentation.augments({"SS": 1}, Misc.get_idle_cap(1)) update_gamestate()
def run() -> None: """Rebirth procedure.""" GuffinRun.advanced_training_locked = True GuffinRun.current_boss = 0 GuffinRun.rb_time = 0 GuffinRun.__update_gamestate() if GuffinRun.rb_time > GuffinRun.max_rb_duration: Rebirth.do_rebirth() return FightBoss.nuke() time.sleep(2) Adventure.adventure(const.ZONE_MAP[GuffinRun.gold_zone]) BloodMagic.toggle_auto_spells(number=False, drop=False) GoldDiggers.gold_diggers(GuffinRun.diggers) BloodMagic.blood_magic(8) NGU.cap_ngu() NGU.cap_ngu(magic=True) Wandoos.set_wandoos(0) Wandoos.wandoos(True, True) Augmentation.augments({ GuffinRun.aug[0]: 0.66, GuffinRun.aug[1]: 0.34 }, Misc.get_idle_cap(1) * 0.5) TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.1, magic=True) GuffinRun.__update_gamestate() BloodMagic.toggle_auto_spells(drop=False, gold=False) if GuffinRun.wishes: GuffinRun.wishes.get_caps() GuffinRun.wishes.get_wish_status() GuffinRun.wishes.allocate_wishes() while GuffinRun.advanced_training_locked: GuffinRun.__do_quest() FightBoss.nuke() GoldDiggers.gold_diggers(GuffinRun.diggers) NGU.cap_ngu() NGU.cap_ngu(magic=True) Hacks.hacks(GuffinRun.hacks, coords.INPUT_MAX) Augmentation.augments( { GuffinRun.aug[0]: 0.66, GuffinRun.aug[1]: 0.34 }, Misc.get_idle_cap(1) * 0.5, ) TimeMachine.time_machine(coords.INPUT_MAX, magic=True) GuffinRun.__update_gamestate() Misc.reclaim_tm(energy=True, magic=True) Misc.reclaim_aug() AdvancedTraining.advanced_training(1e12) Wandoos.set_wandoos(GuffinRun.wandoos_version) Wandoos.wandoos(True, True) Augmentation.augments({ GuffinRun.aug[0]: 0.66, GuffinRun.aug[1]: 0.34 }, Misc.get_idle_cap(1) * 0.5) TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.1, magic=True) while GuffinRun.rb_time < GuffinRun.max_rb_duration - 140: GoldDiggers.gold_diggers(GuffinRun.diggers) FightBoss.nuke() Hacks.hacks(GuffinRun.hacks, coords.INPUT_MAX) GuffinRun.__do_quest() GuffinRun.__update_gamestate() FightBoss.fight() Adventure.adventure(itopodauto=True) MoneyPit.pit() Misc.save_check() while GuffinRun.rb_time < GuffinRun.max_rb_duration: time.sleep(1) GuffinRun.__update_gamestate() FightBoss.nuke() Rebirth.do_rebirth() # Must wait for game to fully redraw all elements after rebirthing time.sleep(1) GuffinRun.runs += 1 print( f"Completed guffin run #{GuffinRun.runs} in {time.strftime('%H:%M:%S', time.gmtime(GuffinRun.rb_time))}" )
def speedrun(duration): """Start a speedrun. Keyword arguments duration -- duration in minutes to run f -- feature object """ global current_boss, minutes_elapsed, advanced_training_locked, bm_locked, tm_locked diggers = [2, 3, 11, 12] adv_training_assigned = False Rebirth.do_rebirth() Wandoos.wandoos(True, True) FightBoss.nuke() time.sleep(2) FightBoss.fight() Adventure.adventure(highest=True) current_boss = 1 minutes_elapsed = 0 advanced_training_locked = True bm_locked = True tm_locked = True update_gamestate() while current_boss < 18 and minutes_elapsed < duration: # augs unlocks after 17 Wandoos.wandoos(True, True) Augmentation.augments({"SS": 1}, Misc.get_idle_cap(1)) FightBoss.nuke() FightBoss.fight() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") Misc.reclaim_aug() AdvancedTraining.advanced_training(4e11) Augmentation.augments({"SS": 1}, Misc.get_idle_cap(1)) adv_training_assigned = True update_gamestate() Adventure.adventure(highest=True) while current_boss < 29 and minutes_elapsed < duration: # buster unlocks after 28 Wandoos.wandoos(True, True) FightBoss.nuke() FightBoss.fight() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") Misc.reclaim_aug() AdvancedTraining.advanced_training(4e11) Augmentation.augments({"SS": 1}, Misc.get_idle_cap(1)) adv_training_assigned = True update_gamestate() if minutes_elapsed < duration: # only reclaim if we're not out of time Misc.reclaim_aug() while current_boss < 31 and minutes_elapsed < duration: # TM unlocks after 31 Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) Wandoos.wandoos(True, True) FightBoss.nuke() FightBoss.fight() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") Misc.reclaim_aug() AdvancedTraining.advanced_training(4e11) Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) adv_training_assigned = True update_gamestate() if minutes_elapsed < duration: # only reclaim if we're not out of time Misc.reclaim_aug() # get some energy back for TM Misc.reclaim_res(magic=True) # get all magic back from wandoos TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.05, m=Misc.get_idle_cap(2) * 0.05) while current_boss < 38 and minutes_elapsed < duration: # BM unlocks after 37 GoldDiggers.gold_diggers(diggers) Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) Wandoos.wandoos(True, True) FightBoss.nuke() FightBoss.fight() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") Misc.reclaim_aug() AdvancedTraining.advanced_training(4e11) Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) adv_training_assigned = True update_gamestate() if minutes_elapsed < duration: BloodMagic.blood_magic(8) BloodMagic.toggle_auto_spells(drop=False) time.sleep(10) print("waiting 10 seconds for gold ritual") BloodMagic.toggle_auto_spells(drop=False, gold=False) while current_boss < 49 and minutes_elapsed < duration: GoldDiggers.gold_diggers(diggers) Wandoos.wandoos(True, True) Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) FightBoss.nuke() FightBoss.fight() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") Misc.reclaim_aug() AdvancedTraining.advanced_training(4e11) Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) adv_training_assigned = True update_gamestate() if minutes_elapsed < duration: # only reclaim if we're not out of time Misc.reclaim_aug() while minutes_elapsed < duration: Augmentation.augments({"EB": 0.66, "CS": 0.34}, Misc.get_idle_cap(1)) GoldDiggers.gold_diggers(diggers) Wandoos.wandoos(True, True) FightBoss.nuke() FightBoss.fight() if not advanced_training_locked and not adv_training_assigned: print("assigning adv") Misc.reclaim_aug() AdvancedTraining.advanced_training(4e11) Augmentation.augments({"EB": 0.66, "CS": 0.34}, Misc.get_idle_cap(1)) adv_training_assigned = True update_gamestate() if not Rebirth.check_challenge() and minutes_elapsed >= 3: return return