Merge pull request #368 from ninjatao/fix_declare_war

Fixed : can repeatly declare war.
This commit is contained in:
yairm210 2018-12-22 18:32:06 +02:00 committed by GitHub
commit a6716f2a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ class DiplomacyManager() {
fun turnsToPeaceTreaty(): Int {
for(trade in trades)
for(offer in trade.ourOffers)
if(offer.name=="Peace Treaty") return offer.duration
if(offer.name=="Peace Treaty" && offer.duration > 0) return offer.duration
return 0
}