Beispiel #1
0
 def start():
     """Defeat target boss."""
     Wandoos.set_wandoos(0)
     for x in range(6):
         Basic.speedrun(3)
         if not Rebirth.check_challenge():
             return
     for x in range(4):
         Basic.speedrun(7)
         if not Rebirth.check_challenge():
             return
     Wandoos.set_wandoos(1)
     for x in range(4):
         Basic.speedrun(12)
         if not Rebirth.check_challenge():
             return
     Wandoos.set_wandoos(2)
     for x in range(4):
         Basic.speedrun(30)
         if not Rebirth.check_challenge():
             return
     while True:
         Basic.speedrun(60)
         if not Rebirth.check_challenge():
             return
     return
Beispiel #2
0
def equipment():
    """Run no equipment challenge."""
    Wandoos.set_wandoos(0)  # wandoos 98, use 1 for meh

    for x in range(8):
        speedrun(3)
        if not Rebirth.check_challenge():
            return
        Rebirth.do_rebirth()
    for x in range(5):
        speedrun(7)
        if not Rebirth.check_challenge():
            return
        Rebirth.do_rebirth()
    for x in range(5):
        speedrun(12)
        if not Rebirth.check_challenge():
            return
        Rebirth.do_rebirth()
    for x in range(5):
        speedrun(60)
        if not Rebirth.check_challenge():
            return
        Rebirth.do_rebirth()
    return
Beispiel #3
0
def basic():
    """Run basic challenge."""
    Wandoos.set_wandoos(0)
    for x in range(6):
        speedrun(3)
        if not Rebirth.check_challenge():
            return
    for x in range(4):
        speedrun(7)
        if not Rebirth.check_challenge():
            return
    Wandoos.set_wandoos(1)
    for x in range(4):
        speedrun(12)
        if not Rebirth.check_challenge():
            return
    Wandoos.set_wandoos(2)
    for x in range(4):
        speedrun(30)
        if not Rebirth.check_challenge():
            return
    while True:
        speedrun(60)
        if not Rebirth.check_challenge():
            return
    return
Beispiel #4
0
    def start():
        """Challenge rebirth sequence.

        If you wish to edit the length or sequence of the rebirths; change the for-loop values
        and durations in the Equipment.speedrun(duration) calls."""
        Wandoos.set_wandoos(0)  # wandoos 98, use 1 for meh

        for x in range(8):
            Equipment.speedrun(3)
            if not Rebirth.check_challenge():
                return
            Rebirth.do_rebirth()
        for x in range(5):
            Equipment.speedrun(7)
            if not Rebirth.check_challenge():
                return
            Rebirth.do_rebirth()
        for x in range(5):
            Equipment.speedrun(12)
            if not Rebirth.check_challenge():
                return
            Rebirth.do_rebirth()
        for x in range(5):
            Equipment.speedrun(60)
            if not Rebirth.check_challenge():
                return
            Rebirth.do_rebirth()
        return
Beispiel #5
0
def ngu():
    """Run no NGU challenge."""
    Wandoos.set_wandoos(0)
    first_rebirth(15)
    if not Rebirth.check_challenge():
        return
    for x in range(8):
        speedrun(30)
        if not Rebirth.check_challenge():
            return
    while True:
        speedrun(60)
        if not Rebirth.check_challenge():
            return
    return
Beispiel #6
0
 def start():
     """Defeat target boss."""
     Wandoos.set_wandoos(0)
     NGU.first_rebirth(15)
     if not Rebirth.check_challenge():
         return
     for x in range(8):
         NGU.speedrun(30)
         if not Rebirth.check_challenge():
             return
     while True:
         NGU.speedrun(60)
         if not Rebirth.check_challenge():
             return
     return
Beispiel #7
0
    def speedrun():
        """Start a speedrun.

        Keyword arguments
        duration -- duration in minutes to run
        f -- feature object
        """
        diggers = [2, 3, 11, 12]
        FightBoss.nuke()
        Wandoos.set_wandoos(0)
        Adventure.adventure(highest=True)
        TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.01, magic=True)
        GoldDiggers.gold_diggers(diggers)
        Wandoos.wandoos(True)
        BloodMagic.blood_magic(8)
        while Rebirth.check_challenge():
            FightBoss.nuke()
            Augmentation.augments({
                "LS": 0.92,
                "QSL": 0.08
            }, Misc.get_idle_cap(1))
            GoldDiggers.gold_diggers(diggers)

        rb_time = Rebirth.get_rebirth_time()
        while int(rb_time.timestamp.tm_min) < 3:
            rb_time = Rebirth.get_rebirth_time()
            time.sleep(1)
Beispiel #8
0
 def speedrun(duration):
     """Procedure for first rebirth in a 100LC."""
     FightBoss.nuke()
     time.sleep(2)
     FightBoss.fight()
     diggers = [2, 3, 11, 12]
     Adventure.adventure(highest=True)
     current_boss = int(FightBoss.get_current_boss())
     if current_boss > 48:
         Augmentation.augments({
             "EB": 0.66,
             "CS": 0.34
         }, Misc.get_idle_cap(1))
     else:
         Augmentation.augments({"EB": 1}, coords.INPUT_MAX)
     GoldDiggers.gold_diggers(diggers)
     rb_time = Rebirth.get_rebirth_time()
     while int(rb_time.timestamp.tm_min) < duration:
         Augmentation.augments({
             "EB": 0.66,
             "CS": 0.34
         }, Misc.get_idle_cap(1))
         FightBoss.nuke()
         FightBoss.fight()
         GoldDiggers.gold_diggers(diggers)
         rb_time = Rebirth.get_rebirth_time()
     if not Rebirth.check_challenge() and rb_time.timestamp.tm_min >= 3:
         return
     Rebirth.do_rebirth()
     return
Beispiel #9
0
def augment():
    """Run no augments challenge."""
    for x in range(
            8
    ):  # runs 3-minute rebirth 8 times, if we still aren't done move to 7 min
        normal_rebirth(3)  # start a run with a 3 minute duration
        if not Rebirth.check_challenge(): return
    for x in range(5):
        normal_rebirth(7)
        if not Rebirth.check_challenge(): return
    for x in range(5):
        normal_rebirth(12)
        if not Rebirth.check_challenge(): return
    for x in range(5):
        normal_rebirth(60)
        if not Rebirth.check_challenge(): return
    return
Beispiel #10
0
def level():
    """Run 100 level challenge."""
    for x in range(8):
        speedrun(3)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        speedrun(7)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        speedrun(12)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        speedrun(60)
        if not Rebirth.check_challenge():
            return
Beispiel #11
0
 def start():
     """Handle LC run."""
     for x in range(8):
         Level.speedrun(3)
         if not Rebirth.check_challenge():
             return
     for x in range(5):
         Level.speedrun(7)
         if not Rebirth.check_challenge():
             return
     for x in range(5):
         Level.speedrun(12)
         if not Rebirth.check_challenge():
             return
     for x in range(5):
         Level.speedrun(60)
         if not Rebirth.check_challenge():
             return
Beispiel #12
0
def blind():
    """Run blind challenge."""
    for x in range(8):
        run(3)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        run(7)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        run(12)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        run(60)
        if not Rebirth.check_challenge():
            return
Beispiel #13
0
    def start():
        """Challenge rebirth sequence.

        If you wish to edit the length or sequence of the rebirths; change the for-loop values
        and durations in the Augment.normal_rebirth(duration) calls."""

        for x in range(
                8
        ):  # runs 3-minute rebirth 8 times, if we still aren't done move to 7 min
            Augment.normal_rebirth(3)  # start a run with a 3 minute duration
            if not Rebirth.check_challenge(): return
        for x in range(5):
            Augment.normal_rebirth(7)
            if not Rebirth.check_challenge(): return
        for x in range(5):
            Augment.normal_rebirth(12)
            if not Rebirth.check_challenge(): return
        for x in range(5):
            Augment.normal_rebirth(60)
            if not Rebirth.check_challenge(): return
        return
Beispiel #14
0
def run(duration):
    """Procedure for Blind Challenge RBs."""
    global advanced_training_locked, bm_locked, tm_locked

    advanced_training_locked = True
    bm_locked = True
    tm_locked = True

    tm_assigned = False
    bm_assigned = False

    end = time.time() + duration * 60 + 10
    FightBoss.nuke()
    time.sleep(2)
    FightBoss.fight()
    diggers = [2, 3, 11, 12]
    Adventure.adventure(highest=True)
    Augmentation.augments({"SS": 1}, 1e12)
    GoldDiggers.gold_diggers(diggers)
    while time.time() < end:
        Augmentation.augments({"EB": 0.66, "CS": 0.34}, 1e13)
        Wandoos.wandoos(True, True)
        FightBoss.nuke()
        FightBoss.fight()
        GoldDiggers.gold_diggers(diggers)
        update_gamestate()
        if not tm_locked and not tm_assigned:
            TimeMachine.time_machine(1e13, m=1e13)
            tm_assigned = True
        if not bm_locked and not bm_assigned:
            BloodMagic.blood_magic(8)
            bm_assigned = True
        if not Rebirth.check_challenge() and end - time.time() > 180:
            return
    if not Rebirth.check_challenge():
        return
    Rebirth.do_rebirth()
    return
Beispiel #15
0
 def start():
     """Defeat target boss."""
     Wandoos.set_wandoos(0)
     Timemachine.first_rebirth(3)
     if not Rebirth.check_challenge():
         return
     for x in range(8):
         Timemachine.speedrun(3)
         if not Rebirth.check_challenge():
             return
     for x in range(5):
         Timemachine.speedrun(7)
         if not Rebirth.check_challenge():
             return
     for x in range(5):
         Timemachine.speedrun(12)
         if not Rebirth.check_challenge():
             return
     for x in range(5):
         Timemachine.speedrun(60)
         if not Rebirth.check_challenge():
             return
     return
Beispiel #16
0
def timemachine():
    """Run no time machine challenge."""
    Wandoos.set_wandoos(0)
    first_rebirth(3)
    if not Rebirth.check_challenge():
        return
    for x in range(8):
        speedrun(3)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        speedrun(7)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        speedrun(12)
        if not Rebirth.check_challenge():
            return
    for x in range(5):
        speedrun(60)
        if not Rebirth.check_challenge():
            return
    return
Beispiel #17
0
    def start_challenge(challenge: int, quitCurrent: bool = False) -> None:
        """Start the selected challenge. Checks for currently running challenges.
        
        Keyword arguments
        challenge   -- The index of the challenge, starting at 1 for Basic challenge,
                       ending at 11 for No TM challenge
        quitCurrent -- Quit the current challenge if it is different to the desired.
        """
        BloodMagic.toggle_auto_spells(drop=False)

        chall = Rebirth.check_challenge(getNum=True)
        if chall and chall != challenge:
            print(f"A challenge is currently running ({chall}).")
            if quitCurrent:
                print("Quitting current challenge.")
                Navigation.challenge_quit()
            else:
                Challenge.run_challenge(chall, cont=True)

        Challenge.run_challenge(challenge)
Beispiel #18
0
    def normal_rebirth(duration):
        """Procedure for first rebirth."""
        diggers = [2, 3, 11, 12]  # Wandoos, stat, blood, exp
        FightBoss.nuke()
        time.sleep(2)
        FightBoss.fight()
        Adventure.adventure(highest=True)
        Wandoos.set_wandoos(1)  # wandoos Meh, use 0 for 98
        BloodMagic.toggle_auto_spells(drop=False)
        GoldDiggers.gold_diggers(diggers)
        while Inputs.check_pixel_color(*coords.COLOR_TM_LOCKED):
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(2)
            FightBoss.fight()

        TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.1, magic=True)
        Adventure.adventure(itopod=True, itopodauto=True)

        while Inputs.check_pixel_color(*coords.COLOR_BM_LOCKED):
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(2)
            FightBoss.fight()
            GoldDiggers.gold_diggers(diggers)
        BloodMagic.blood_magic(8)
        rb_time = Rebirth.get_rebirth_time()
        while int(rb_time.timestamp.tm_min) < duration:
            Wandoos.wandoos(True)
            FightBoss.nuke()
            FightBoss.fight()
            time.sleep(2)
            GoldDiggers.gold_diggers(diggers)
            rb_time = Rebirth.get_rebirth_time()
            # return if challenge is completed and rebirth time is above 3 minutes
            if int(rb_time.timestamp.tm_min
                   ) >= 3 and not Rebirth.check_challenge():
                return

        Rebirth.do_rebirth()
Beispiel #19
0
    def start_challenge(challenge: int) -> None:
        """Start the selected challenge.
        
        Keyword arguments
        challenge -- The index of the challenge, starting at 1 for Basic challenge,
                     ending at 11 for No TM challenge
        """

        BloodMagic.toggle_auto_spells(drop=False)
        Navigation.rebirth()
        Inputs.click(*coords.CHALLENGE_BUTTON)

        chall = Rebirth.check_challenge(getNum=True)
        if chall:
            text = Inputs.ocr(*coords.OCR_CHALLENGE_NAME)
            print("A challenge is already active: " + text)
            if "basic" in text.lower():
                print("Starting basic challenge script")
                Basic.start()

            elif "24 hour" in text.lower():
                print("Starting 24 hour challenge script")
                try:
                    x = coords.CHALLENGE.x
                    y = coords.CHALLENGE.y + challenge * coords.CHALLENGEOFFSET
                    Inputs.click(x, y, button="right")
                    time.sleep(userset.LONG_SLEEP)
                    target = Inputs.ocr(*coords.OCR_CHALLENGE_24HC_TARGET)
                    target = int(Inputs.remove_letters(target))
                    print(f"Found target boss: {target}")
                    Basic.start()
                except ValueError:
                    print("Couldn't detect the target level of 24HC")
                    Discord.send_message(
                        "Couldn't detect the" + " target level of 24HC",
                        Discord.ERROR)

            elif "100 level" in text.lower():
                print("Starting 100 level challenge script")
                print("IMPORTANT")
                print(
                    "Set target level for energy buster to 67 and charge shot to 33."
                )
                print("Disable 'Advance Energy' in Augmentation")
                print("Disable beards if you cap ultra fast.")
                Level.start()

            elif "blind" in text.lower():
                print("Starting blind challenge script")
                Blind.start()

            elif "laser" in text.lower():
                print("Starting laser sword challenge script")
                Laser.start()

            elif "rebirth" in text.lower():
                print("Starting no rebirth challenge script")
                RebirthCh.rebirth_challenge()
            elif "augs" in text.lower():
                print("Starting no augs challenge script")
                Augment.start()
            elif "equipment" in text.lower():
                print("Starting no equipment challenge script")
                Equipment.start()
            elif "time machine" in text.lower():
                print("Starting no time machine challenge script")
                Timemachine.start()
            elif "ngu" in text.lower():
                print("Starting no NGU challenge script")
                NGU.start()
            else:
                print("Couldn't determine which script to start from the OCR",
                      "input")

        else:
            x = coords.CHALLENGE.x
            y = coords.CHALLENGE.y + challenge * coords.CHALLENGEOFFSET

            if challenge == 1:
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Basic.start()

            elif challenge == 2:
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Augment.start()

            elif challenge == 3:
                try:
                    Inputs.click(x, y, button="right")
                    time.sleep(userset.LONG_SLEEP)
                    target = Inputs.ocr(*coords.OCR_CHALLENGE_24HC_TARGET)
                    target = int(Inputs.remove_letters(target))
                    print(f"Found target boss: {target}")
                    Inputs.click(x, y)
                    time.sleep(userset.LONG_SLEEP)
                    Navigation.confirm()
                    time.sleep(userset.LONG_SLEEP)
                    Basic.start()
                except ValueError:
                    print("couldn't detect the target level of 24HC")
                    Discord.send_message(
                        "Couldn't detect the" + "target level of 24HC",
                        Discord.ERROR)

            elif challenge == 4:
                print("IMPORTANT")
                print(
                    "Set target Level for energy buster to 67 and charge shot to 33."
                )
                print("Disable 'Advance Energy' in Augmentation")
                print("Disable beards if you cap ultra fast.")
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Level.start()

            elif challenge == 5:
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Equipment.start()

            elif challenge == 6:
                print("Nah fam. Do it yourself")
                while True:
                    Window.shake()

            elif challenge == 7:
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                RebirthCh.rebirth_challenge()

            elif challenge == 8:
                print(
                    "LSC doesn't reset your number, make sure your number is high enough to make laser swords."
                )
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Laser.start()

            elif challenge == 9:
                print("Starting blind challenge")
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Blind.start()

            elif challenge == 10:
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                NGU.start()

            elif challenge == 11:
                Inputs.click(x, y)
                time.sleep(userset.LONG_SLEEP)
                Navigation.confirm()
                Timemachine.start()

            else:
                print(f"invalid challenge: {challenge}")
Beispiel #20
0
    def first_rebirth():
        """Procedure for first rebirth."""
        final_aug = False
        ss_assigned = False

        end = time.time() + 3 * 60

        FightBoss.nuke()
        time.sleep(2)

        FightBoss.fight()
        Adventure.adventure(highest=True)
        while Inputs.check_pixel_color(*coords.COLOR_TM_LOCKED):
            if not ss_assigned:
                time.sleep(1)
                Augmentation.augments({"SS": 1}, 3e12)
                ss_assigned = True
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(2)
            FightBoss.fight()

        TimeMachine.time_machine(1e9, magic=True)
        Augmentation.augments({"DS": 1}, 1e12)
        GoldDiggers.gold_diggers()
        Adventure.adventure(itopod=True, itopodauto=True)

        while Inputs.check_pixel_color(
                *coords.COLOR_BM_LOCKED) or Inputs.check_pixel_color(
                    *coords.COLOR_BM_LOCKED_ALT):
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(2)
            FightBoss.fight()
            GoldDiggers.gold_diggers()
        BloodMagic.blood_magic(8)
        BloodMagic.toggle_auto_spells(drop=False, number=False)
        while time.time() < end - 90:
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(2)
            try:
                current_boss = int(FightBoss.get_current_boss())
                if current_boss > 36:
                    Augmentation.augments({
                        "SS": 0.67,
                        "DS": 0.33
                    }, Misc.get_idle_cap(1))
            except ValueError:
                print("couldn't get current boss")
            GoldDiggers.gold_diggers()

        while True:
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(1)
            try:
                current_boss = int(FightBoss.get_current_boss())
                if current_boss > 45:
                    if not final_aug:
                        Misc.reclaim_aug()
                        final_aug = True
                    Augmentation.augments({
                        "SM": 0.67,
                        "AA": 0.33
                    }, Misc.get_idle_cap(1))
            except ValueError:
                print("couldn't get current boss")
            FightBoss.fight()
            GoldDiggers.gold_diggers()

            if time.time() > end and not RB.check_challenge():
                return
Beispiel #21
0
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
Beispiel #22
0
    def speedrun(duration):
        """Start a speedrun.

        Keyword arguments
        duration -- duration in minutes to run
        f -- feature object
        """
        Rebirth.do_rebirth()
        FightBoss.nuke()
        time.sleep(2)
        Adventure.adventure(highest=True)

        try:
            current_boss = int(FightBoss.get_current_boss())
            if current_boss > 28 and current_boss < 49:
                Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1))
            elif current_boss >= 49:
                Augmentation.augments({
                    "EB": 0.66,
                    "CS": 0.34
                }, Misc.get_idle_cap(1))
        except ValueError:
            print("couldn't get current boss")

        while Inputs.check_pixel_color(*coords.COLOR_TM_LOCKED):
            FightBoss.nuke()
            FightBoss.fight()
            Wandoos.wandoos(True)

        while Inputs.check_pixel_color(*coords.COLOR_BM_LOCKED):
            Wandoos.wandoos(True)
            FightBoss.nuke()
            time.sleep(2)
            FightBoss.fight()

        BloodMagic.blood_magic(8)
        Wandoos.wandoos(True)
        rb_time = Rebirth.get_rebirth_time()
        while int(rb_time.timestamp.tm_min) < duration:
            FightBoss.nuke()
            FightBoss.fight()
            Adventure.adventure(highest=True)
            Wandoos.wandoos(True)
            if Wandoos.check_wandoos_bb_status():
                Augmentation.augments({
                    "EB": 0.66,
                    "CS": 0.34
                }, Misc.get_idle_cap(1))
            """If current rebirth is scheduled for more than 3 minutes and
            we already finished the rebirth, we will return here, instead
            of waiting for the duration. Since we cannot start a new
            challenge if less than 3 minutes have passed, we must always
            wait at least 3 minutes."""
            rb_time = Rebirth.get_rebirth_time()
            if duration > 3:
                if not Rebirth.check_challenge():
                    while int(rb_time.timestamp.tm_min) < 3:
                        rb_time = Rebirth.get_rebirth_time()
                        time.sleep(1)
                    MoneyPit.pit()
                    MoneyPit.spin()
                    return

        MoneyPit.pit()
        MoneyPit.spin()
        return