mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-24 22:59:34 +07:00
Fixed Denmark's unique including also embarking instead of just disembarking
This commit is contained in:
@ -10,8 +10,9 @@ class UnitMovementAlgorithms(val unit:MapUnit) {
|
||||
// This function is called ALL THE TIME and should be as time-optimal as possible!
|
||||
fun getMovementCostBetweenAdjacentTiles(from: TileInfo, to: TileInfo, civInfo: CivilizationInfo): Float {
|
||||
|
||||
if (from.isLand != to.isLand && !unit.civInfo.nation.embarkDisembarkCosts1 && unit.type.isLandUnit())
|
||||
return 100f // this is embarkment or disembarkment, and will take the entire turn
|
||||
if (from.isLand != to.isLand && unit.type.isLandUnit())
|
||||
if (!unit.civInfo.nation.disembarkCosts1 && from.isWater && to.isLand) return 1f
|
||||
else return 100f // this is embarkment or disembarkment, and will take the entire turn
|
||||
|
||||
// land units will still spend all movement points to embark even with this unique
|
||||
if (unit.allTilesCosts1)
|
||||
|
@ -4,7 +4,6 @@ import com.badlogic.gdx.graphics.Color
|
||||
import com.unciv.Constants
|
||||
import com.unciv.logic.civilization.CityStateType
|
||||
import com.unciv.models.stats.INamed
|
||||
import com.unciv.models.translations.Translations
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.utils.Fonts
|
||||
import com.unciv.ui.utils.colorFromRGB
|
||||
@ -73,7 +72,7 @@ class Nation : INamed {
|
||||
var ignoreHillMovementCost = false
|
||||
|
||||
@Transient
|
||||
var embarkDisembarkCosts1 = false
|
||||
var disembarkCosts1 = false
|
||||
|
||||
fun setTransients() {
|
||||
outerColorObject = colorFromRGB(outerColor)
|
||||
@ -83,7 +82,7 @@ class Nation : INamed {
|
||||
|
||||
forestsAndJunglesAreRoads = uniques.contains("All units move through Forest and Jungle Tiles in friendly territory as if they have roads. These tiles can be used to establish City Connections upon researching the Wheel.")
|
||||
ignoreHillMovementCost = uniques.contains("Units ignore terrain costs when moving into any tile with Hills")
|
||||
embarkDisembarkCosts1 = uniques.contains("Units pay only 1 movement point to embark and disembark")
|
||||
disembarkCosts1 = uniques.contains("Units pay only 1 movement point to disembark")
|
||||
}
|
||||
|
||||
lateinit var cities: ArrayList<String>
|
||||
|
Reference in New Issue
Block a user