mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Added Air unit types
This commit is contained in:
parent
1201d9b54b
commit
833a5ed0db
@ -21,7 +21,7 @@ android {
|
||||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 267
|
||||
versionCode 268
|
||||
versionName "2.17.13"
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user