mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Steam Power and Astronomy now increase embarked units' movement
This commit is contained in:
parent
fb2538524a
commit
937687a0f4
22
Credits.md
22
Credits.md
@ -262,16 +262,6 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
|||||||
* [Riot Police](https://thenounproject.com/term/riot-police/43117/) By Dan Hetteix for Police State
|
* [Riot Police](https://thenounproject.com/term/riot-police/43117/) By Dan Hetteix for Police State
|
||||||
|
|
||||||
|
|
||||||
## Others
|
|
||||||
|
|
||||||
* [Circle](https://thenounproject.com/term/circle/1841891/) By Aybige
|
|
||||||
* [Arrow](https://thenounproject.com/term/arrow/18123/) By Joe Mortell
|
|
||||||
* [Connection](https://thenounproject.com/search/?q=connection&i=1521886) By Travis Avery
|
|
||||||
* [Skull](https://thenounproject.com/search/?q=Skull&i=1030702) By Vladimir Belochkin
|
|
||||||
* [Crosshair](https://thenounproject.com/search/?q=crosshairs&i=916030) By Bakunetsu Kaito
|
|
||||||
* [City](https://thenounproject.com/search/?q=city&i=571332) By Felix Westphal
|
|
||||||
* [Fire](https://thenounproject.com/search/?q=Fire&i=96564) By Lloyd Humphreys
|
|
||||||
* [Sleep](https://thenounproject.com/search/?q=sleep&i=1760085) By Saeful Muslim
|
|
||||||
|
|
||||||
## Technologies
|
## Technologies
|
||||||
|
|
||||||
@ -353,3 +343,15 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
|||||||
* [Satellite](https://thenounproject.com/term/satellite/1466641/) By Ben Davis for Satellites
|
* [Satellite](https://thenounproject.com/term/satellite/1466641/) By Ben Davis for Satellites
|
||||||
* [Atom](https://thenounproject.com/term/atom/1586852/) By Kelsey Armstrong for Particle Physics
|
* [Atom](https://thenounproject.com/term/atom/1586852/) By Kelsey Armstrong for Particle Physics
|
||||||
* [Information Technology](https://thenounproject.com/term/information-technology/1927668/) By Vectors Markeet for Future Tech
|
* [Information Technology](https://thenounproject.com/term/information-technology/1927668/) By Vectors Markeet for Future Tech
|
||||||
|
|
||||||
|
## Others
|
||||||
|
|
||||||
|
* [Circle](https://thenounproject.com/term/circle/1841891/) By Aybige
|
||||||
|
* [Arrow](https://thenounproject.com/term/arrow/18123/) By Joe Mortell
|
||||||
|
* [Connection](https://thenounproject.com/search/?q=connection&i=1521886) By Travis Avery
|
||||||
|
* [Skull](https://thenounproject.com/search/?q=Skull&i=1030702) By Vladimir Belochkin
|
||||||
|
* [Crosshair](https://thenounproject.com/search/?q=crosshairs&i=916030) By Bakunetsu Kaito
|
||||||
|
* [City](https://thenounproject.com/search/?q=city&i=571332) By Felix Westphal
|
||||||
|
* [Fire](https://thenounproject.com/search/?q=Fire&i=96564) By Lloyd Humphreys
|
||||||
|
* [Sleep](https://thenounproject.com/search/?q=sleep&i=1760085) By Saeful Muslim
|
||||||
|
* [Banner](https://thenounproject.com/term/banner/866282/) By Emir Palavan for embarked units
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.3 KiB |
@ -221,6 +221,7 @@
|
|||||||
{
|
{
|
||||||
name:"Astronomy",
|
name:"Astronomy",
|
||||||
row:2,
|
row:2,
|
||||||
|
baseDescription:"Increases embarked movement +1",
|
||||||
prerequisites:[/*"Compass",*/"Education"]
|
prerequisites:[/*"Compass",*/"Education"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -339,6 +340,7 @@
|
|||||||
{
|
{
|
||||||
name:"Steam Power",
|
name:"Steam Power",
|
||||||
row:7,
|
row:7,
|
||||||
|
baseDescription:"Increases embarked movement +1",
|
||||||
prerequisites:["Industrialization","Scientific Theory","Rifling"]
|
prerequisites:["Industrialization","Scientific Theory","Rifling"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ import com.unciv.logic.automation.UnitAutomation
|
|||||||
import com.unciv.logic.automation.WorkerAutomation
|
import com.unciv.logic.automation.WorkerAutomation
|
||||||
import com.unciv.logic.civilization.CivilizationInfo
|
import com.unciv.logic.civilization.CivilizationInfo
|
||||||
import com.unciv.models.gamebasics.GameBasics
|
import com.unciv.models.gamebasics.GameBasics
|
||||||
import com.unciv.models.gamebasics.tile.TerrainType
|
|
||||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||||
import com.unciv.ui.utils.getRandom
|
import com.unciv.ui.utils.getRandom
|
||||||
import java.text.DecimalFormat
|
import java.text.DecimalFormat
|
||||||
@ -43,6 +42,8 @@ class MapUnit {
|
|||||||
fun getMovementString(): String = DecimalFormat("0.#").format(currentMovement.toDouble()) + "/" + getMaxMovement()
|
fun getMovementString(): String = DecimalFormat("0.#").format(currentMovement.toDouble()) + "/" + getMaxMovement()
|
||||||
fun getTile(): TileInfo = currentTile
|
fun getTile(): TileInfo = currentTile
|
||||||
fun getMaxMovement(): Int {
|
fun getMaxMovement(): Int {
|
||||||
|
if(isEmbarked()) return getEmbarkedMovement()
|
||||||
|
|
||||||
var movement = baseUnit.movement
|
var movement = baseUnit.movement
|
||||||
movement += getUniques().count{it=="+1 Movement"}
|
movement += getUniques().count{it=="+1 Movement"}
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ class MapUnit {
|
|||||||
fun updateUniques(){
|
fun updateUniques(){
|
||||||
val uniques = ArrayList<String>()
|
val uniques = ArrayList<String>()
|
||||||
val baseUnit = baseUnit()
|
val baseUnit = baseUnit()
|
||||||
if(baseUnit.uniques!=null) uniques.addAll(baseUnit.uniques!!)
|
uniques.addAll(baseUnit.uniques)
|
||||||
uniques.addAll(promotions.promotions.map { GameBasics.UnitPromotions[it]!!.effect })
|
uniques.addAll(promotions.promotions.map { GameBasics.UnitPromotions[it]!!.effect })
|
||||||
tempUniques = uniques
|
tempUniques = uniques
|
||||||
}
|
}
|
||||||
@ -164,11 +165,11 @@ class MapUnit {
|
|||||||
return currentTile.baseTerrain=="Ocean"||currentTile.baseTerrain=="Coast"
|
return currentTile.baseTerrain=="Ocean"||currentTile.baseTerrain=="Coast"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getEmbarkedMovement(){
|
fun getEmbarkedMovement(): Int {
|
||||||
var movement=2
|
var movement=2
|
||||||
movement += civInfo.tech.techsResearched.map { GameBasics.Technologies[it]!! }
|
movement += civInfo.tech.techsResearched.map { GameBasics.Technologies[it]!! }
|
||||||
.count { it.baseDescription!=null && it.baseDescription!! == "Increases embarked movement" }
|
.count { it.baseDescription!=null && it.baseDescription!! == "Increases embarked movement +1" }
|
||||||
if(civInfo.tech.isResearched("Steam Power")) movement += 1
|
return movement
|
||||||
}
|
}
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user