barolet / kovans-ogbot

Automatically exported from code.google.com/p/kovans-ogbot
0 stars 0 forks source link

Respy defended planets #197

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
i have 2.2 beta 9. 
changed defended planet respy time to 8 hours (in source code). cause i 
crush them to make farm at night. its ok and works great.

but when it sends probes, it just updates resource and rentability but 
still minus.

Original issue reported on code.google.com by oga...@gmail.com on 8 Jun 2007 at 9:37

Attachments:

GoogleCodeExporter commented 8 years ago
i just noticed the right click on reports tree

good job :)

Original comment by oga...@gmail.com on 8 Jun 2007 at 1:01

GoogleCodeExporter commented 8 years ago
i got the solution

in GameEntities.py

    def getBestEspionageReport(self):
        if not self.espionageHistory:
            return None

        best = self.espionageHistory[0]
        for report in self.espionageHistory:
            if report.getDetailLevel() > best.getDetailLevel() and report.date >= 
best.date:
                best = report
        return best

here has the problem.
report.getDetailLevel() > best.getDetailLevel()
this gives the first best result, doesnt give latest report. > must be changed 
with 
>=

            if report.getDetailLevel() >= best.getDetailLevel() and report.date >= 
best.date:

Original comment by oga...@gmail.com on 8 Jun 2007 at 1:16

GoogleCodeExporter commented 8 years ago
Hello
I use the same method like you.

you've said :
changed defended planet respy time to 8 hours (in source code)

can you explain where you have modified the source code (i'm pretty bad in 
python ;)) ?

Original comment by billo...@gmail.com on 9 Jun 2007 at 5:52

GoogleCodeExporter commented 8 years ago
GameEntities.py

    def hasExpired(self, serverTime):
        age = self.getAge(serverTime)
        if self.hasNonMissileDefense():
            return age.seconds >= 28800
        elif self.hasFleet():
            return age.seconds >= 28800
        else: 
            return False

Original comment by oga...@gmail.com on 9 Jun 2007 at 7:43

GoogleCodeExporter commented 8 years ago

Original comment by jsceballos on 9 Jun 2007 at 10:06