mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-18 11:49:19 +07:00
Can now use [stats]
unique for e.g. techs, policies, etc, to add gold/faith/culture/science to the global pool
This commit is contained in:
@ -27,7 +27,7 @@ class GlobalUniquesTests {
|
||||
// region base stat bonus providing uniques
|
||||
|
||||
@Test
|
||||
fun stats() {
|
||||
fun statsOnBuilding() {
|
||||
val civInfo = game.addCiv()
|
||||
val tile = game.setTileFeatures(Vector2(0f,0f), Constants.desert)
|
||||
val cityInfo = game.addCity(civInfo, tile, true)
|
||||
@ -38,6 +38,15 @@ class GlobalUniquesTests {
|
||||
Assert.assertTrue(cityInfo.cityStats.finalStatList["Buildings"]!!.equals(Stats(food=1f)))
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun statsNotOnBuilding() {
|
||||
val civInfo = game.addCiv("[+2 Gold]")
|
||||
civInfo.updateStatsForNextTurn()
|
||||
Assert.assertTrue(civInfo.statsForNextTurn.equals(Stats(gold=2f)))
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun statsPerCity() {
|
||||
val civInfo = game.addCiv()
|
||||
|
Reference in New Issue
Block a user