Dev: when getting tile stats, we only check the gold-per-turn of the viewing civ if its current gold is negative

This commit is contained in:
Yair Morgenstern 2018-11-21 18:45:02 +02:00
parent 71d99dce51
commit bf4d9b609d

View file

@ -19,8 +19,10 @@ class Automation {
var rank = 0.0f var rank = 0.0f
if (stats.food <= 2) rank += stats.food if (stats.food <= 2) rank += stats.food
else rank += (2 + (stats.food - 2) / 2) // 1 point for each food up to 2, from there on half a point else rank += (2 + (stats.food - 2) / 2) // 1 point for each food up to 2, from there on half a point
if(civInfo.gold>0 && civInfo.getStatsForNextTurn().gold>0) rank += stats.gold / 2
else rank += stats.gold if (civInfo.gold < 0 && civInfo.getStatsForNextTurn().gold <= 0) rank += stats.gold
else rank += stats.gold / 2
rank += stats.production rank += stats.production
rank += stats.science rank += stats.science
rank += stats.culture rank += stats.culture