diff --git a/android/assets/PolicyIcons/Aristocracy_(Civ5).png b/android/assets/PolicyIcons/Aristocracy_(Civ5).png new file mode 100644 index 0000000000..aaa8a89e7a Binary files /dev/null and b/android/assets/PolicyIcons/Aristocracy_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Citizenship_(Civ5).png b/android/assets/PolicyIcons/Citizenship_(Civ5).png new file mode 100644 index 0000000000..2eba6129b5 Binary files /dev/null and b/android/assets/PolicyIcons/Citizenship_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Civil_Society_(Civ5).png b/android/assets/PolicyIcons/Civil_Society_(Civ5).png new file mode 100644 index 0000000000..e22b533c8f Binary files /dev/null and b/android/assets/PolicyIcons/Civil_Society_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Collective_Rule_(Civ5).png b/android/assets/PolicyIcons/Collective_Rule_(Civ5).png new file mode 100644 index 0000000000..182f3a5cd4 Binary files /dev/null and b/android/assets/PolicyIcons/Collective_Rule_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Constitution_(Civ5).png b/android/assets/PolicyIcons/Constitution_(Civ5).png new file mode 100644 index 0000000000..72ca4d5567 Binary files /dev/null and b/android/assets/PolicyIcons/Constitution_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Democracy_(Civ5).png b/android/assets/PolicyIcons/Democracy_(Civ5).png new file mode 100644 index 0000000000..12ecdad4a0 Binary files /dev/null and b/android/assets/PolicyIcons/Democracy_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Entrepreneurship_(Civ5).png b/android/assets/PolicyIcons/Entrepreneurship_(Civ5).png new file mode 100644 index 0000000000..1b4822f331 Binary files /dev/null and b/android/assets/PolicyIcons/Entrepreneurship_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Free_Religion_(Civ5).png b/android/assets/PolicyIcons/Free_Religion_(Civ5).png new file mode 100644 index 0000000000..b6a2265dbd Binary files /dev/null and b/android/assets/PolicyIcons/Free_Religion_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Free_Speech_(Civ5).png b/android/assets/PolicyIcons/Free_Speech_(Civ5).png new file mode 100644 index 0000000000..86a941aba9 Binary files /dev/null and b/android/assets/PolicyIcons/Free_Speech_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Free_Thought_(Civ5).png b/android/assets/PolicyIcons/Free_Thought_(Civ5).png new file mode 100644 index 0000000000..879af77c3c Binary files /dev/null and b/android/assets/PolicyIcons/Free_Thought_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Humanism_(Civ5).png b/android/assets/PolicyIcons/Humanism_(Civ5).png new file mode 100644 index 0000000000..97d2bc2ff7 Binary files /dev/null and b/android/assets/PolicyIcons/Humanism_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Landed_Elite_(Civ5).png b/android/assets/PolicyIcons/Landed_Elite_(Civ5).png new file mode 100644 index 0000000000..3d753b0647 Binary files /dev/null and b/android/assets/PolicyIcons/Landed_Elite_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Legalism_(Civ5).png b/android/assets/PolicyIcons/Legalism_(Civ5).png new file mode 100644 index 0000000000..4dc881e7dd Binary files /dev/null and b/android/assets/PolicyIcons/Legalism_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Mandate_Of_Heaven_(Civ5).png b/android/assets/PolicyIcons/Mandate_Of_Heaven_(Civ5).png new file mode 100644 index 0000000000..34bf810198 Binary files /dev/null and b/android/assets/PolicyIcons/Mandate_Of_Heaven_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Mercantilism_(Civ5).png b/android/assets/PolicyIcons/Mercantilism_(Civ5).png new file mode 100644 index 0000000000..7f81e452f7 Binary files /dev/null and b/android/assets/PolicyIcons/Mercantilism_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Meritocracy_(Civ5).png b/android/assets/PolicyIcons/Meritocracy_(Civ5).png new file mode 100644 index 0000000000..90c1f7d7a9 Binary files /dev/null and b/android/assets/PolicyIcons/Meritocracy_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Monarchy_(Civ5).png b/android/assets/PolicyIcons/Monarchy_(Civ5).png new file mode 100644 index 0000000000..1ff45da772 Binary files /dev/null and b/android/assets/PolicyIcons/Monarchy_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Oligarchy_(Civ5).png b/android/assets/PolicyIcons/Oligarchy_(Civ5).png new file mode 100644 index 0000000000..0187bf6e7a Binary files /dev/null and b/android/assets/PolicyIcons/Oligarchy_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Organized_Religion_(Civ5).png b/android/assets/PolicyIcons/Organized_Religion_(Civ5).png new file mode 100644 index 0000000000..8241704542 Binary files /dev/null and b/android/assets/PolicyIcons/Organized_Religion_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Patronage_(Civ5).png b/android/assets/PolicyIcons/Patronage_(Civ5).png new file mode 100644 index 0000000000..a9622146c5 Binary files /dev/null and b/android/assets/PolicyIcons/Patronage_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Protectionism_(Civ5).png b/android/assets/PolicyIcons/Protectionism_(Civ5).png new file mode 100644 index 0000000000..a9c449ad40 Binary files /dev/null and b/android/assets/PolicyIcons/Protectionism_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Reformation_(Civ5).png b/android/assets/PolicyIcons/Reformation_(Civ5).png new file mode 100644 index 0000000000..b3cdba6488 Binary files /dev/null and b/android/assets/PolicyIcons/Reformation_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Representation_(Civ5).png b/android/assets/PolicyIcons/Representation_(Civ5).png new file mode 100644 index 0000000000..275628bf92 Binary files /dev/null and b/android/assets/PolicyIcons/Representation_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Republic_(Civ5).png b/android/assets/PolicyIcons/Republic_(Civ5).png new file mode 100644 index 0000000000..e1f52b133d Binary files /dev/null and b/android/assets/PolicyIcons/Republic_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Scientific_Revolution_(Civ5).png b/android/assets/PolicyIcons/Scientific_Revolution_(Civ5).png new file mode 100644 index 0000000000..b803eecf96 Binary files /dev/null and b/android/assets/PolicyIcons/Scientific_Revolution_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Secularism_(Civ5).png b/android/assets/PolicyIcons/Secularism_(Civ5).png new file mode 100644 index 0000000000..4873b18456 Binary files /dev/null and b/android/assets/PolicyIcons/Secularism_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Sovereignty_(Civ5).png b/android/assets/PolicyIcons/Sovereignty_(Civ5).png new file mode 100644 index 0000000000..1c741d1b30 Binary files /dev/null and b/android/assets/PolicyIcons/Sovereignty_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Theocracy_(Civ5).png b/android/assets/PolicyIcons/Theocracy_(Civ5).png new file mode 100644 index 0000000000..babef084e8 Binary files /dev/null and b/android/assets/PolicyIcons/Theocracy_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Trade_Unions_(Civ5).png b/android/assets/PolicyIcons/Trade_Unions_(Civ5).png new file mode 100644 index 0000000000..cd6a3ee6b2 Binary files /dev/null and b/android/assets/PolicyIcons/Trade_Unions_(Civ5).png differ diff --git a/android/assets/PolicyIcons/Universal_Suffrage_(Civ5).png b/android/assets/PolicyIcons/Universal_Suffrage_(Civ5).png new file mode 100644 index 0000000000..b5d739dbb3 Binary files /dev/null and b/android/assets/PolicyIcons/Universal_Suffrage_(Civ5).png differ diff --git a/android/assets/TerrainIcons/Desert_(Civ5).png.meta b/android/assets/TerrainIcons/Desert_(Civ5).png.meta new file mode 100644 index 0000000000..ec9e8eac78 --- /dev/null +++ b/android/assets/TerrainIcons/Desert_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 6a3167ea11aabe149b48ccf74d32522d +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Flood_plains_(Civ5).png.meta b/android/assets/TerrainIcons/Flood_plains_(Civ5).png.meta new file mode 100644 index 0000000000..70aecb12b8 --- /dev/null +++ b/android/assets/TerrainIcons/Flood_plains_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 321bb463467bd11479afff2e8f1e8808 +timeCreated: 1504555636 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Forest_(Civ5).png.meta b/android/assets/TerrainIcons/Forest_(Civ5).png.meta new file mode 100644 index 0000000000..36b7eab39f --- /dev/null +++ b/android/assets/TerrainIcons/Forest_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 62dca01c03840c54f80ccef8f8b2842e +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Grassland_(Civ5).png.meta b/android/assets/TerrainIcons/Grassland_(Civ5).png.meta new file mode 100644 index 0000000000..1100fe40bf --- /dev/null +++ b/android/assets/TerrainIcons/Grassland_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: c956af91abda1954db1d833fa9126aec +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Hill_(Civ5).png.meta b/android/assets/TerrainIcons/Hill_(Civ5).png.meta new file mode 100644 index 0000000000..b0c224a566 --- /dev/null +++ b/android/assets/TerrainIcons/Hill_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: cb19f36509e59214994bd6042a2af70f +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Jungle_(Civ5).png.meta b/android/assets/TerrainIcons/Jungle_(Civ5).png.meta new file mode 100644 index 0000000000..0e61267aa1 --- /dev/null +++ b/android/assets/TerrainIcons/Jungle_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: a5af63bfa8d4a824cb7de3cff9de012c +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Lakes_(Civ5).png.meta b/android/assets/TerrainIcons/Lakes_(Civ5).png.meta new file mode 100644 index 0000000000..a360d6f33f --- /dev/null +++ b/android/assets/TerrainIcons/Lakes_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 61f4b1c3f3eff644587595005c3ac16c +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Marsh_(Civ5).png.meta b/android/assets/TerrainIcons/Marsh_(Civ5).png.meta new file mode 100644 index 0000000000..111ebb0e90 --- /dev/null +++ b/android/assets/TerrainIcons/Marsh_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: bae63480532174c4fa7b6645e23912f4 +timeCreated: 1504555636 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Mountain_(Civ5).png.meta b/android/assets/TerrainIcons/Mountain_(Civ5).png.meta new file mode 100644 index 0000000000..e49368d63f --- /dev/null +++ b/android/assets/TerrainIcons/Mountain_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 47d0fd593edb3cc40a5b295d521d5f9b +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Oasis_(Civ5).png.meta b/android/assets/TerrainIcons/Oasis_(Civ5).png.meta new file mode 100644 index 0000000000..dc3d11aaa2 --- /dev/null +++ b/android/assets/TerrainIcons/Oasis_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: 18ee547cb3112564494e8da9c87efb9f +timeCreated: 1504555636 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/Plains_(Civ5).png.meta b/android/assets/TerrainIcons/Plains_(Civ5).png.meta new file mode 100644 index 0000000000..f031d4b549 --- /dev/null +++ b/android/assets/TerrainIcons/Plains_(Civ5).png.meta @@ -0,0 +1,74 @@ +fileFormatVersion: 2 +guid: c8fd49106bc29284ba9e26df5f5e6e0e +timeCreated: 1504549534 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/android/assets/TerrainIcons/road.png b/android/assets/TerrainIcons/road.png new file mode 100644 index 0000000000..caed4bfb99 Binary files /dev/null and b/android/assets/TerrainIcons/road.png differ diff --git a/android/assets/jsons/Policies.json b/android/assets/jsons/Policies.json index 1f7f7a3286..b2c42513f1 100644 --- a/android/assets/jsons/Policies.json +++ b/android/assets/jsons/Policies.json @@ -1,42 +1,42 @@ [ { name:"Tradition", - description:"+3 culture in capital and increased rate of border expansion", + description:"+3 culture in capital and increased rate of border expansion (how much?)", policies:[ { name:"Aristocracy", description:"+15% production when constructing wonders, +1 happiness for every 10 citizens in a city", - row;1, + row:1, column:1 }, { name:"Legalism", - description:"Free culture building in your first 4 cities", - row;1, + description:"Free culture building in your first 4 cities - todo", + row:1, column:3 }, { name:"Oligarchy", - description:"Improves garrisons in cities - useless at this time", - row;1, + description:"Improves garrisons in cities - useless at this time, change to what?", + row:1, column:5 }, { name:"Landed Elite", description:"+10% food growth and +2 food in capital", requires:["Legalism"] - row;2, + row:2, column:2 }, { name:"Monarchy", description:"+1 gold and -1 unhappiness for every 2 citizens in capital", requires:["Legalism"] - row;2, + row:2, column:4 }, { - name:"Finisher", + name:"Tradition Complete", description:"+15% growth and +2 food in all cities" } ] @@ -47,38 +47,38 @@ { name:"Collective Rule", description:"Training of settlers increaed +50% in capital, recieve a new settler near capital", - row;1, + row:1, column:1 }, { name:"Citizenship", description:"+25% construction rate of workers, recieve free worker near the capital", - row;1, + row:1, column:4 }, { name:"Republic", description:"+1 construction in every city, +5% construction when constructing buildings", requires:["Collective Rule"], - row;1, + row:2, column:1 }, { name:"Representation", - description:"Each city founded increases ulture cost of policies 33% less than normal. Starts a golden age.", + description:"Each city founded increases culture cost of policies 33% less than normal. Starts a golden age.", requires:["Citizenship"] - row;2, + row:2, column:3 }, { name:"Meritocracy", description:"+1 happiness for every city connected to capital, -5% unhappiness from citizens", requires:["Citizenship"] - row;2, + row:2, column:5 }, { - name:"Finisher", + name:"Liberty Complete", description:"Free Great Person of choice near capital - TODO" } ] @@ -89,38 +89,38 @@ { name:"Organized Religion", description:"+1 happiness for each monument, temple and monastery", - row;1, + row:1, column:2 }, { name:"Mandate Of Heaven", description:"50% of excess happiness added to culture towards policies", - row;1, + row:1, column:5 }, { name:"Theocracy", description:"Temples give +10% gold", requires:["Organized Religion"], - row;2, + row:2, column:1 }, { name:"Reformation", description:"+33% culture in all cities with a world wonder, immediately enter a golden age", requires:["Organized Religion"] - row;2, + row:2, column:3 }, { name:"Free Religion", - description:"+1 culture for each monument, temple and monastery. Gain a free policy.", + description:"+1 culture for each monument, temple and monastery. Gain a free policy - TODO.", requires:["Mandate of Heaven","Reformation"] - row;3, + row:3, column:4 }, { - name:"Finisher", + name:"Piety Complete", description:"Reduce culture cost of future policies by 10%" } ] @@ -130,22 +130,36 @@ policies:[ { name:"Trade Unions", - description:"Maintainance on roads & railroads reduced by 33%, harbors+seaport +1 gold", - row;1, + description:"Maintainance on roads & railroads reduced by 33%, +2 gold from all trade routes", + row:1, column:2 }, { name:"Mercantilism", description:"-25% to purchasing items in cities", - row;1, + row:1, + column:5 + }, + { + name:"Entrepreneurship", + description:"Great Merchants are earned 25% faster, +1 Science from every Mint, Market, Bank and Stock Exchange.", + requires:["Trade Unions"], + row:2, + column:2 + }, + { + name:"Patronage", + description:"Cost of purchasing culture buildings reduced by 50%", + requires:["Mercantilism"], + row:2, column:5 }, { name:"Protectionism", - description:"+1 from each luxury resource", - requires:["Organized Religion"], - row;2, - column:1 + description:"+1 happiness from each luxury resource", + requires:["Entrepreneurship","Patronage"], + row:3, + column:3 }, { name:"Finisher", @@ -159,34 +173,34 @@ { name:"Secularism", description:"+2 science from every specialist", - row;1, + row:1, column:2 }, { name:"Humanism", description:"+1 happiness from every university, observtory and public school", - row;1, + row:1, column:5 }, { name:"Free Thought", description:"+1 science from every trading post, +17% science from universities", requires:["Secularism"], - row;2, + row:2, column:1 }, { - name:"Soveregnity", + name:"Sovereignty", description:"+15% science while empire is happy", requires:["Humanism"], - row;2, - column:1 + row:2, + column:5 }, { name:"Scientific Revolution", description:"Gain 2 free technologies", requires:["Free Thought"], - row;2, + row:3, column:1 }, { @@ -195,44 +209,44 @@ } ] },{ - name:"Freedon", + name:"Freedom", description:"+25% great people rate", policies:[ { name:"Constitution", description:"+2 culture from each wonder", - row;1, + row:1, column:2 }, { - name:"Universal Sufferage", + name:"Universal Suffrage", description:"+33% city defence???", - row;1, + row:1, column:5 }, { name:"Civil Society", description:"-50% food consumption by specialists", - row;2, + row:2, column:1 }, { name:"Free Speech", description:"8 units are maintainance free", requires:["Constitution"], - row;2, + row:2, column:1 }, { name:"Democracy", description:"Specialists produce half normal unhappiness", requires:["Civil Society"], - row;2, + row:2, column:1 }, { name:"Finisher", - description:"+1 gold from all science buildings" + description:"Tile yield from gret improvement +100%, golden ages increase by 50%" } ] }, diff --git a/android/assets/jsons/Techs.json b/android/assets/jsons/Techs.json index 6ef838f602..c0f91ac950 100644 --- a/android/assets/jsons/Techs.json +++ b/android/assets/jsons/Techs.json @@ -285,7 +285,7 @@ name:"Scientific Theory", row:4, prerequisites:["Archaeology","Acoustics","Economics"], - description:"Reveals coal and allows construction of Public Schools, providing science" + description:"Reveals coal and allows construction of Public Schools, providing science. Also improves science from Academy." }, { name:"Fertilizer", diff --git a/android/assets/jsons/TileResources.json b/android/assets/jsons/TileResources.json index 6514f81e94..46cbfbd787 100644 --- a/android/assets/jsons/TileResources.json +++ b/android/assets/jsons/TileResources.json @@ -168,7 +168,7 @@ name:"Incense", resourceType:"Luxury", terrainsCanBeFoundOn:["Plains","Desert"], - gold:3, + gold:2, improvement:"Plantation", improvementStats:{gold:1}, building:"Monastery" diff --git a/android/assets/skin/flat-earth-ui.json b/android/assets/skin/flat-earth-ui.json index 0870da8fa8..84a8cddcc5 100644 --- a/android/assets/skin/flat-earth-ui.json +++ b/android/assets/skin/flat-earth-ui.json @@ -19,7 +19,7 @@ com.badlogic.gdx.graphics.Color: { } color: { r: 0.3372549 - g: 0.8 + g: 0.7 b: 0.44705883 a: 1 } diff --git a/core/src/com/unciv/civinfo/CityConstructions.java b/core/src/com/unciv/civinfo/CityConstructions.java index 2fd9c3c2a8..b499ed97b6 100644 --- a/core/src/com/unciv/civinfo/CityConstructions.java +++ b/core/src/com/unciv/civinfo/CityConstructions.java @@ -117,7 +117,7 @@ public class CityConstructions public FullStats getStats() { FullStats stats = new FullStats(); - for(Building building : getBuiltBuildings()) stats.add(building); + for(Building building : getBuiltBuildings()) stats.add(building.getStats()); stats.science += getCity().getBuildingUniques().count(new Predicate() { @Override public boolean evaluate(String arg0) { diff --git a/core/src/com/unciv/civinfo/CityInfo.java b/core/src/com/unciv/civinfo/CityInfo.java index 0bdffdca1f..25083f7cdb 100644 --- a/core/src/com/unciv/civinfo/CityInfo.java +++ b/core/src/com/unciv/civinfo/CityInfo.java @@ -96,6 +96,8 @@ public class CityInfo { return cityResources; } + public int getNumberOfSpecialists(){return (int) (specialists.science+specialists.production+specialists.culture+specialists.gold);} + public int getFreePopulation() { int workingPopulation = getTilesInRange().count(new Predicate() { @Override @@ -103,8 +105,7 @@ public class CityInfo { return name.equals(arg0.workingCity); } })-1; // 1 is the city center - int specialistNum = (int) (specialists.science+specialists.production+specialists.culture+specialists.gold); - return population - workingPopulation - specialistNum; + return population - workingPopulation - getNumberOfSpecialists(); } public boolean hasNonWorkingPopulation() { @@ -112,6 +113,7 @@ public class CityInfo { } public void updateCityStats() { + CivilizationInfo civInfo = CivilizationInfo.current(); FullStats stats = new FullStats(); stats.science += population; @@ -125,40 +127,80 @@ public class CityInfo { stats.production+=specialists.production*2; stats.science+=specialists.science*3; stats.gold+=specialists.gold*2; + if(civInfo.policies.contains("Commerce Complete")) stats.gold+=getNumberOfSpecialists(); + if(civInfo.policies.contains("Secularism")) stats.science+=getNumberOfSpecialists()*2; //idle ppl stats.production += getFreePopulation(); - CivilizationInfo civInfo = CivilizationInfo.current(); if(!isCapital() && isConnectedToCapital(RoadStatus.Road)) { // Calculated by http://civilization.wikia.com/wiki/Trade_route_(Civ5) double goldFromTradeRoute = civInfo.getCapital().population * 0.15 + population * 1.1 - 1; + if(civInfo.policies.contains("Trade Unions")) goldFromTradeRoute+=2; if(civInfo.getBuildingUniques().contains("TradeRouteGoldIncrease")) goldFromTradeRoute*=1.25; // Machu Pichu speciality stats.gold += goldFromTradeRoute; } stats.add(cityConstructions.getStats()); + if(civInfo.policies.contains("Tradition") && isCapital()) + stats.culture+=3; + if(civInfo.policies.contains("Landed Elite") && isCapital()) + stats.food+=2; + if(CivilizationInfo.current().policies.contains("Tradition Complete")) + stats.food+=2; + if(CivilizationInfo.current().policies.contains("Monarchy") && isCapital()) + stats.gold+=population/2; + if(CivilizationInfo.current().policies.contains("Liberty")) + stats.culture+=1; + if(CivilizationInfo.current().policies.contains("Republic")) + stats.production+=1; + if(CivilizationInfo.current().policies.contains("Universal Suffrage")) + stats.production+=population/5; + if(CivilizationInfo.current().policies.contains("Free Speech")) + stats.culture+=population/2; FullStats statPercentBonuses = cityConstructions.getStatPercentBonuses(); if(isCapital() || isConnectedToCapital(RoadStatus.Railroad)) statPercentBonuses.production += 25; if(civInfo.isGoldenAge()) statPercentBonuses.production+=20; IConstruction currentConstruction = cityConstructions.getCurrentConstruction(); - if(currentConstruction instanceof Building && ((Building)currentConstruction).isWonder && - civInfo.getCivResources().containsKey(GameBasics.TileResources.get("Marble"))) - statPercentBonuses.production+=15; + if(currentConstruction instanceof Building && ((Building)currentConstruction).isWonder){ + if(civInfo.getCivResources().containsKey(GameBasics.TileResources.get("Marble"))) + statPercentBonuses.production+=15; + if(civInfo.policies.contains("Aristocracy")) + statPercentBonuses.production+=15; + } + if(civInfo.tech.isResearched("Computers")){ statPercentBonuses.production+=10; statPercentBonuses.science+=10; } + if(civInfo.policies.contains("Collective Rule") && isCapital() + && "Settler".equals(cityConstructions.currentConstruction)) + statPercentBonuses.production+=50; + if(civInfo.policies.contains("Republic") && currentConstruction instanceof Building) + statPercentBonuses.production+=5; + if(civInfo.policies.contains("Reformation") && cityConstructions.builtBuildings.any(new Predicate() { + @Override + public boolean evaluate(String arg0) { + return GameBasics.Buildings.get(arg0).isWonder; + } + })) + statPercentBonuses.culture+=33; + if(civInfo.policies.contains("Commerce") && isCapital()) + statPercentBonuses.gold+=25; + if(civInfo.policies.contains("Sovereignty") && civInfo.getHappinessForNextTurn() >= 0) + statPercentBonuses.science+=15; stats.production*=1+statPercentBonuses.production/100; // So they get bonuses for production and gold/science if(cityConstructions.currentConstruction.equals("Gold")) stats.gold+=stats.production/4; if(cityConstructions.currentConstruction.equals("Science")) { + float scienceProduced=stats.production/4; if (civInfo.getBuildingUniques().contains("ScienceConversionIncrease")) - stats.science += stats.production / 3; - else stats.science += stats.production / 4; + scienceProduced*=1.33; + if(civInfo.policies.contains("Rationalism")) scienceProduced*=1.33; + stats.science += scienceProduced; } stats.gold*=1+statPercentBonuses.gold/100; @@ -168,20 +210,41 @@ public class CityInfo { boolean isUnhappy = civInfo.getHappinessForNextTurn() < 0; if (!isUnhappy) stats.food*=1+statPercentBonuses.food/100; // Regular food bonus revoked when unhappy per https://forums.civfanatics.com/resources/complete-guide-to-happiness-vanilla.25584/ stats.food -= population * 2; // Food reduced after the bonus - if(isUnhappy) stats.food /= 4; // Reduce excess food to 1/4 per the same + if(CivilizationInfo.current().policies.contains("Civil Society")) + stats.food+=getNumberOfSpecialists(); + if(isUnhappy) stats.food /= 4; // Reduce excess food to 1/4 per the same + if(civInfo.policies.contains("Landed Elite") && isCapital()) + stats.food*=1.1; + if(CivilizationInfo.current().policies.contains("Tradition Complete")) + stats.food*=1.15; stats.gold-= cityConstructions.getMaintainanceCosts(); // this is AFTER the bonus calculation! this.cityStats = stats; } public float getCityHappiness(){ // needs to be a separate function because we need to know the global happiness state + CivilizationInfo civInfo = CivilizationInfo.current(); // in order to determine how much food is produced in a city! float happiness = -3; // -3 happiness per city - if(CivilizationInfo.current().getBuildingUniques().contains("CitizenUnhappinessDecreased")) - happiness-=population*0.9; - else happiness-=population; //and -1 per population - return happiness + (int) cityConstructions.getStats().happiness; + float unhappinessFromCitizens = population; + if(civInfo.policies.contains("Democracy")) unhappinessFromCitizens-=getNumberOfSpecialists()*0.5f; + if(civInfo.getBuildingUniques().contains("CitizenUnhappinessDecreased")) + unhappinessFromCitizens*=0.9; + if(civInfo.policies.contains("Aristocracy")) + unhappinessFromCitizens*=0.95; + happiness-=unhappinessFromCitizens; + + if(civInfo.policies.contains("Aristocracy")) + happiness+=population/10; + if(civInfo.policies.contains("Monarchy") && isCapital()) + happiness+=population/2; + if(civInfo.policies.contains("Meritocracy") && isConnectedToCapital(RoadStatus.Road)) + happiness+=1; + + happiness+=(int) cityConstructions.getStats().happiness; + + return happiness; } void nextTurn() { @@ -214,14 +277,6 @@ public class CityInfo { addNewTile(); CivilizationInfo.current().notifications.add(name+" has expanded its borders!"); } - - CivilizationInfo civInfo = CivilizationInfo.current(); - float greatPersonGenerationMultiplier = 3; - if(civInfo.getBuildingUniques().contains("GreatPersonGenerationIncrease")) greatPersonGenerationMultiplier*=1.33; - civInfo.greatPersonPoints.gold+=specialists.gold*greatPersonGenerationMultiplier; - civInfo.greatPersonPoints.production+=specialists.production*greatPersonGenerationMultiplier; - civInfo.greatPersonPoints.culture+=specialists.culture*greatPersonGenerationMultiplier; - civInfo.greatPersonPoints.science+=specialists.science*greatPersonGenerationMultiplier; } private void addNewTile(){ @@ -325,6 +380,25 @@ public class CityInfo { }); } + public FullStats getGreatPersonPoints(){ + FullStats greatPersonPoints = specialists.multiply(3); + CivilizationInfo civInfo = CivilizationInfo.current(); + + for(Building building : cityConstructions.getBuiltBuildings()) + if(building.greatPersonPoints!=null) + greatPersonPoints.add(building.greatPersonPoints); + + float multiplier = 1; + if(civInfo.getBuildingUniques().contains("GreatPersonGenerationIncrease")) + greatPersonPoints = greatPersonPoints.multiply(1.33f); + if(civInfo.policies.contains("Entrepreneurship")) + greatPersonPoints.gold*=1.25; + if(civInfo.policies.contains("Freedom")) + greatPersonPoints = greatPersonPoints.multiply(1.25f); + + return greatPersonPoints; + } + diff --git a/core/src/com/unciv/civinfo/CivilizationInfo.java b/core/src/com/unciv/civinfo/CivilizationInfo.java index cc136f4d14..652942f08e 100644 --- a/core/src/com/unciv/civinfo/CivilizationInfo.java +++ b/core/src/com/unciv/civinfo/CivilizationInfo.java @@ -3,6 +3,7 @@ package com.unciv.civinfo; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.utils.Predicate; import com.unciv.game.UnCivGame; +import com.unciv.game.pickerscreens.PolicyPickerScreen; import com.unciv.models.LinqCollection; import com.unciv.models.LinqCounter; import com.unciv.models.gamebasics.Building; @@ -30,6 +31,7 @@ public class CivilizationInfo { public FullStats greatPersonPoints = new FullStats(); public CivilizationTech tech = new CivilizationTech(); + public LinqCollection policies = new LinqCollection(); public int turns = 1; public LinqCollection notifications = new LinqCollection(); @@ -40,8 +42,7 @@ public class CivilizationInfo { public int currentCity =0; //index! - public CivilizationInfo(){ - } + public CivilizationInfo(){} public CityInfo getCurrentCity() { return cities.get(currentCity); } @@ -51,7 +52,7 @@ public class CivilizationInfo { } public void addCity(Vector2 location){ - CityInfo city = new CityInfo(this,location); + new CityInfo(this,location); } public CityInfo getCapital(){ @@ -72,7 +73,10 @@ public class CivilizationInfo { { notifications.clear(); CivStats nextTurnStats = getStatsForNextTurn(); + boolean couldAdoptPolicyBefore = canAdoptPolicy(); civStats.add(nextTurnStats); + if(!couldAdoptPolicyBefore && canAdoptPolicy()) + UnCivGame.Current.setScreen(new PolicyPickerScreen()); int happiness = getHappinessForNextTurn(); if(!isGoldenAge() && happiness>0) @@ -80,17 +84,13 @@ public class CivilizationInfo { if(cities.size() > 0) tech.nextTurn((int)nextTurnStats.science); - for (CityInfo city : cities) { - city.nextTurn(); - } + for (CityInfo city : cities) city.nextTurn(); + greatPersonPointsForTurn(); + // We need to update the stats after ALL the cities are done updating because + // maybe one of them has a wonder that affects the stats of all the rest of the cities for(TileInfo tile : tileMap.values()) tile.nextTurn(); - checkGreatPersonGeneration(); - - for (CityInfo city : cities) city.updateCityStats(); - - turns++; if(isGoldenAge()) turnsLeftForCurrentGoldenAge--; if(civStats.happiness > happinessRequiredForNextGoldenAge()){ @@ -98,6 +98,9 @@ public class CivilizationInfo { enterGoldenAge(); numberOfGoldenAges++; } + + for (CityInfo city : cities) city.updateCityStats(); + turns++; } public void addGreatPerson(String unitName){ // This is also done by some wonders and social policies, remember @@ -105,7 +108,10 @@ public class CivilizationInfo { notifications.add("A "+unitName+" has been born!"); } - public void checkGreatPersonGeneration(){ + public void greatPersonPointsForTurn(){ + for(CityInfo city : cities) + greatPersonPoints.add(city.getGreatPersonPoints()); + if(greatPersonPoints.science>pointsForNextGreatPerson){ greatPersonPoints.science-=pointsForNextGreatPerson; pointsForNextGreatPerson*=2; @@ -131,6 +137,7 @@ public class CivilizationInfo { public void enterGoldenAge(){ int turnsToGoldenAge = 10; if(getBuildingUniques().contains("GoldenAgeLengthIncrease")) turnsToGoldenAge*=1.5; + if(policies.contains("Freedom Complete")) turnsToGoldenAge*=1.5; turnsLeftForCurrentGoldenAge += turnsToGoldenAge; notifications.add("You have entered a golden age!"); } @@ -141,24 +148,39 @@ public class CivilizationInfo { statsForTurn.add(city.cityStats); } statsForTurn.happiness=0; + + int transportationUpkeep = 0; for(TileInfo tile : tileMap.values()) { - if (tile.roadStatus == RoadStatus.Road) statsForTurn.gold += 1; - else if(tile.roadStatus == RoadStatus.Railroad) statsForTurn.gold +=2; + if (tile.roadStatus == RoadStatus.Road) transportationUpkeep+=1; + else if(tile.roadStatus == RoadStatus.Railroad) transportationUpkeep+=2; } + if(policies.contains("Trade Unions")) transportationUpkeep *= 2/3f; + statsForTurn.gold -=transportationUpkeep; + if(policies.contains("Mandate Of Heaven")) + statsForTurn.culture+=getHappinessForNextTurn()/2; return statsForTurn; } public int getHappinessForNextTurn(){ int happiness = baseHappiness; + int happinessPerUniqueLuxury = 5; + if(policies.contains("Protectionism")) happinessPerUniqueLuxury+=1; happiness += new LinqCollection(getCivResources().keySet()).count(new Predicate() { @Override public boolean evaluate(TileResource arg0) { return arg0.resourceType == ResourceType.Luxury; } - }) * 5; // 5 happiness for each unique luxury in civ + }) * happinessPerUniqueLuxury; for (CityInfo city : cities) { happiness += city.getCityHappiness(); } + if(getBuildingUniques().contains("HappinessPerSocialPolicy")) + happiness+=policies.count(new Predicate() { + @Override + public boolean evaluate(String arg0) { + return !arg0.endsWith("Complete"); + } + }); return happiness; } @@ -182,5 +204,26 @@ public class CivilizationInfo { } }).unique(); } + + public int getCultureNeededForNextPolicy(){ + // from https://forums.civfanatics.com/threads/the-number-crunching-thread.389702/ + int basicPolicies = policies.count(new Predicate() { + @Override + public boolean evaluate(String arg0) { + return !arg0.endsWith("Complete"); + } + }); + double baseCost = 25+ Math.pow(basicPolicies*6,1.7); + double cityModifier = 0.3*(cities.size()-1); + if(policies.contains("Representation")) cityModifier *= 2/3f; + int cost = (int) Math.round(baseCost*(1+cityModifier)); + if(policies.contains("Piety Complete")) cost*=0.9; + if(getBuildingUniques().contains("PolicyCostReduction")) cost*=0.9; + return cost-cost%5; // round down to nearest 5 + } + + public boolean canAdoptPolicy(){ + return civStats.culture >= getCultureNeededForNextPolicy(); + } } diff --git a/core/src/com/unciv/civinfo/MapUnit.java b/core/src/com/unciv/civinfo/MapUnit.java index e58195fc73..72fe39f87f 100644 --- a/core/src/com/unciv/civinfo/MapUnit.java +++ b/core/src/com/unciv/civinfo/MapUnit.java @@ -12,7 +12,7 @@ public class MapUnit{ public String action; // work, automation, fortifying, I dunno what. public void doAction(TileInfo tile){ - if(tile.improvementInProgress!=null) workOnImprovement(tile); + if(name.equals("Worker") && tile.improvementInProgress!=null) workOnImprovement(tile); if ("automation".equals(action)) doAutomatedAction(tile); } diff --git a/core/src/com/unciv/civinfo/TileInfo.java b/core/src/com/unciv/civinfo/TileInfo.java index 67d9ab00d0..3df39b54b8 100644 --- a/core/src/com/unciv/civinfo/TileInfo.java +++ b/core/src/com/unciv/civinfo/TileInfo.java @@ -81,6 +81,11 @@ public class TileInfo else stats.add(improvement); // basic improvement if (isResearched(improvement.improvingTech)) stats.add(improvement.improvingTechStats); // eg Chemistry for mines + if(improvement.name.equals("Trading post") && CivilizationInfo.current().policies.contains("Free Thought")) + stats.science+=1; + if(new LinqCollection("Academy","Landmark","Manufactory","Customs House").contains(improvement.name) + && CivilizationInfo.current().policies.contains("Freedom Complete")) + stats.add(improvement); // again, for the double effect } if (isCityCenter()) { @@ -126,10 +131,6 @@ public class TileInfo { if(unit !=null) { unit.currentMovement = unit.maxMovement; - - if (!unit.name.equals("Worker")) - return; - unit.doAction(this); } } diff --git a/core/src/com/unciv/game/CityScreen.java b/core/src/com/unciv/game/CityScreen.java index bca57973fe..ff45903ea2 100644 --- a/core/src/com/unciv/game/CityScreen.java +++ b/core/src/com/unciv/game/CityScreen.java @@ -46,8 +46,7 @@ public class CityScreen extends CameraStageBaseScreen { public CityInfo getCity(){return game.civInfo.getCurrentCity();} - public CityScreen(final UnCivGame game) { - super(game); + public CityScreen() { new Label("",skin).getStyle().font.getData().setScale(game.settings.labelScale); addTiles(); @@ -156,7 +155,7 @@ public class CityScreen extends CameraStageBaseScreen { CivilizationInfo ci = game.civInfo; if (ci.currentCity == 0) ci.currentCity = ci.cities.size()-1; else ci.currentCity--; - game.setScreen(new CityScreen(game)); + game.setScreen(new CityScreen()); dispose(); } }); @@ -175,7 +174,7 @@ public class CityScreen extends CameraStageBaseScreen { CivilizationInfo ci = game.civInfo; if (ci.currentCity == ci.cities.size()-1) ci.currentCity = 0; else ci.currentCity++; - game.setScreen(new CityScreen(game)); + game.setScreen(new CityScreen()); dispose(); } }); @@ -308,7 +307,7 @@ public class CityScreen extends CameraStageBaseScreen { buildingPickButton.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { - game.setScreen(new ConstructionPickerScreen(game)); + game.setScreen(new ConstructionPickerScreen()); dispose(); } }); diff --git a/core/src/com/unciv/game/CivilopediaScreen.java b/core/src/com/unciv/game/CivilopediaScreen.java index a31ad972d9..8d81d987f9 100644 --- a/core/src/com/unciv/game/CivilopediaScreen.java +++ b/core/src/com/unciv/game/CivilopediaScreen.java @@ -21,9 +21,7 @@ import java.util.Collection; import java.util.LinkedHashMap; public class CivilopediaScreen extends com.unciv.game.utils.CameraStageBaseScreen { - public CivilopediaScreen(final UnCivGame game) { - - super(game); + public CivilopediaScreen() { Gdx.input.setInputProcessor(stage); Table buttonTable = new Table(); buttonTable.pad(15); diff --git a/core/src/com/unciv/game/ScienceVictoryScreen.java b/core/src/com/unciv/game/ScienceVictoryScreen.java index 7352090ec9..c9b30c8641 100644 --- a/core/src/com/unciv/game/ScienceVictoryScreen.java +++ b/core/src/com/unciv/game/ScienceVictoryScreen.java @@ -8,8 +8,7 @@ import com.unciv.models.LinqCounter; public class ScienceVictoryScreen extends PickerScreen { - public ScienceVictoryScreen(UnCivGame game) { - super(game); + public ScienceVictoryScreen() { LinqCounter builtSpaceshipParts = game.civInfo.scienceVictory.currentParts.clone(); for (int i = 0; i < 3; i++) { diff --git a/core/src/com/unciv/game/UnCivGame.java b/core/src/com/unciv/game/UnCivGame.java index 8d48c35d13..89ee3cb6e6 100644 --- a/core/src/com/unciv/game/UnCivGame.java +++ b/core/src/com/unciv/game/UnCivGame.java @@ -8,9 +8,12 @@ import com.unciv.civinfo.CityInfo; import com.unciv.civinfo.CivilizationInfo; import com.unciv.civinfo.Unit; import com.unciv.game.utils.GameSaver; +import com.unciv.models.LinqCollection; import com.unciv.models.gamebasics.BasicHelp; import com.unciv.models.gamebasics.Building; import com.unciv.models.gamebasics.GameBasics; +import com.unciv.models.gamebasics.Policy; +import com.unciv.models.gamebasics.PolicyBranch; import com.unciv.models.gamebasics.Technology; import com.unciv.models.LinqHashMap; import com.unciv.models.gamebasics.TechColumn; @@ -26,7 +29,6 @@ public class UnCivGame extends Game { public CivilizationInfo civInfo; public GameSettings settings = new GameSettings(); - public WorldScreen worldScreen; public void create() { SetupGameBasics(); @@ -43,7 +45,7 @@ public class UnCivGame extends Game { } else startNewGame(); - worldScreen = new WorldScreen(this); + worldScreen = new WorldScreen(); setWorldScreen(); } @@ -51,7 +53,7 @@ public class UnCivGame extends Game { civInfo = new CivilizationInfo(); civInfo.tileMap.placeUnitNearTile(Vector2.Zero,"Settler"); - worldScreen = new WorldScreen(this); + worldScreen = new WorldScreen(); setWorldScreen(); } @@ -79,6 +81,7 @@ public class UnCivGame extends Game { GameBasics.TileImprovements = CreateHashmap(TileImprovement.class,GetFromJson(TileImprovement[].class,"TileImprovements")); GameBasics.Helps = CreateHashmap(BasicHelp.class,GetFromJson(BasicHelp[].class,"BasicHelp")); GameBasics.Units = CreateHashmap(Unit.class,GetFromJson(Unit[].class,"Units")); + GameBasics.PolicyBranches = CreateHashmap(PolicyBranch.class,GetFromJson(PolicyBranch[].class,"Policies")); TechColumn[] TechColumns = GetFromJson(TechColumn[].class, "Techs"); GameBasics.Technologies = new LinqHashMap(); @@ -94,6 +97,19 @@ public class UnCivGame extends Game { TechColumn column = building.GetRequiredTech().column; building.cost = building.isWonder ? column.wonderCost : column.buildingCost; } + + for(PolicyBranch branch : GameBasics.PolicyBranches.values()){ + branch.requires=new LinqCollection(); + branch.branch=branch.name; + for(Policy policy:branch.policies) { + policy.branch=branch.name; + if (policy.requires == null) { + policy.requires = new LinqCollection(); + policy.requires.add(branch.name); + } + } + branch.policies.get(branch.policies.size()-1).name=branch.name+" Complete"; + } } } diff --git a/core/src/com/unciv/game/VictoryScreen.java b/core/src/com/unciv/game/VictoryScreen.java index 8c7bf00097..07cd41eee4 100644 --- a/core/src/com/unciv/game/VictoryScreen.java +++ b/core/src/com/unciv/game/VictoryScreen.java @@ -8,9 +8,7 @@ import com.unciv.game.utils.CameraStageBaseScreen; public class VictoryScreen extends CameraStageBaseScreen{ - public VictoryScreen(final UnCivGame game) { - super(game); - + public VictoryScreen() { Label label = new Label("Congrendulation!\r\nYou have won!!!!!",skin); label.setFontScale(5); label.setPosition((stage.getWidth()-label.getWidth())/2 , (stage.getHeight()-label.getHeight())/2 ); diff --git a/core/src/com/unciv/game/WorldScreen.java b/core/src/com/unciv/game/WorldScreen.java index bc4cc92246..8827b3050f 100644 --- a/core/src/com/unciv/game/WorldScreen.java +++ b/core/src/com/unciv/game/WorldScreen.java @@ -15,9 +15,9 @@ import com.badlogic.gdx.scenes.scene2d.utils.Drawable; import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.Predicate; -import com.unciv.civinfo.CityConstructions; import com.unciv.civinfo.TileInfo; import com.unciv.game.pickerscreens.ImprovementPickerScreen; +import com.unciv.game.pickerscreens.PolicyPickerScreen; import com.unciv.game.pickerscreens.TechPickerScreen; import com.unciv.game.utils.CameraStageBaseScreen; import com.unciv.game.utils.GameSaver; @@ -51,8 +51,7 @@ public class WorldScreen extends CameraStageBaseScreen { Table notificationsTable = new Table(); TextButton selectIdleUnitButton; - public WorldScreen(final UnCivGame game) { - super(game); + public WorldScreen() { new Label("",skin).getStyle().font.getData().setScale(game.settings.labelScale); addTiles(); @@ -71,17 +70,14 @@ public class WorldScreen extends CameraStageBaseScreen { civTable.setBackground(civBackground.tint(new Color(0x004085bf))); stage.addActor(civTable); - stage.addActor(techButton); - - setCenterPosition(Vector2.Zero); - + stage.addActor(notificationsTable); addSelectIdleUnitButton(); update(); + + setCenterPosition(Vector2.Zero); createNextTurnButton(); // needs civ table to be positioned addOptionsTable(); - - addNotificationsList(); } private void addSelectIdleUnitButton() { @@ -129,10 +125,6 @@ public class WorldScreen extends CameraStageBaseScreen { } } - private void addNotificationsList() { - stage.addActor(notificationsTable); - } - private void updateNotificationsList() { notificationsTable.clearChildren(); for(String notification : game.civInfo.notifications) @@ -146,15 +138,15 @@ public class WorldScreen extends CameraStageBaseScreen { } public void update(){ - if(game.civInfo.tech.freeTechs!=0) { - game.setScreen(new TechPickerScreen(game, true)); - } updateTechButton(); updateTileTable(); updateTiles(); updateCivTable(); updateNotificationsList(); updateIdleUnitButton(); + if(game.civInfo.tech.freeTechs!=0) { + game.setScreen(new TechPickerScreen(true)); + } } @@ -165,7 +157,7 @@ public class WorldScreen extends CameraStageBaseScreen { OpenCivilopediaButton.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { - game.setScreen(new CivilopediaScreen(game)); + game.setScreen(new CivilopediaScreen()); optionsTable.setVisible(false); } }); @@ -186,12 +178,22 @@ public class WorldScreen extends CameraStageBaseScreen { OpenScienceVictoryScreen.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { - game.setScreen(new ScienceVictoryScreen(game)); + game.setScreen(new ScienceVictoryScreen()); } }); optionsTable.add(OpenScienceVictoryScreen).pad(10); optionsTable.row(); + TextButton OpenPolicyPickerScreen = new TextButton("Social Policies",skin); + OpenPolicyPickerScreen.addListener(new ClickListener(){ + @Override + public void clicked(InputEvent event, float x, float y) { + game.setScreen(new PolicyPickerScreen()); + } + }); + optionsTable.add(OpenPolicyPickerScreen).pad(10); + optionsTable.row(); + TextButton closeButton = new TextButton("Close",skin); closeButton.addListener(new ClickListener(){ @@ -213,7 +215,7 @@ public class WorldScreen extends CameraStageBaseScreen { techButton.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { - game.setScreen(new TechPickerScreen(game)); + game.setScreen(new TechPickerScreen()); } }); @@ -259,7 +261,10 @@ public class WorldScreen extends CameraStageBaseScreen { Label happinessLabel = new Label(happinessText, skin); happinessLabel.setAlignment(Align.center); civTable.add(happinessLabel); - civTable.add(new Label("Culture: " + Math.round(currentStats.culture) + "(+" + Math.round(nextTurnStats.culture) +")", skin)); + String cultureString = "Culture: " + Math.round(currentStats.culture) + "(+" + Math.round(nextTurnStats.culture) +")\r\n" + +"("+ ((int) game.civInfo.civStats.culture)+"/"+game.civInfo.getCultureNeededForNextPolicy()+")"; + + civTable.add(new Label(cultureString, skin)); civTable.pack(); @@ -275,7 +280,7 @@ public class WorldScreen extends CameraStageBaseScreen { public void clicked(InputEvent event, float x, float y) { if (game.civInfo.tech.currentTechnology() == null && game.civInfo.cities.size()!=0) { - game.setScreen(new TechPickerScreen(game)); + game.setScreen(new TechPickerScreen()); return; } game.civInfo.nextTurn(); @@ -459,7 +464,7 @@ public class WorldScreen extends CameraStageBaseScreen { ,new ClickListener() { @Override - public void clicked(InputEvent event, float x, float y) {game.setScreen(new ImprovementPickerScreen(game, selectedTile));} + public void clicked(InputEvent event, float x, float y) {game.setScreen(new ImprovementPickerScreen(selectedTile));} } ); addUnitAction(tileTable, "automation".equals(selectedTile.unit.action)? "Stop automation" : "Automate", true, new ClickListener(){ @@ -480,7 +485,7 @@ public class WorldScreen extends CameraStageBaseScreen { public void clicked(InputEvent event, float x, float y) { game.civInfo.tech.freeTechs+=1; selectedTile.unit=null;// destroy! - game.setScreen(new TechPickerScreen(game,true)); + game.setScreen(new TechPickerScreen(true)); } }); addUnitAction(tileTable, "Construct Academy",true, diff --git a/core/src/com/unciv/game/WorldTileGroup.java b/core/src/com/unciv/game/WorldTileGroup.java index e726aced77..be65addb3f 100644 --- a/core/src/com/unciv/game/WorldTileGroup.java +++ b/core/src/com/unciv/game/WorldTileGroup.java @@ -52,7 +52,7 @@ public class WorldTileGroup extends TileGroup { @Override public void clicked(InputEvent event, float x, float y) { game.civInfo.currentCity = game.civInfo.cities.indexOf(city); - game.setScreen(new CityScreen(game)); + game.setScreen(new CityScreen()); } }); diff --git a/core/src/com/unciv/game/pickerscreens/ConstructionPickerScreen.java b/core/src/com/unciv/game/pickerscreens/ConstructionPickerScreen.java index 1e2155bc15..c7288c1b89 100644 --- a/core/src/com/unciv/game/pickerscreens/ConstructionPickerScreen.java +++ b/core/src/com/unciv/game/pickerscreens/ConstructionPickerScreen.java @@ -32,14 +32,12 @@ public class ConstructionPickerScreen extends PickerScreen { return TB; } - public ConstructionPickerScreen(final UnCivGame game) { - super(game); - + public ConstructionPickerScreen() { closeButton.clearListeners(); // Don't go back to the world screen, unlike the other picker screens! closeButton.addListener(new ClickListener() { @Override public void clicked(InputEvent event, float x, float y) { - game.setScreen(new CityScreen(game)); + game.setScreen(new CityScreen()); dispose(); } }); @@ -50,7 +48,7 @@ public class ConstructionPickerScreen extends PickerScreen { public void clicked(InputEvent event, float x, float y) { game.civInfo.getCurrentCity().cityConstructions.currentConstruction = selectedProduction; game.civInfo.getCurrentCity().updateCityStats(); // Because maybe we set/removed the science or gold production options. - game.setScreen(new CityScreen(game)); + game.setScreen(new CityScreen()); dispose(); } }); diff --git a/core/src/com/unciv/game/pickerscreens/ImprovementPickerScreen.java b/core/src/com/unciv/game/pickerscreens/ImprovementPickerScreen.java index e589d36073..60699f5de4 100644 --- a/core/src/com/unciv/game/pickerscreens/ImprovementPickerScreen.java +++ b/core/src/com/unciv/game/pickerscreens/ImprovementPickerScreen.java @@ -14,8 +14,7 @@ import com.unciv.models.gamebasics.TileImprovement; public class ImprovementPickerScreen extends PickerScreen { private String SelectedImprovement; - public ImprovementPickerScreen(final UnCivGame game, final TileInfo tileInfo) { - super(game); + public ImprovementPickerScreen(final TileInfo tileInfo) { rightSideButton.setText("Pick improvement"); rightSideButton.addListener(new ClickListener(){ diff --git a/core/src/com/unciv/game/pickerscreens/PickerScreen.java b/core/src/com/unciv/game/pickerscreens/PickerScreen.java index 5fd1a7a5af..e3b3085716 100644 --- a/core/src/com/unciv/game/pickerscreens/PickerScreen.java +++ b/core/src/com/unciv/game/pickerscreens/PickerScreen.java @@ -21,9 +21,7 @@ public class PickerScreen extends CameraStageBaseScreen { SplitPane splitPane; - public PickerScreen(final UnCivGame game) { - super(game); - + public PickerScreen() { Table buttonTable = new Table(); closeButton = new TextButton("Close", skin); @@ -58,3 +56,4 @@ public class PickerScreen extends CameraStageBaseScreen { stage.addActor(splitPane); } } + diff --git a/core/src/com/unciv/game/pickerscreens/PolicyPickerScreen.java b/core/src/com/unciv/game/pickerscreens/PolicyPickerScreen.java new file mode 100644 index 0000000000..ded8914f0a --- /dev/null +++ b/core/src/com/unciv/game/pickerscreens/PolicyPickerScreen.java @@ -0,0 +1,134 @@ +package com.unciv.game.pickerscreens; + +import com.badlogic.gdx.Game; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.ui.Button; +import com.badlogic.gdx.scenes.scene2d.ui.Image; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.ui.TextButton; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.utils.Predicate; +import com.unciv.civinfo.CivilizationInfo; +import com.unciv.game.utils.ImageGetter; +import com.unciv.models.gamebasics.GameBasics; +import com.unciv.models.gamebasics.Policy; +import com.unciv.models.gamebasics.PolicyBranch; +import com.unciv.models.gamebasics.StringUtils; + +public class PolicyPickerScreen extends PickerScreen { + + private Policy pickedPolicy; + + public PolicyPickerScreen() { + rightSideButton.setText("Adopt policy\r\n(" + ((int) game.civInfo.civStats.culture) + "/" + game.civInfo.getCultureNeededForNextPolicy() + ")"); + rightSideButton.setColor(Color.GRAY); + rightSideButton.setTouchable(Touchable.disabled); + rightSideButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + game.civInfo.civStats.culture -= game.civInfo.getCultureNeededForNextPolicy(); + game.civInfo.policies.add(pickedPolicy.name); + + PolicyBranch branch = GameBasics.PolicyBranches.get(pickedPolicy.branch); + int policiesCompleteInBranch = branch.policies.count(new Predicate() { + @Override + public boolean evaluate(Policy arg0) { + return game.civInfo.policies.contains(arg0.name); + } + }); + + if (policiesCompleteInBranch == branch.policies.size() - 1) { // All done apart from branch completion + game.civInfo.policies.add(branch.policies.get(branch.policies.size() - 1).name); // add branch completion! + } + if (pickedPolicy.name.equals("Collective Rule")) + CivilizationInfo.current().tileMap. + placeUnitNearTile(CivilizationInfo.current().getCapital().cityLocation, "Settler"); + if (pickedPolicy.name.equals("Citizenship")) + CivilizationInfo.current().tileMap. + placeUnitNearTile(CivilizationInfo.current().getCapital().cityLocation, "Worker"); + if (pickedPolicy.name.equals("Representation") || pickedPolicy.name.equals("Reformation")) + CivilizationInfo.current().enterGoldenAge(); + + if (pickedPolicy.name.equals("Scientific Revolution")) + CivilizationInfo.current().tech.freeTechs+=2; + game.setScreen(new PolicyPickerScreen()); + } + }); + + + topTable.row().pad(30); + + for (PolicyBranch branch : GameBasics.PolicyBranches.values()) { + if (branch.name.equals("Commerce")) topTable.row(); + Table branchGroup = new Table(); + branchGroup.row().pad(20); + branchGroup.add(getPolicyButton(branch, false)).row(); + + int currentRow = 1; + int currentColumn = 1; + Table branchTable = new Table(); + for (Policy policy : branch.policies) { + if (policy.name.endsWith("Complete")) continue; + if (policy.row > currentRow) { + branchTable.row(); + currentRow++; + currentColumn = 1; + } + if (policy.column > currentColumn) { + branchTable.add().colspan(policy.column - currentColumn); // empty space + } + branchTable.add(getPolicyButton(policy, true)).colspan(2); + currentColumn = policy.column + 2; + } + branchTable.pack(); + branchGroup.add(branchTable).height(150).row(); + + branchGroup.add(getPolicyButton(branch.policies.get(branch.policies.size() - 1), false)); // finisher + + topTable.add(branchGroup); + } + topTable.pack(); + } + + public void pickPolicy(Policy policy) { + if (game.civInfo.policies.contains(policy.name) || !game.civInfo.policies.containsAll(policy.requires) + || !game.civInfo.canAdoptPolicy()) { + rightSideButton.setTouchable(Touchable.disabled); + rightSideButton.setColor(Color.GRAY); + } else { + rightSideButton.setColor(Color.WHITE); + rightSideButton.setTouchable(Touchable.enabled); + } + pickedPolicy = policy; + String policyText = policy.name + "\r\n" + policy.description + "\r\n"; + if (!policy.name.endsWith("Complete") && policy.requires.size() > 0) + policyText += "Requires " + StringUtils.join(", ", policy.requires); + descriptionLabel.setText(policyText); + } + + public Button getPolicyButton(final Policy policy, boolean image) { + Button toReturn = new Button(skin); + if (image) { + Image policyImage = ImageGetter.getImage("PolicyIcons/" + policy.name.replace(" ", "_") + "_(Civ5).png"); + toReturn.add(policyImage).size(30); + } else toReturn = new TextButton(policy.name, skin); + + if (game.civInfo.policies.contains(policy.name)) { // existing + toReturn.setColor(Color.GREEN); + } else if (!game.civInfo.policies.containsAll(policy.requires)) // non-available + { + toReturn.setColor(Color.GRAY); + } + toReturn.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + pickPolicy(policy); + } + }); + toReturn.pack(); + return toReturn; + } + +} \ No newline at end of file diff --git a/core/src/com/unciv/game/pickerscreens/TechPickerScreen.java b/core/src/com/unciv/game/pickerscreens/TechPickerScreen.java index 260cf55492..2a59e13af8 100644 --- a/core/src/com/unciv/game/pickerscreens/TechPickerScreen.java +++ b/core/src/com/unciv/game/pickerscreens/TechPickerScreen.java @@ -23,14 +23,12 @@ public class TechPickerScreen extends PickerScreen { CivilizationTech civTech = game.civInfo.tech; ArrayList techsToResearch = new ArrayList(civTech.techsToResearch); - public TechPickerScreen(final UnCivGame game, boolean freeTechPick){ - this(game); - isFreeTechPick=true; + public TechPickerScreen(boolean freeTechPick){ + this(); + isFreeTechPick=freeTechPick; } - public TechPickerScreen(final UnCivGame game) { - super(game); - + public TechPickerScreen() { Technology[][] techMatrix = new Technology[17][10]; // Divided into columns, then rows for (Technology technology : GameBasics.Technologies.linqValues()) { @@ -83,11 +81,11 @@ public class TechPickerScreen extends PickerScreen { public void setButtonsInfo() { for (String techName : techNameToButton.keySet()) { TextButton TB = techNameToButton.get(techName); - TB.getStyle().checkedFontColor = Color.BLACK; + //TB.getStyle().checkedFontColor = Color.BLACK; if (civTech.isResearched(techName)) TB.setColor(Color.GREEN); - else if (techsToResearch.contains(techName)) TB.setColor(Color.BLUE); + else if (techsToResearch.contains(techName)) TB.setColor(Color.BLUE.cpy().lerp(Color.WHITE,0.3f)); else if (civTech.canBeResearched(techName)) TB.setColor(Color.WHITE); - else TB.setColor(Color.GRAY); + else TB.setColor(Color.BLACK); TB.setChecked(false); StringBuilder text = new StringBuilder(techName); @@ -95,7 +93,7 @@ public class TechPickerScreen extends PickerScreen { if (selectedTech != null) { if (techName.equals(selectedTech.name)) { TB.setChecked(true); - TB.setColor(TB.getColor().lerp(Color.LIGHT_GRAY, 0.5f)); + TB.setColor(TB.getColor().cpy().lerp(Color.LIGHT_GRAY, 0.5f)); } } if (techsToResearch.contains(techName) && techsToResearch.size()>1) { diff --git a/core/src/com/unciv/game/utils/CameraStageBaseScreen.java b/core/src/com/unciv/game/utils/CameraStageBaseScreen.java index 63e7aaf461..86d295c7d8 100644 --- a/core/src/com/unciv/game/utils/CameraStageBaseScreen.java +++ b/core/src/com/unciv/game/utils/CameraStageBaseScreen.java @@ -24,9 +24,8 @@ public class CameraStageBaseScreen implements Screen { public Skin skin = new Skin(Gdx.files.internal("skin/flat-earth-ui.json")); static Batch batch = new SpriteBatch(); - - public CameraStageBaseScreen(UnCivGame game) { - this.game = game; + public CameraStageBaseScreen() { + this.game = UnCivGame.Current; stage = new Stage(new ExtendViewport(1000,600 ),batch);// FitViewport(1000,600) Gdx.input.setInputProcessor(stage); diff --git a/core/src/com/unciv/game/utils/ImageGetter.java b/core/src/com/unciv/game/utils/ImageGetter.java index ffbebdd7ea..87fcf5fa61 100644 --- a/core/src/com/unciv/game/utils/ImageGetter.java +++ b/core/src/com/unciv/game/utils/ImageGetter.java @@ -27,8 +27,12 @@ public class ImageGetter { } private static TextureRegion getTextureRegion(String fileName) { - if (!textureRegionByFileName.containsKey(fileName)) - textureRegionByFileName.put(fileName, new TextureRegion(new Texture(Gdx.files.internal(fileName)))); + try { + if (!textureRegionByFileName.containsKey(fileName)) + textureRegionByFileName.put(fileName, new TextureRegion(new Texture(Gdx.files.internal(fileName)))); + }catch (Exception ex){ + System.out.print("File "+fileName+" not found!"); + } return textureRegionByFileName.get(fileName); } diff --git a/core/src/com/unciv/models/LinqCollection.java b/core/src/com/unciv/models/LinqCollection.java index 478237ee98..aea35cfe76 100644 --- a/core/src/com/unciv/models/LinqCollection.java +++ b/core/src/com/unciv/models/LinqCollection.java @@ -3,6 +3,7 @@ package com.unciv.models; import com.badlogic.gdx.utils.Predicate; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -15,9 +16,15 @@ public class LinqCollection extends ArrayList { } public LinqCollection(Collection objects) { - this.addAll(objects); + addAll(objects); } + public LinqCollection(T ... objects) { + addAll(Arrays.asList(objects)); + } + + + public LinqCollection where(Predicate p) { LinqCollection newCollection = new LinqCollection(); diff --git a/core/src/com/unciv/models/gamebasics/Building.java b/core/src/com/unciv/models/gamebasics/Building.java index 12b554e7ce..d79b35c0ad 100644 --- a/core/src/com/unciv/models/gamebasics/Building.java +++ b/core/src/com/unciv/models/gamebasics/Building.java @@ -12,6 +12,8 @@ import com.unciv.models.LinqCollection; import com.unciv.models.stats.FullStats; import com.unciv.models.stats.NamedStats; +import java.util.ArrayList; + public class Building extends NamedStats implements IConstruction, ICivilopedia { public String description; public String requiredTech; @@ -44,12 +46,46 @@ public class Building extends NamedStats implements IConstruction, ICivilopedia */ public FullStats resourceBonusStats; + public FullStats getStats(){ + FullStats stats = new FullStats(this); + LinqCollection policies = CivilizationInfo.current().policies; + if (policies.contains("Organized Religion") && + new LinqCollection("Monument","Temple","Monastery").contains(name)) + stats.happiness+=1; + + if (policies.contains("Free Religion") && + new LinqCollection("Monument","Temple","Monastery").contains(name)) + stats.culture+=1; + + if (policies.contains("Entrepreneurship") && + new LinqCollection("Mint","Market","Bank","Stock Market").contains(name)) + stats.science+=1; + + if (policies.contains("Humanism") && + new LinqCollection("University","Observatory","Public School").contains(name)) + stats.science+=1; + + if (policies.contains("Theocracy") && name.equals("Temple")) + percentStatBonus = new FullStats(){{gold=10;}}; + + if (policies.contains("Free Thought") && name.equals("University")) + percentStatBonus.science+=17; + + if (policies.contains("Rationalism Complete") && !isWonder && stats.science>0) + stats.gold+=1; + + if (policies.contains("Constitution") && isWonder) + stats.culture+=2; + + return stats; + } + public String getDescription() { return getDescription(false); } public String getDescription(boolean forBuildingPickerScreen) { - FullStats stats = new FullStats(this); + FullStats stats = getStats(); StringBuilder stringBuilder = new StringBuilder(); if (!forBuildingPickerScreen) stringBuilder.append("Cost: " + cost + "\r\n"); if (isWonder) stringBuilder.append("Wonder\r\n"); @@ -72,14 +108,14 @@ public class Building extends NamedStats implements IConstruction, ICivilopedia if(this.percentStatBonus.culture!=0) stringBuilder.append("+"+(int)this.percentStatBonus.culture+"% culture\r\n"); } if(resourceBonusStats!=null){ - String resources = String.join(",",GameBasics.TileResources.linqValues().where(new Predicate() { + String resources = StringUtils.join(",",GameBasics.TileResources.linqValues().where(new Predicate() { @Override public boolean evaluate(TileResource arg0) { return name.equals(arg0.building); } - }).select(new LinqCollection.Func() { + }).select(new LinqCollection.Func() { @Override - public CharSequence GetBy(TileResource arg0) { + public String GetBy(TileResource arg0) { return arg0.name; } })) ; @@ -92,11 +128,16 @@ public class Building extends NamedStats implements IConstruction, ICivilopedia @Override public int getProductionCost() { + if(!isWonder && culture!=0 && CivilizationInfo.current().policies.contains("Piety")) + return (int) (cost*0.85); return cost; } public int getGoldCost(){ - return (int)( Math.pow(30 * cost,0.75) * (1 + hurryCostModifier/100) / 10 ) * 10; + double cost = Math.pow(30 * getProductionCost(),0.75) * (1 + hurryCostModifier/100); + if(CivilizationInfo.current().policies.contains("Mercantilism")) cost*=0.75; + if(CivilizationInfo.current().policies.contains("Patronage")) cost*=0.5; + return (int)( cost / 10 ) * 10; } public boolean isBuildable(CityConstructions construction){ @@ -158,7 +199,7 @@ public class Building extends NamedStats implements IConstruction, ICivilopedia if("SpaceshipPart".equals(unique)) { CivilizationInfo.current().scienceVictory.currentParts.add(name, 1); if(CivilizationInfo.current().scienceVictory.unconstructedParts().isEmpty()) - UnCivGame.Current.setScreen(new VictoryScreen(UnCivGame.Current)); + UnCivGame.Current.setScreen(new VictoryScreen()); return; } constructions.builtBuildings.add(name); diff --git a/core/src/com/unciv/models/gamebasics/GameBasics.java b/core/src/com/unciv/models/gamebasics/GameBasics.java index 2f02a285d3..36e40921c2 100644 --- a/core/src/com/unciv/models/gamebasics/GameBasics.java +++ b/core/src/com/unciv/models/gamebasics/GameBasics.java @@ -13,4 +13,5 @@ public class GameBasics{ public static LinqHashMap Technologies; public static LinqHashMap Helps; public static LinkedHashMap Units; + public static LinkedHashMap PolicyBranches; } \ No newline at end of file diff --git a/core/src/com/unciv/models/gamebasics/Policy.java b/core/src/com/unciv/models/gamebasics/Policy.java new file mode 100644 index 0000000000..33cc620502 --- /dev/null +++ b/core/src/com/unciv/models/gamebasics/Policy.java @@ -0,0 +1,23 @@ +package com.unciv.models.gamebasics; + +import com.unciv.models.LinqCollection; +import com.unciv.models.stats.INamed; + +/** + * Created by LENOVO on 12/22/2017. + */ + +public class Policy implements INamed{ + public String name; + public String description; + public String branch; + public int row; + public int column; + public LinqCollection requires; + + @Override + public String getName() { + return name; + } +} + diff --git a/core/src/com/unciv/models/gamebasics/PolicyBranch.java b/core/src/com/unciv/models/gamebasics/PolicyBranch.java new file mode 100644 index 0000000000..3e82f994ec --- /dev/null +++ b/core/src/com/unciv/models/gamebasics/PolicyBranch.java @@ -0,0 +1,8 @@ +package com.unciv.models.gamebasics; + +import com.unciv.models.LinqCollection; +import com.unciv.models.stats.INamed; + +public class PolicyBranch extends Policy{ + public LinqCollection policies; +} diff --git a/core/src/com/unciv/models/gamebasics/TileImprovement.java b/core/src/com/unciv/models/gamebasics/TileImprovement.java index b180207b70..e934a77b73 100644 --- a/core/src/com/unciv/models/gamebasics/TileImprovement.java +++ b/core/src/com/unciv/models/gamebasics/TileImprovement.java @@ -17,9 +17,12 @@ public class TileImprovement extends NamedStats implements ICivilopedia { private int turnsToBuild; // This is the base cost. public int getTurnsToBuild(){ - int realTurnsToBuild = turnsToBuild; - if(CivilizationInfo.current().getBuildingUniques().contains("WorkerConstruction")) realTurnsToBuild = (int) Math.round(0.75*turnsToBuild); - return realTurnsToBuild; + float realTurnsToBuild = turnsToBuild; + if(CivilizationInfo.current().getBuildingUniques().contains("WorkerConstruction")) + realTurnsToBuild*=0.75; + if(CivilizationInfo.current().policies.contains("Citizenship")) + realTurnsToBuild*=0.75; + return Math.round(realTurnsToBuild); } @Override diff --git a/core/src/com/unciv/models/stats/FullStats.java b/core/src/com/unciv/models/stats/FullStats.java index 455c0483c0..bd37b63397 100644 --- a/core/src/com/unciv/models/stats/FullStats.java +++ b/core/src/com/unciv/models/stats/FullStats.java @@ -1,7 +1,5 @@ package com.unciv.models.stats; -import java.text.DecimalFormat; - public class FullStats extends CivStats // also used for hex stats, since it's basically the same { public float production = 0; @@ -34,6 +32,17 @@ public class FullStats extends CivStats // also used for hex stats, since it's b return sub; } + public FullStats multiply(float number){ + FullStats mul = new FullStats(); + mul.gold=gold*number; + mul.science=science*number; + mul.happiness=happiness*number; + mul.culture=culture*number; + mul.food=food*number; + mul.production=production*number; + return mul; + } + public String display(float value, String name){ return ", " + (value>0 ? "+" : "") + Math.round(value) + " "+name; }