Added Air unit types

This commit is contained in:
Yair Morgenstern 2019-07-03 18:42:28 +03:00
parent 1201d9b54b
commit 833a5ed0db
3 changed files with 18 additions and 3 deletions

View File

@ -21,7 +21,7 @@ android {
applicationId "com.unciv.app"
minSdkVersion 14
targetSdkVersion 28
versionCode 267
versionCode 268
versionName "2.17.13"
}

View File

@ -70,6 +70,9 @@ class PopulationManager {
}
}
// todo - change tile choice according to city!
// if small city, favor production above all, ignore gold!
// if larger city, food should be worth less!
internal fun autoAssignPopulation() {
if(getFreePopulation()==0) return

View File

@ -9,10 +9,14 @@ enum class UnitType{
Mounted,
Armor,
Siege,
WaterCivilian,
WaterMelee,
WaterRanged,
WaterSubmarine;
WaterSubmarine,
AirFighter,
AirBomber;
fun isMelee(): Boolean {
return this == Melee
@ -45,6 +49,14 @@ enum class UnitType{
}
fun isWaterUnit(): Boolean {
return !isLandUnit() // if we ever get air units, this'll have to change
return this==WaterSubmarine
|| this==WaterRanged
|| this==WaterMelee
|| this==WaterCivilian
}
fun isAirUnit():Boolean{
return this==AirBomber
|| this==AirFighter
}
}