mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Added Barracks and Armory buildings to increase XP of units built in the city
This commit is contained in:
parent
a56e7e43aa
commit
fe31e4121a
@ -56,7 +56,6 @@
|
||||
},
|
||||
{
|
||||
name:"Library",
|
||||
baseDescription: "Adds 1 science for each 2 population in the city.",
|
||||
hurryCostModifier:25,
|
||||
maintenance:1,
|
||||
unique:"+1 Science Per 2 Population",
|
||||
@ -85,6 +84,13 @@
|
||||
unique:"Worker construction increased 25%, provides 2 free workers",
|
||||
requiredTech:"Mathematics"
|
||||
},
|
||||
{
|
||||
name:"Barracks",
|
||||
xpForNewUnits:15,
|
||||
hurryCostModifier:25,
|
||||
maintenance:1,
|
||||
requiredTech:"Bronze Working"
|
||||
},
|
||||
{
|
||||
name:"Temple",
|
||||
culture:3,
|
||||
@ -282,6 +288,14 @@
|
||||
requiredBuildingInAllCities:"Workshop",
|
||||
requiredTech:"Machinery"
|
||||
},
|
||||
{
|
||||
name:"Armory",
|
||||
xpForNewUnits:15,
|
||||
hurryCostModifier:25,
|
||||
maintenance:1,
|
||||
requiredBuilding:"Barracks",
|
||||
requiredTech:"Steel"
|
||||
},
|
||||
{
|
||||
name:"Observatory",
|
||||
baseDescription: "City must be bordering a mountain",
|
||||
|
@ -397,6 +397,9 @@
|
||||
German:"Zeigt [resource] auf der Karte"
|
||||
}
|
||||
|
||||
"XP for new units":{
|
||||
}
|
||||
|
||||
"provide":{ // as in "Camp, Customs House provide +1 Gold"
|
||||
German:"generieren"
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ class Building : NamedStats(), IConstruction{
|
||||
var cannotBeBuiltWith: String? = null
|
||||
var cityStrength=0
|
||||
var cityHealth=0
|
||||
var xpForNewUnits=0
|
||||
|
||||
// Uniques
|
||||
var providesFreeBuilding: String? = null
|
||||
@ -56,6 +57,7 @@ class Building : NamedStats(), IConstruction{
|
||||
if(unique!=null) infoList += unique!!.tr()
|
||||
if(cityStrength!=0) infoList+="{City strength} +".tr()+cityStrength
|
||||
if(cityHealth!=0) infoList+="{City health} +".tr()+cityHealth
|
||||
if(xpForNewUnits!=0) infoList+= "+$xpForNewUnits {XP for new units}".tr()
|
||||
return infoList.joinToString()
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,8 @@ class Unit : INamed, IConstruction, ICivilopedia {
|
||||
}
|
||||
|
||||
override fun postBuildEvent(construction: CityConstructions) {
|
||||
construction.cityInfo.civInfo.placeUnitNearTile(construction.cityInfo.location, name)
|
||||
val unit = construction.cityInfo.civInfo.placeUnitNearTile(construction.cityInfo.location, name)
|
||||
unit.promotions.XP += construction.getBuiltBuildings().sumBy { it.xpForNewUnits }
|
||||
}
|
||||
|
||||
override fun toString(): String = name
|
||||
|
Loading…
Reference in New Issue
Block a user