AI accepts research agreement offers

This commit is contained in:
Yair Morgenstern 2021-07-29 19:00:55 +03:00
parent 5184743cbb
commit 8ae4ae1cb1
4 changed files with 3138 additions and 3093 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
android/assets/game2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -75,7 +75,7 @@ class TradeEvaluation {
return when (offer.name) {
// Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs
Constants.peaceTreaty -> evaluatePeaceCostForThem(civInfo, tradePartner)
Constants.researchAgreement -> evaluateResearchAgreementCostForThem(civInfo, tradePartner)
Constants.researchAgreement -> -offer.amount
else -> 1000
}
}
@ -167,7 +167,7 @@ class TradeEvaluation {
return when (offer.name) {
// Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs
Constants.peaceTreaty -> evaluatePeaceCostForThem(civInfo, tradePartner)
Constants.researchAgreement -> evaluateResearchAgreementCostForThem(civInfo, tradePartner)
Constants.researchAgreement -> -offer.amount
else -> 1000
}
}
@ -254,7 +254,4 @@ class TradeEvaluation {
}
}
fun evaluateResearchAgreementCostForThem(ourCivilization: CivilizationInfo, otherCivilization: CivilizationInfo): Int {
return -100 * (ourCivilization.getEraNumber() - otherCivilization.getEraNumber())
}
}