diff --git a/android/assets/UnitIcons/Artillery.png b/android/assets/UnitIcons/Artillery.png new file mode 100644 index 0000000000..2aa3b6b6ae Binary files /dev/null and b/android/assets/UnitIcons/Artillery.png differ diff --git a/android/assets/UnitIcons/Cavalry.png b/android/assets/UnitIcons/Cavalry.png new file mode 100644 index 0000000000..65d005fc83 Binary files /dev/null and b/android/assets/UnitIcons/Cavalry.png differ diff --git a/android/assets/UnitIcons/Rifleman.png b/android/assets/UnitIcons/Rifleman.png new file mode 100644 index 0000000000..7f5e3f20f2 Binary files /dev/null and b/android/assets/UnitIcons/Rifleman.png differ diff --git a/android/assets/jsons/Translations.json b/android/assets/jsons/Translations.json index 796a6b08ef..3f0a886f77 100644 --- a/android/assets/jsons/Translations.json +++ b/android/assets/jsons/Translations.json @@ -1170,6 +1170,8 @@ // Technologies (Ancient Era) + "Agriculture":{} + "Pottery":{ Italian:"Ceramica" Russian:"Керамика" @@ -1325,6 +1327,7 @@ Romanian:"Serviciu civil" German:"Zivildienst" } + "Guilds":{} "Physics":{ Italian:"Fisica" Russian:"Физика" @@ -1332,6 +1335,7 @@ Romanian:"Fizică" German:"Physik" } + "Steel":{} "Metal Casting":{ Italian:"colata di metallo" Russian:"Литье" @@ -1399,6 +1403,7 @@ Romanian:"Presă de tipar" German:"Druckpresse" } + "Gunpowder":{} "Navigation":{ Italian:"Navigazione" Russian:"Навигация" @@ -1420,6 +1425,9 @@ Romanian:"Economie" German:"Ökonomie" } + + "Metallurgy":{} + "Chemistry":{ Italian:"Chimica" Russian:"Химия" @@ -1437,6 +1445,11 @@ Romanian:"Teoria științifică" German:"Wissenschaftliche Thorie" } + + "Industrialization":{} + "Rifling":{} + "Military Science":{} + "Fertilizer":{ Italian:"Fertilizzante" Russian:"Yдобрение" @@ -1466,6 +1479,8 @@ German:"Dampfkraft" } + "Dynamite":{} + // Technologies (Modern Era) @@ -1594,6 +1609,16 @@ German:"Zukünftige Technologien" } + // Tech Eras + "Ancient":{} + "Classical":{} + "Medieval":{} + "Renaissance":{} + "Industrial":{} + "Modern":{} + "Information":{} + "Future":{} + // Building unique abilities "+1 Science Per 2 Population":{ diff --git a/android/assets/jsons/Units.json b/android/assets/jsons/Units.json index 7320ebf66a..134410a072 100644 --- a/android/assets/jsons/Units.json +++ b/android/assets/jsons/Units.json @@ -234,9 +234,8 @@ cost: 150, requiredTech:"Gunpowder", hurryCostModifier:20 - } - - ,{ + }, + { name:"Lancer", unitType:"Mounted", movement:4, @@ -245,10 +244,11 @@ requiredTech:"Metallurgy", requiredResource:"Horses", hurryCostModifier:20 - uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%","Bonus vs Mounted 50%" ], + uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%","Bonus vs Mounted 33%" ], }, - // UNITS FROM HERE NEED IMAGES + // Industrial Era + { name:"Rifleman", unitType:"Melee", diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index 2540c4e17d..9778d76af7 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -49,7 +49,13 @@ class UnitAutomation{ val rangeOfAttack = if(MapUnitCombatant(unit).isMelee()) 1 else unit.getBaseUnit().range val attackableTiles = ArrayList() - val tilesToAttackFrom = distanceToTiles.filter { it.value!=unit.currentMovement }.map { it.key } + // The +0.09 solves a bug where you've moved 2/3 road tiles, + // you come to move a third (distance is less that remaining movements), + // and then later we round it off to a whole. + // So the poor unit thought it could attack from the tile, but when it comes to do so it has no moveement points! + // Silly floats, basically + val tilesToAttackFrom = distanceToTiles.filter { (it.value+0.09) < unit.currentMovement } + .map { it.key } .filter { unit.canMoveTo(it) || it==unit.getTile() } for(reachableTile in tilesToAttackFrom){ // tiles we'll still have energy after we reach there attackableTiles += reachableTile.getTilesInDistance(rangeOfAttack).filter { it in tilesWithEnemies } diff --git a/core/src/com/unciv/models/gamebasics/Technology.kt b/core/src/com/unciv/models/gamebasics/Technology.kt index 22626e1728..f6a1fe88f1 100644 --- a/core/src/com/unciv/models/gamebasics/Technology.kt +++ b/core/src/com/unciv/models/gamebasics/Technology.kt @@ -30,7 +30,7 @@ class Technology : ICivilopedia { if(wonders.isNotEmpty()) SB.appendln("{Wonders enabled}: "+wonders.map { "\n * "+it.name+ " ("+it.getShortDescription()+")" }.joinToString()) val revealedResource = GameBasics.TileResources.values.filter { it.revealedBy==name }.map { it.name }.firstOrNull() // can only be one - if(revealedResource!=null) SB.appendln("Reveals [$revealedResource] on map".tr()) + if(revealedResource!=null) SB.appendln("Reveals [$revealedResource] on the map".tr()) val tileImprovements = GameBasics.TileImprovements.values.filter { it.techRequired==name } if(tileImprovements.isNotEmpty()) SB.appendln("{Tile improvements enabled}: "+tileImprovements.map { it.name }.joinToString()) diff --git a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt index 67e167cd14..fcce9dff8b 100644 --- a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt +++ b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt @@ -160,7 +160,7 @@ fun String.tr(): String { var languageSpecificPlaceholder = GameBasics.Translations[englishTranslationPlaceholder]!![UnCivGame.Current.settings.language]!! for(i in 0 until termsInMessage.size){ - languageSpecificPlaceholder = languageSpecificPlaceholder.replace(termsInTranslationPlaceholder[i], termsInMessage[i]) + languageSpecificPlaceholder = languageSpecificPlaceholder.replace(termsInTranslationPlaceholder[i], termsInMessage[i].tr()) } return languageSpecificPlaceholder.tr() }