Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z1 Autofight bug #172

Open
Patashu opened this issue Jun 25, 2018 · 0 comments
Open

Z1 Autofight bug #172

Patashu opened this issue Jun 25, 2018 · 0 comments

Comments

@Patashu
Copy link

Patashu commented Jun 25, 2018

Before you have Bloodlust, any setting for Better AutoFight (including off) will send out the next group of Trimps to fight immediately, even if it would lead to having zero breeding Trimps. Depending on whether Trap Trimps is true or false, this either means AT will be stuck in a perpetual loop of trapping and killing a Trimp while not making useful progress (science, huts, equipment) OR battle will never occur. To get past this, you have to turn off AT after you research Battle until you research Bloodlust.

This happens because, in fight.js:

else if (BAFsetting==0 && !game.global.autoBattle && game.global.soldierHealth == 0) betterAutoFight();

And BAF will automatically start fights under these circumstances:

var lowLevelFight = game.resources.trimps.maxSoldiers < breeding * 0.5 && breeding > game.resources.trimps.realMax() * 0.1 && game.global.world < 5;
    //Manually fight instead of using builtin auto-fight
    if (!game.global.fighting) {
        if (newSquadRdy || game.global.soldierHealth > 0 || lowLevelFight || game.global.challengeActive == 'Watch') {
            fightManual();
        }

This rule is too broad. I understand it exists because you can have absurd amounts of breeding in the awkward runs, but breeding is so much more effective than the 1 trimp at a time you're sending out that there's no point in waiting. I'm not sure specifically how it should be changed, but a crude 'helium > 100' check fixes it, since it's only the first two runs that really have this problem, after you have points in bait, power and toughness you can fight as much as you want on Z1 with no real issues.

Savefile at the moment of getting Battle: https://pastebin.com/Luskj2um

Savefile that has enough helium for the heuristic to not get in the way of progress, and researches Bloodlust without getting perpetually sidetracked: https://pastebin.com/GF0gPHNi

This change will also need to be applied to forks like Sliver's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant