mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Added Optics and Lighthouse
This commit is contained in:
parent
ae33818750
commit
dea7775be5
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
|
// Classical Era
|
||||||
|
|
||||||
|
{
|
||||||
|
name:"Lighthouse",
|
||||||
|
hurryCostModifier:25,
|
||||||
|
maintenance:1,
|
||||||
|
resourceBonusStats:{food:1},
|
||||||
|
uniques:["+1 food from Ocean and Coast tiles"]
|
||||||
|
requiredTech:"Optics"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name:"Stable",
|
name:"Stable",
|
||||||
maintenance:1,
|
maintenance:1,
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
name:"Sailing",
|
name:"Sailing",
|
||||||
row:1,
|
row:1,
|
||||||
prerequisites:["Pottery"],
|
prerequisites:["Pottery"],
|
||||||
baseDescription:"Does nothing since we have no sea tiles - In theory, Allows access to sea resources by building work boats"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Calendar",
|
name:"Calendar",
|
||||||
@ -89,13 +88,11 @@
|
|||||||
buildingCost:100,
|
buildingCost:100,
|
||||||
wonderCost:250,
|
wonderCost:250,
|
||||||
techs:[
|
techs:[
|
||||||
/*{
|
{
|
||||||
name:"Optics",
|
name:"Optics",
|
||||||
cost:95,
|
|
||||||
row:1,
|
row:1,
|
||||||
prerequisites:["Sailing"],
|
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",
|
name:"Horseback Riding",
|
||||||
row:5,
|
row:5,
|
||||||
|
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.game"
|
applicationId "com.unciv.game"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 146
|
versionCode 147
|
||||||
versionName "2.9.0.1"
|
versionName "2.9.1"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
@ -146,6 +146,10 @@ class MapUnit {
|
|||||||
return range
|
return range
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isEmbarked(): Boolean {
|
||||||
|
return currentTile.baseTerrain=="Ocean"||currentTile.baseTerrain=="Coast"
|
||||||
|
}
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region state-changing functions
|
//region state-changing functions
|
||||||
|
@ -111,6 +111,10 @@ open class TileInfo {
|
|||||||
fun getTileStats(city: CityInfo?, observingCiv: CivilizationInfo): Stats {
|
fun getTileStats(city: CityInfo?, observingCiv: CivilizationInfo): Stats {
|
||||||
var stats = getBaseTerrain().clone()
|
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) {
|
if (terrainFeature != null) {
|
||||||
val terrainFeatureBase = getTerrainFeature()
|
val terrainFeatureBase = getTerrainFeature()
|
||||||
if (terrainFeatureBase!!.overrideStats)
|
if (terrainFeatureBase!!.overrideStats)
|
||||||
@ -118,6 +122,9 @@ open class TileInfo {
|
|||||||
else
|
else
|
||||||
stats.add(terrainFeatureBase)
|
stats.add(terrainFeatureBase)
|
||||||
|
|
||||||
|
if (terrainFeature == "Jungle" && city != null
|
||||||
|
&& city.getBuildingUniques().contains("Jungles provide +2 science"))
|
||||||
|
stats.science += 2f
|
||||||
if(terrainFeature=="Oasis" && city!=null
|
if(terrainFeature=="Oasis" && city!=null
|
||||||
&& city.getBuildingUniques().contains("+2 Gold for each source of Oil and oasis"))
|
&& city.getBuildingUniques().contains("+2 Gold for each source of Oil and oasis"))
|
||||||
stats.gold += 2
|
stats.gold += 2
|
||||||
@ -156,14 +163,11 @@ open class TileInfo {
|
|||||||
if (stats.production < 1) stats.production = 1f
|
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())
|
if (stats.gold != 0f && observingCiv.goldenAges.isGoldenAge())
|
||||||
stats.gold++
|
stats.gold++
|
||||||
|
|
||||||
|
if (stats.production < 0) stats.production = 0f
|
||||||
|
|
||||||
return stats
|
return stats
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ enum class UnitType{
|
|||||||
return this == Melee
|
return this == Melee
|
||||||
|| this == Mounted
|
|| this == Mounted
|
||||||
|| this == Scout
|
|| this == Scout
|
||||||
|
|| this==WaterMelee
|
||||||
}
|
}
|
||||||
fun isRanged(): Boolean {
|
fun isRanged(): Boolean {
|
||||||
return this == Ranged
|
return this == Ranged
|
||||||
|
Loading…
x
Reference in New Issue
Block a user