- Slightly improved tile ranking when determining next tile

- Now does not display unexplored tiles in city screen - cleaner view
This commit is contained in:
Yair Morgenstern 2018-02-03 22:06:55 +02:00
parent ce7a7916c1
commit 1c1756721a
3 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,6 @@ public class CityExpansionManager{
private void addNewTile(){
cultureStored -= getCultureToNextTile();
tilesClaimed++;
Linq<Vector2> possibleNewTileVectors = new Linq<Vector2>();
for (int i = 2; i <4 ; i++) {
Linq<TileInfo> tiles = CivilizationInfo.current().tileMap.getTilesInDistance(cityInfo.cityLocation,i);

View File

@ -109,13 +109,14 @@ public class CityInfo {
double rankTile(TileInfo tile){
FullStats stats = tile.getTileStats(this);
double rank=0;
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
rank+=stats.gold /2;
rank+=stats.production;
rank+=stats.science;
rank+=stats.culture;
if(tile.improvement ==null) rank+=0.5; // improvement potential!
if(tile.improvement == null) rank+=0.5; // improvement potential!
if(tile.resource!=null) rank+=1;
return rank;
}

View File

@ -174,6 +174,7 @@ public class CityScreen extends CameraStageBaseScreen {
Group allTiles = new Group();
for(final TileInfo tileInfo : game.civInfo.tileMap.getTilesInDistance(cityInfo.cityLocation,5)){
if(!tileInfo.explored) continue; // Don't even bother to display it.
CityTileGroup group = new CityTileGroup(cityInfo, tileInfo);
group.addListener(new ClickListener(){
@Override