mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Fixed Denmark's unique including also embarking instead of just disembarking
This commit is contained in:
parent
c42561c545
commit
c1ff2e4ba7
@ -662,7 +662,7 @@
|
||||
"outerColor": [51,25,0],
|
||||
"innerColor": [255,255,102],
|
||||
"uniqueName": "Viking Fury",
|
||||
"uniques": ["+1 Movement for all embarked units", "Units pay only 1 movement point to embark and disembark",
|
||||
"uniques": ["+1 Movement for all embarked units", "Units pay only 1 movement point to disembark",
|
||||
"Melee units pay no movement cost to pillage"],
|
||||
"cities": ["Copenhagen","Aarhus","Kaupang","Ribe","Viborg","Tunsbers","Roskilde","Hedeby","Oslo","Jelling","Truso",
|
||||
"Bergen","Faeroerne","Reykjavik","Trondheim","Godthab","Helluland","Lillehammer","Markland","Elsinore",
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user