diff --git a/android/Images/UnitPromotionIcons/Medic_(Civ5).png b/android/Images/UnitPromotionIcons/Medic_(Civ5).png new file mode 100644 index 0000000000..f064a1e53b Binary files /dev/null and b/android/Images/UnitPromotionIcons/Medic_(Civ5).png differ diff --git a/android/Images/UnitPromotionIcons/Medic_II_(Civ5).png b/android/Images/UnitPromotionIcons/Medic_II_(Civ5).png new file mode 100644 index 0000000000..88679fc150 Binary files /dev/null and b/android/Images/UnitPromotionIcons/Medic_II_(Civ5).png differ diff --git a/android/assets/game.atlas b/android/assets/game.atlas index ce848e2118..6ecba58181 100644 --- a/android/assets/game.atlas +++ b/android/assets/game.atlas @@ -3084,129 +3084,143 @@ UnitPromotionIcons/March_(Civ5) orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Mobility_(Civ5) +UnitPromotionIcons/Medic_(Civ5) rotate: false xy: 2020, 590 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Range_(Civ5) +UnitPromotionIcons/Medic_II_(Civ5) + rotate: false + xy: 2020, 590 + size: 20, 20 + orig: 20, 20 + offset: 0, 0 + index: -1 +UnitPromotionIcons/Mobility_(Civ5) rotate: false xy: 2020, 568 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Scouting_III_(Civ5) +UnitPromotionIcons/Range_(Civ5) rotate: false xy: 2020, 546 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Scouting_II_(Civ5) +UnitPromotionIcons/Scouting_III_(Civ5) rotate: false xy: 2020, 524 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Scouting_I_(Civ5) +UnitPromotionIcons/Scouting_II_(Civ5) rotate: false xy: 1356, 8 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Sentry_(Civ5) +UnitPromotionIcons/Scouting_I_(Civ5) rotate: false xy: 1378, 8 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Shock_III_(Civ5) +UnitPromotionIcons/Sentry_(Civ5) rotate: false xy: 1400, 8 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Shock_II_(Civ5) +UnitPromotionIcons/Shock_III_(Civ5) rotate: false xy: 1422, 8 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Shock_I_(Civ5) +UnitPromotionIcons/Shock_II_(Civ5) rotate: false xy: 1750, 295 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Siege_(Civ5) +UnitPromotionIcons/Shock_I_(Civ5) rotate: false xy: 1750, 273 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Targeting_III_(Civ5) +UnitPromotionIcons/Siege_(Civ5) rotate: false xy: 1750, 251 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Targeting_II_(Civ5) +UnitPromotionIcons/Targeting_III_(Civ5) rotate: false xy: 2000, 1046 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Targeting_I_(Civ5) +UnitPromotionIcons/Targeting_II_(Civ5) rotate: false xy: 442, 752 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Volley_(Civ5) +UnitPromotionIcons/Targeting_I_(Civ5) rotate: false xy: 1562, 117 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Wolfpack_III_(Civ5) +UnitPromotionIcons/Volley_(Civ5) rotate: false xy: 1562, 95 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Wolfpack_II_(Civ5) +UnitPromotionIcons/Wolfpack_III_(Civ5) rotate: false xy: 1562, 73 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Wolfpack_I_(Civ5) +UnitPromotionIcons/Wolfpack_II_(Civ5) rotate: false xy: 1562, 51 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 -UnitPromotionIcons/Woodsman_(Civ5) +UnitPromotionIcons/Wolfpack_I_(Civ5) rotate: false xy: 1562, 29 size: 20, 20 orig: 20, 20 offset: 0, 0 index: -1 +UnitPromotionIcons/Woodsman_(Civ5) + rotate: false + xy: 1968, 450 + size: 20, 20 + orig: 20, 20 + offset: 0, 0 + index: -1 diff --git a/android/assets/game.png b/android/assets/game.png index 6794d8f3c7..19aec5484b 100644 Binary files a/android/assets/game.png and b/android/assets/game.png differ diff --git a/android/assets/jsons/Translations.json b/android/assets/jsons/Translations.json index 31577120e1..7c630b5fd4 100644 --- a/android/assets/jsons/Translations.json +++ b/android/assets/jsons/Translations.json @@ -8790,31 +8790,7 @@ Russian:"Бонус против раненых 33%" Simplified_Chinese:"对战受伤单位时+33%战斗力" } - //Shouldn't it be just "Bonus vs city [percentage]" ? - "Bonus vs City 50%":{ - Simplified_Chinese:"攻击城市时+50%战斗力" - French:"Bonus contre les villes +50%" - } - "Bonus vs City 15%":{ - Simplified_Chinese:"攻击城市时+15%战斗力" - French:"Bonus contre les villes +15%" - } - "Bonus vs City 200%":{ - Simplified_Chinese:"攻击城市时+200%战斗力" - French:"Bonus contre les villes +200%" - } - "Bonus vs City 30%":{ - Simplified_Chinese:"攻击城市时+30%战斗力" - French:"Bonus contre les villes +30%" - } - "Bonus vs City 33%":{ - Simplified_Chinese:"攻击城市时+33%战斗力" - French:"Bonus contre les villes +33%" - } - "Penalty vs City 33%":{ - Simplified_Chinese:"攻击城市时-33%战斗力" - French:"Pénalité contre les villes -33%" - } + "wounded units":{ Italian:"unità ferite" French:"unités blessés" @@ -8969,18 +8945,6 @@ Russian:"Бонус против водных юнитов +15%" Simplified_Chinese:"对战海军单位时+15%战斗力" } - "Bonus vs Mounted 50%":{ - Simplified_Chinese:"对战骑乘单位时+50%战斗力" - French:"Bonus contre les unités montées +50%" - } - "Bonus vs Mounted 33%":{ - Simplified_Chinese:"对战骑乘单位时+33%战斗力" - French:"Bonus contre les unités montées +33%" - } - "Bonus vs Armor 100%":{ - Simplified_Chinese:"对战装甲单位时+100%战斗力" - French:"Bonus contre les unités montées +100%" - } "Coastal Raider I":{ Italian:"Incursione costiera I" German:"Küstenräuber I" diff --git a/android/assets/jsons/UnitPromotions.json b/android/assets/jsons/UnitPromotions.json index c9ada5d43d..073be0d6e9 100644 --- a/android/assets/jsons/UnitPromotions.json +++ b/android/assets/jsons/UnitPromotions.json @@ -280,6 +280,19 @@ effect:"Double movement rate through Forest and Jungle", unitTypes:["Melee"] } + { + name:"Medic", + prerequisites:["Shock I", "Drill I", "Scouting II"], + effect:"This unit and all others in adjacent tiles heal 5 additional HP per turn", + unitTypes:["Melee","Mounted","Scout"] + } + { + name:"Medic II", + prerequisites:["Medic"], + effect:"This unit and all others in adjacent tiles heal 5 additional HP. This unit heals 5 additional HP outside of friendly territory.", + unitTypes:["Melee","Mounted","Scout"] + } + ] diff --git a/android/build.gradle b/android/build.gradle index 8bbdef14e1..a4df959d86 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 28 - versionCode 237 - versionName "2.16.1" + versionCode 238 + versionName "2.16.2" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index e3dcc57b47..3b879f9780 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -258,6 +258,13 @@ class MapUnit { return true } + fun adjacentHealingBonus():Int{ + var healingBonus = 0 + if(hasUnique("This unit and all others in adjacent tiles heal 5 additional HP per turn")) healingBonus +=5 + if(hasUnique("This unit and all others in adjacent tiles heal 5 additional HP. This unit heals 5 additional HP outside of friendly territory.")) healingBonus +=5 + return healingBonus + } + //endregion //region state-changing functions @@ -336,17 +343,23 @@ class MapUnit { } private fun heal(){ + if(isEmbarked()) return // embarked units can't heal health += rankTileForHealing(getTile()) + val adjacentUnits = currentTile.getTilesInDistance(1).flatMap { it.getUnits() } + if(adjacentUnits.isNotEmpty()) + health += adjacentUnits.map { it.adjacentHealingBonus() }.max()!! if(health>100) health=100 } fun rankTileForHealing(tileInfo:TileInfo): Int { - if(isEmbarked()) return 0 // embarked units can't heal return when{ tileInfo.getOwner() == null -> 10 // no man's land (neutral) tileInfo.isCityCenter() -> 20 !civInfo.isAtWarWith(tileInfo.getOwner()!!) -> 15 // home or allied territory - else -> 5 // enemy territory + else -> { // enemy territory + if(hasUnique("This unit and all others in adjacent tiles heal 5 additional HP. This unit heals 5 additional HP outside of friendly territory.")) 10 + else 5 + } } }