mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-13 19:39:34 +07:00
Unit 'unbuildable' parameter converted to unique
This commit is contained in:
parent
22e5f30b64
commit
aa2f9726ac
@ -1289,46 +1289,42 @@
|
||||
|
||||
{
|
||||
"name": "Great Artist",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniques": ["Can start an 8-turn golden age","Can build improvement: Landmark"],
|
||||
"uniques": ["Can start an 8-turn golden age","Can build improvement: Landmark", "Unbuildable"],
|
||||
"movement": 2
|
||||
},
|
||||
{
|
||||
"name": "Great Scientist",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniques": ["Can hurry technology research","Can build improvement: Academy"],
|
||||
"uniques": ["Can hurry technology research","Can build improvement: Academy", "Unbuildable"],
|
||||
"movement": 2
|
||||
},
|
||||
{
|
||||
"name": "Great Merchant",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniques": ["Can undertake a trade mission with City-State, giving a large sum of gold and [30] Influence","Can build improvement: Customs house"],
|
||||
"uniques": ["Can undertake a trade mission with City-State, giving a large sum of gold and [30] Influence",
|
||||
"Can build improvement: Customs house", "Unbuildable"],
|
||||
"movement": 2
|
||||
},
|
||||
{
|
||||
"name": "Great Engineer",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniques": ["Can speed up construction of a wonder","Can build improvement: Manufactory"],
|
||||
"uniques": ["Can speed up construction of a wonder","Can build improvement: Manufactory", "Unbuildable"],
|
||||
"movement": 2
|
||||
},
|
||||
{
|
||||
"name": "Great General",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%", "Can build improvement: Citadel"],
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%", "Can build improvement: Citadel", "Unbuildable"],
|
||||
"movement": 2
|
||||
},
|
||||
{
|
||||
"name": "Khan",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniqueTo": "Mongolia",
|
||||
"replaces": "Great General",
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%", "Heal adjacent units for an additional 15 HP per turn", "Can build improvement: Citadel"],
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%", "Unbuildable",
|
||||
"Heal adjacent units for an additional 15 HP per turn", "Can build improvement: Citadel"],
|
||||
"movement": 5
|
||||
}
|
||||
]
|
||||
|
@ -25,7 +25,6 @@ class BaseUnit : INamed, IConstruction {
|
||||
var range:Int = 2
|
||||
var interceptRange = 0
|
||||
lateinit var unitType: UnitType
|
||||
internal var unbuildable: Boolean = false // for special units like great people
|
||||
var requiredTech:String? = null
|
||||
var requiredResource:String? = null
|
||||
var uniques =HashSet<String>()
|
||||
@ -54,7 +53,6 @@ class BaseUnit : INamed, IConstruction {
|
||||
if(requiredResource!=null) sb.appendln("{Requires} {$requiredResource}".tr())
|
||||
if(!forPickerScreen) {
|
||||
if(uniqueTo!=null) sb.appendln("Unique to [$uniqueTo], replaces [$replaces]".tr())
|
||||
if (unbuildable) sb.appendln("Unbuildable".tr())
|
||||
else sb.appendln("{Cost}: $cost".tr())
|
||||
if(requiredTech!=null) sb.appendln("Required tech: [$requiredTech]".tr())
|
||||
if(upgradesTo!=null) sb.appendln("Upgrades to [$upgradesTo]".tr())
|
||||
@ -130,7 +128,7 @@ class BaseUnit : INamed, IConstruction {
|
||||
}
|
||||
|
||||
fun getRejectionReason(civInfo: CivilizationInfo): String {
|
||||
if (unbuildable) return "Unbuildable"
|
||||
if (uniques.contains("Unbuildable")) return "Unbuildable"
|
||||
if (requiredTech!=null && !civInfo.tech.isResearched(requiredTech!!)) return "$requiredTech not researched"
|
||||
if (obsoleteTech!=null && civInfo.tech.isResearched(obsoleteTech!!)) return "Obsolete by $obsoleteTech"
|
||||
if (uniqueTo!=null && uniqueTo!=civInfo.civName) return "Unique to $uniqueTo"
|
||||
|
Loading…
Reference in New Issue
Block a user