mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
Added Optics and Lighthouse
This commit is contained in:
BIN
android/Images/BuildingIcons/Lighthouse.png
Normal file
BIN
android/Images/BuildingIcons/Lighthouse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
android/Images/OtherIcons/Pentagon.png
Normal file
BIN
android/Images/OtherIcons/Pentagon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
android/Images/TechIcons/Optics.png
Normal file
BIN
android/Images/TechIcons/Optics.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 897 KiB After Width: | Height: | Size: 901 KiB |
@ -103,6 +103,14 @@
|
||||
|
||||
// Classical Era
|
||||
|
||||
{
|
||||
name:"Lighthouse",
|
||||
hurryCostModifier:25,
|
||||
maintenance:1,
|
||||
resourceBonusStats:{food:1},
|
||||
uniques:["+1 food from Ocean and Coast tiles"]
|
||||
requiredTech:"Optics"
|
||||
},
|
||||
{
|
||||
name:"Stable",
|
||||
maintenance:1,
|
||||
|
@ -48,7 +48,6 @@
|
||||
name:"Sailing",
|
||||
row:1,
|
||||
prerequisites:["Pottery"],
|
||||
baseDescription:"Does nothing since we have no sea tiles - In theory, Allows access to sea resources by building work boats"
|
||||
},
|
||||
{
|
||||
name:"Calendar",
|
||||
@ -89,13 +88,11 @@
|
||||
buildingCost:100,
|
||||
wonderCost:250,
|
||||
techs:[
|
||||
/*{
|
||||
{
|
||||
name:"Optics",
|
||||
cost:95,
|
||||
row:1,
|
||||
prerequisites:["Sailing"],
|
||||
baseDescription:"Does nothing since we have no sea tiles - In theory, Allows construction of lighthouses, providing more food for sea tiles"
|
||||
},*/
|
||||
},
|
||||
{
|
||||
name:"Horseback Riding",
|
||||
row:5,
|
||||
|
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.game"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 146
|
||||
versionName "2.9.0.1"
|
||||
versionCode 147
|
||||
versionName "2.9.1"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -146,6 +146,10 @@ class MapUnit {
|
||||
return range
|
||||
}
|
||||
|
||||
fun isEmbarked(): Boolean {
|
||||
return currentTile.baseTerrain=="Ocean"||currentTile.baseTerrain=="Coast"
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region state-changing functions
|
||||
|
@ -111,6 +111,10 @@ open class TileInfo {
|
||||
fun getTileStats(city: CityInfo?, observingCiv: CivilizationInfo): Stats {
|
||||
var stats = getBaseTerrain().clone()
|
||||
|
||||
if((baseTerrain=="Ocean"||baseTerrain=="Coast") && city!=null
|
||||
&& city.getBuildingUniques().contains("+1 food from Ocean and Coast tiles"))
|
||||
stats.food += 1
|
||||
|
||||
if (terrainFeature != null) {
|
||||
val terrainFeatureBase = getTerrainFeature()
|
||||
if (terrainFeatureBase!!.overrideStats)
|
||||
@ -118,6 +122,9 @@ open class TileInfo {
|
||||
else
|
||||
stats.add(terrainFeatureBase)
|
||||
|
||||
if (terrainFeature == "Jungle" && city != null
|
||||
&& city.getBuildingUniques().contains("Jungles provide +2 science"))
|
||||
stats.science += 2f
|
||||
if(terrainFeature=="Oasis" && city!=null
|
||||
&& city.getBuildingUniques().contains("+2 Gold for each source of Oil and oasis"))
|
||||
stats.gold += 2
|
||||
@ -156,14 +163,11 @@ open class TileInfo {
|
||||
if (stats.production < 1) stats.production = 1f
|
||||
}
|
||||
|
||||
if (stats.production < 0) stats.production = 0f
|
||||
|
||||
if ("Jungle" == terrainFeature && city != null
|
||||
&& city.getBuildingUniques().contains("Jungles provide +2 science"))
|
||||
stats.science += 2f
|
||||
if (stats.gold != 0f && observingCiv.goldenAges.isGoldenAge())
|
||||
stats.gold++
|
||||
|
||||
if (stats.production < 0) stats.production = 0f
|
||||
|
||||
return stats
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ enum class UnitType{
|
||||
return this == Melee
|
||||
|| this == Mounted
|
||||
|| this == Scout
|
||||
|| this==WaterMelee
|
||||
}
|
||||
fun isRanged(): Boolean {
|
||||
return this == Ranged
|
||||
|
Reference in New Issue
Block a user