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

Farm with loses #56

Open
hideth opened this issue Sep 13, 2023 · 3 comments
Open

Farm with loses #56

hideth opened this issue Sep 13, 2023 · 3 comments

Comments

@hideth
Copy link

hideth commented Sep 13, 2023

Can you make something that will allow to skip attacking barbs with losses? Either array like for an "additional_farms": [], but doing opposite or skip attacking barb with losses for like 3 days?

@hideth hideth closed this as completed Sep 13, 2023
@hideth
Copy link
Author

hideth commented Sep 13, 2023

attack.py

        if cache_entry and not cache_entry["safe"] and not clear:
            self.logger.debug(
                "%s will be ignored for attack because unsafe, set safe:true to override"
                % vid
            )
            return False

manager.py

                       if percentage_lost > 50 and len(num_attack) > 0:
                logger.critical("Farm seems too dangerous/ unprofitable to farm. Setting safe to false!")
                data["safe"] = False
                AttackCache.set_cache(farm, data)

I updated code like this, i hope it will prevent attacking same village if there were any loses. Can you blindly tell if this should work?

@hideth hideth reopened this Sep 13, 2023
@cemalgndzz
Copy link

cemalgndzz commented Sep 25, 2023

Hey is it working? Have you tried it ? @hideth

@hideth
Copy link
Author

hideth commented Sep 25, 2023

hey, nope

not sure what to tweak to adjust those farm with loses

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

2 participants