There are some new observations about how Tribal Wars 2 works. What I focus on here is the goal of avoiding to attack other players villages when automating farming.
@xtalplus described the problem in this post:
As confirmed later, a way to avoid this is to look at the information about the defending party shown in a battle report:
Since older battle reports for the same village still show barbarians as the owner, the bot should remember that it has seen a report for this village which implies that it should not attack there. It could then emit a log message like this when skipping the report:
The details of another report (‘Caption of the report here’) for the same village indicate that I should not attack at (123|567). I skip this report.
This log message allows the user to look up the report which led to the decision to skip.
One thing to note about this approach is that it depends on appropriate filter settings in the report list. The user should not filter out reports with casualties, as this may hide the report indicating the new ownership.
But there are other ways to check if it is still a barbarian village. As I can see so far, it looks like the game gives us a reliable way to check for barbarians with the menu item to