mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
From the indstrial era onwards, things change in religion (#5095)
* Improved redability * From the industrial era onwards, religion goes into 'second phase' * Fixed tests * Fixed formula for buying great prophets starting from the industrial era * Added `getMatchingUniques`, `hasUnique` to `IHasUniques`, cleaned up some code * Fix compilation errors
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
package com.unciv.logic.map
|
||||
|
||||
import com.unciv.Constants
|
||||
import com.unciv.logic.GameInfo
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.logic.civilization.diplomacy.DiplomacyManager
|
||||
@ -37,6 +38,8 @@ class UnitMovementAlgorithmsTests {
|
||||
name = "My nation"
|
||||
cities = arrayListOf("The Capital")
|
||||
}
|
||||
civInfo.gameInfo = GameInfo()
|
||||
civInfo.gameInfo.ruleSet = ruleSet
|
||||
unit.civInfo = civInfo
|
||||
|
||||
|
||||
@ -117,10 +120,13 @@ class UnitMovementAlgorithmsTests {
|
||||
unit.baseUnit = BaseUnit().apply { unitType = type.key; ruleset = ruleSet }
|
||||
unit.updateUniques()
|
||||
|
||||
Assert.assertTrue("$type cannot be in Ice", (
|
||||
type.value.uniques.contains("Can enter ice tiles"))
|
||||
|| type.value.uniques.contains("Can pass through impassable tiles"
|
||||
) == unit.movement.canPassThrough(tile))
|
||||
Assert.assertTrue(
|
||||
"$type cannot be in Ice",
|
||||
unit.movement.canPassThrough(tile) == (
|
||||
type.value.uniques.contains("Can enter ice tiles")
|
||||
|| type.value.uniques.contains("Can pass through impassable tiles")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user