From 937687a0f43378785d39d96de057c1ea224e1731 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 4 Nov 2018 13:07:03 +0200 Subject: [PATCH] Steam Power and Astronomy now increase embarked units' movement --- Credits.md | 24 +++++++++++++----------- android/Images/OtherIcons/Banner.png | Bin 2875 -> 1336 bytes android/assets/jsons/Techs.json | 2 ++ core/src/com/unciv/logic/map/MapUnit.kt | 11 ++++++----- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Credits.md b/Credits.md index 6cf3b57e8d..7bf9d8fa05 100644 --- a/Credits.md +++ b/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 -## 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 @@ -352,4 +342,16 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc * [Nanoparticles](https://thenounproject.com/term/nanoparticles/822286/) By Gyan Lakhwani for Nanotechnology * [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 -* [Information Technology](https://thenounproject.com/term/information-technology/1927668/) By Vectors Markeet for Future Tech \ No newline at end of file +* [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 diff --git a/android/Images/OtherIcons/Banner.png b/android/Images/OtherIcons/Banner.png index 96fcda3dc3139a0443cd567782b84a98738e528b..575dc7e593fbab0c8c65edd79ae3942fa1d632a4 100644 GIT binary patch literal 1336 zcmeAS@N?(olHy`uVBq!ia0vp^DImQK$!8;-MT+OL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt3( zJ;P+JIo?2XR(iTPhE&A8og14mJ5=KM?IWdmcaQy%*ukG6t5jO7P^Ylyo{ym8&7%p< zi3%0V4Zb?*w^SNRd`{BhSsT}R;!ne>^1T|&;c812HuY_sWwvm_wk=l$?Khdk*Ir)o z&#(B7*XafM)3^BF{?9Kr>AQ;MbDQ(;=X_qKo5SnGq3B{ebLPy>B|$6I+uGaxRVSY` z?mFtOBUZh3_wMR${nXqQAzEjTq<07^&YUx+r?;<9?!!_ZcOclZdi82ux&HkvH>dya zpEqxw`>Cg&p4agRGO4H3)ckq5aN)w{;_O#RNlA-Zx4YE*6u)%+`u67JmAfN!o;_#F z6>nCs2$ywgImoH#7ku3Q+4ZdJ63$LNii*c32qb%S7^)nR5K7`f6}~fV z!o7RM1Ad zgZGOHZ7RWLJq}k5fbbPpj=yl(_z7(UM6M*r&;QcYDg&!E4 z?B>my^-GnbDW=q;P`m5sqx+XHU$$R*`K9>II}f}gtzT@JxP$rS>M7KjnbIg9rl~&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D%>m3%}X9 kUHhBeFN3%~ous-asi0R)gO#;W1l|^av~@UBW9@z8AL3gGd;kCd diff --git a/android/assets/jsons/Techs.json b/android/assets/jsons/Techs.json index 92a2a5de15..c798971984 100644 --- a/android/assets/jsons/Techs.json +++ b/android/assets/jsons/Techs.json @@ -221,6 +221,7 @@ { name:"Astronomy", row:2, + baseDescription:"Increases embarked movement +1", prerequisites:[/*"Compass",*/"Education"] }, { @@ -339,6 +340,7 @@ { name:"Steam Power", row:7, + baseDescription:"Increases embarked movement +1", prerequisites:["Industrialization","Scientific Theory","Rifling"] }, { diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index 6cbf48d790..32e2327dff 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -6,7 +6,6 @@ import com.unciv.logic.automation.UnitAutomation import com.unciv.logic.automation.WorkerAutomation import com.unciv.logic.civilization.CivilizationInfo import com.unciv.models.gamebasics.GameBasics -import com.unciv.models.gamebasics.tile.TerrainType import com.unciv.models.gamebasics.unit.BaseUnit import com.unciv.ui.utils.getRandom import java.text.DecimalFormat @@ -43,6 +42,8 @@ class MapUnit { fun getMovementString(): String = DecimalFormat("0.#").format(currentMovement.toDouble()) + "/" + getMaxMovement() fun getTile(): TileInfo = currentTile fun getMaxMovement(): Int { + if(isEmbarked()) return getEmbarkedMovement() + var movement = baseUnit.movement movement += getUniques().count{it=="+1 Movement"} @@ -67,7 +68,7 @@ class MapUnit { fun updateUniques(){ val uniques = ArrayList() val baseUnit = baseUnit() - if(baseUnit.uniques!=null) uniques.addAll(baseUnit.uniques!!) + uniques.addAll(baseUnit.uniques) uniques.addAll(promotions.promotions.map { GameBasics.UnitPromotions[it]!!.effect }) tempUniques = uniques } @@ -164,11 +165,11 @@ class MapUnit { return currentTile.baseTerrain=="Ocean"||currentTile.baseTerrain=="Coast" } - fun getEmbarkedMovement(){ + fun getEmbarkedMovement(): Int { var movement=2 movement += civInfo.tech.techsResearched.map { GameBasics.Technologies[it]!! } - .count { it.baseDescription!=null && it.baseDescription!! == "Increases embarked movement" } - if(civInfo.tech.isResearched("Steam Power")) movement += 1 + .count { it.baseDescription!=null && it.baseDescription!! == "Increases embarked movement +1" } + return movement } //endregion