Added Medic, Medic II promotions - #698

This commit is contained in:
Yair Morgenstern 2019-05-06 23:01:28 +03:00
parent cf2580b8ed
commit 89902bef95
8 changed files with 63 additions and 59 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 KiB

After

Width:  |  Height:  |  Size: 991 KiB

View File

@ -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"

View File

@ -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"]
}
]

View File

@ -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

View File

@ -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
}
}
}