mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-03 13:30:51 +07:00
minor docs and city resource conditional test
This commit is contained in:
parent
a45c057b48
commit
bed8d3b176
@ -502,7 +502,8 @@ enum class UniqueType(
|
|||||||
// Hurried means: sped up using great engineer/scientist ability, so this is in some sense a unit unique that should be here
|
// Hurried means: sped up using great engineer/scientist ability, so this is in some sense a unit unique that should be here
|
||||||
CannotBeHurried("Cannot be hurried", UniqueTarget.Building, UniqueTarget.Tech),
|
CannotBeHurried("Cannot be hurried", UniqueTarget.Building, UniqueTarget.Tech),
|
||||||
GreatPerson("Great Person - [comment]", UniqueTarget.Unit),
|
GreatPerson("Great Person - [comment]", UniqueTarget.Unit),
|
||||||
GPPointPool("Is part of Great Person group [comment]", UniqueTarget.Unit),
|
GPPointPool("Is part of Great Person group [comment]", UniqueTarget.Unit,
|
||||||
|
docDescription = "Great people in the same group increase teach other's costs when gained. Gaining one will make all others in the same group cost more GPP."),
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
@ -253,4 +253,21 @@ class ResourceTests {
|
|||||||
assertEquals(1, resourceAmountInCapital)
|
assertEquals(1, resourceAmountInCapital)
|
||||||
assertEquals(1, resourceAmountInOtherCity)
|
assertEquals(1, resourceAmountInOtherCity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun CityResourcesWorkWithConditional() {
|
||||||
|
// given
|
||||||
|
val resource = game.createResource(UniqueType.CityResource.text)
|
||||||
|
val resourceAndConditionalBuilding = game.createBuilding("Provides [2] [${resource.name}]",
|
||||||
|
"[+1 Faith] <when above [1] [${resource.name}]>")
|
||||||
|
|
||||||
|
// when
|
||||||
|
city.cityConstructions.addBuilding(resourceAndConditionalBuilding)
|
||||||
|
val faith = city.cityStats.currentCityStats.faith
|
||||||
|
|
||||||
|
// then
|
||||||
|
assertEquals(1f, faith)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user