mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Added Air unit types
This commit is contained in:
parent
1201d9b54b
commit
833a5ed0db
@ -21,7 +21,7 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 267
|
versionCode 268
|
||||||
versionName "2.17.13"
|
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() {
|
internal fun autoAssignPopulation() {
|
||||||
if(getFreePopulation()==0) return
|
if(getFreePopulation()==0) return
|
||||||
|
|
||||||
|
@ -9,10 +9,14 @@ enum class UnitType{
|
|||||||
Mounted,
|
Mounted,
|
||||||
Armor,
|
Armor,
|
||||||
Siege,
|
Siege,
|
||||||
|
|
||||||
WaterCivilian,
|
WaterCivilian,
|
||||||
WaterMelee,
|
WaterMelee,
|
||||||
WaterRanged,
|
WaterRanged,
|
||||||
WaterSubmarine;
|
WaterSubmarine,
|
||||||
|
|
||||||
|
AirFighter,
|
||||||
|
AirBomber;
|
||||||
|
|
||||||
fun isMelee(): Boolean {
|
fun isMelee(): Boolean {
|
||||||
return this == Melee
|
return this == Melee
|
||||||
@ -45,6 +49,14 @@ enum class UnitType{
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun isWaterUnit(): Boolean {
|
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