mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Added Medic, Medic II promotions - #698
This commit is contained in:
BIN
android/Images/UnitPromotionIcons/Medic_(Civ5).png
Normal file
BIN
android/Images/UnitPromotionIcons/Medic_(Civ5).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
android/Images/UnitPromotionIcons/Medic_II_(Civ5).png
Normal file
BIN
android/Images/UnitPromotionIcons/Medic_II_(Civ5).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -3084,129 +3084,143 @@ UnitPromotionIcons/March_(Civ5)
|
|||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Mobility_(Civ5)
|
UnitPromotionIcons/Medic_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2020, 590
|
xy: 2020, 590
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
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
|
rotate: false
|
||||||
xy: 2020, 568
|
xy: 2020, 568
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Scouting_III_(Civ5)
|
UnitPromotionIcons/Range_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2020, 546
|
xy: 2020, 546
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Scouting_II_(Civ5)
|
UnitPromotionIcons/Scouting_III_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2020, 524
|
xy: 2020, 524
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Scouting_I_(Civ5)
|
UnitPromotionIcons/Scouting_II_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1356, 8
|
xy: 1356, 8
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Sentry_(Civ5)
|
UnitPromotionIcons/Scouting_I_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1378, 8
|
xy: 1378, 8
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Shock_III_(Civ5)
|
UnitPromotionIcons/Sentry_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1400, 8
|
xy: 1400, 8
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Shock_II_(Civ5)
|
UnitPromotionIcons/Shock_III_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1422, 8
|
xy: 1422, 8
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Shock_I_(Civ5)
|
UnitPromotionIcons/Shock_II_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1750, 295
|
xy: 1750, 295
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Siege_(Civ5)
|
UnitPromotionIcons/Shock_I_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1750, 273
|
xy: 1750, 273
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Targeting_III_(Civ5)
|
UnitPromotionIcons/Siege_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1750, 251
|
xy: 1750, 251
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Targeting_II_(Civ5)
|
UnitPromotionIcons/Targeting_III_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2000, 1046
|
xy: 2000, 1046
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Targeting_I_(Civ5)
|
UnitPromotionIcons/Targeting_II_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 442, 752
|
xy: 442, 752
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Volley_(Civ5)
|
UnitPromotionIcons/Targeting_I_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1562, 117
|
xy: 1562, 117
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Wolfpack_III_(Civ5)
|
UnitPromotionIcons/Volley_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1562, 95
|
xy: 1562, 95
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Wolfpack_II_(Civ5)
|
UnitPromotionIcons/Wolfpack_III_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1562, 73
|
xy: 1562, 73
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Wolfpack_I_(Civ5)
|
UnitPromotionIcons/Wolfpack_II_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1562, 51
|
xy: 1562, 51
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
UnitPromotionIcons/Woodsman_(Civ5)
|
UnitPromotionIcons/Wolfpack_I_(Civ5)
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1562, 29
|
xy: 1562, 29
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
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 |
@ -8790,31 +8790,7 @@
|
|||||||
Russian:"Бонус против раненых 33%"
|
Russian:"Бонус против раненых 33%"
|
||||||
Simplified_Chinese:"对战受伤单位时+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":{
|
"wounded units":{
|
||||||
Italian:"unità ferite"
|
Italian:"unità ferite"
|
||||||
French:"unités blessés"
|
French:"unités blessés"
|
||||||
@ -8969,18 +8945,6 @@
|
|||||||
Russian:"Бонус против водных юнитов +15%"
|
Russian:"Бонус против водных юнитов +15%"
|
||||||
Simplified_Chinese:"对战海军单位时+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":{
|
"Coastal Raider I":{
|
||||||
Italian:"Incursione costiera I"
|
Italian:"Incursione costiera I"
|
||||||
German:"Küstenräuber I"
|
German:"Küstenräuber I"
|
||||||
|
@ -280,6 +280,19 @@
|
|||||||
effect:"Double movement rate through Forest and Jungle",
|
effect:"Double movement rate through Forest and Jungle",
|
||||||
unitTypes:["Melee"]
|
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"]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.app"
|
applicationId "com.unciv.app"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 237
|
versionCode 238
|
||||||
versionName "2.16.1"
|
versionName "2.16.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||||
|
@ -258,6 +258,13 @@ class MapUnit {
|
|||||||
return true
|
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
|
//endregion
|
||||||
|
|
||||||
//region state-changing functions
|
//region state-changing functions
|
||||||
@ -336,17 +343,23 @@ class MapUnit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun heal(){
|
private fun heal(){
|
||||||
|
if(isEmbarked()) return // embarked units can't heal
|
||||||
health += rankTileForHealing(getTile())
|
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
|
if(health>100) health=100
|
||||||
}
|
}
|
||||||
|
|
||||||
fun rankTileForHealing(tileInfo:TileInfo): Int {
|
fun rankTileForHealing(tileInfo:TileInfo): Int {
|
||||||
if(isEmbarked()) return 0 // embarked units can't heal
|
|
||||||
return when{
|
return when{
|
||||||
tileInfo.getOwner() == null -> 10 // no man's land (neutral)
|
tileInfo.getOwner() == null -> 10 // no man's land (neutral)
|
||||||
tileInfo.isCityCenter() -> 20
|
tileInfo.isCityCenter() -> 20
|
||||||
!civInfo.isAtWarWith(tileInfo.getOwner()!!) -> 15 // home or allied territory
|
!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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user