Fix Khan unit (#5207)

* fix khan unique

* fix adjacent healing bonus

* plus

* Khan heals itself also

* nerf medic
This commit is contained in:
SimonCeder
2021-09-14 23:35:16 +02:00
committed by GitHub
parent 86bbf54cc0
commit 672d2a3c34
3 changed files with 4 additions and 4 deletions

View File

@ -146,13 +146,13 @@
{
"name": "Medic",
"prerequisites": ["Shock I", "Drill I", "Scouting II", "Survivalism II"],
"uniques": ["[+5] HP when healing", "All adjacent units heal [5] HP when healing"],
"uniques": ["All adjacent units heal [+5] HP when healing"],
"unitTypes": ["Sword","Gunpowder","Mounted","Scout"]
},
{
"name": "Medic II",
"prerequisites": ["Medic"],
"uniques": ["[+5] HP when healing", "[+5] HP when healing in [Foreign Land] tiles", "All adjacent units heal [5] HP when healing"],
"uniques": ["[+5] HP when healing in [Foreign Land] tiles", "All adjacent units heal [+5] HP when healing"],
"unitTypes": ["Sword","Gunpowder","Mounted","Scout"]
},

View File

@ -1537,7 +1537,7 @@
"uniqueTo": "Mongolia",
"replaces": "Great General",
"uniques": ["Can start an [8]-turn golden age","Bonus for units in 2 tile radius 15%",
"Heal adjacent units for an additional 15 HP per turn", "Can construct [Citadel]", "Great Person - [War]", "Unbuildable", "Uncapturable"],
"All adjacent units heal [+15] HP when healing", "[+15] HP when healing", "Can construct [Citadel]", "Great Person - [War]", "Unbuildable", "Uncapturable"],
"movement": 5
},

View File

@ -571,7 +571,7 @@ class MapUnit {
amountToHealBy += getMatchingUniques("[] HP when healing").sumOf { it.params[0].toInt() }
val maxAdjacentHealingBonus = currentTile.getTilesInDistance(1)
val maxAdjacentHealingBonus = currentTile.neighbors
.flatMap { it.getUnits().asSequence() }.map { it.adjacentHealingBonus() }.maxOrNull()
if (maxAdjacentHealingBonus != null)
amountToHealBy += maxAdjacentHealingBonus