mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-02 08:22:08 -04:00
Great General bonus affects naval units (as long as we don't have Great Admirals in the game)
This commit is contained in:
parent
76187efc3d
commit
0eb28b9ae7
@ -1262,11 +1262,18 @@
|
|||||||
French:"Général illustre"
|
French:"Général illustre"
|
||||||
}
|
}
|
||||||
|
|
||||||
"Bonus for land units in 2 radius 15%" :{
|
"Bonus for units in 2 tile radius 15%" :{
|
||||||
|
Italian:"15% Bonus per le unità nel raggio di 2 caselle"
|
||||||
|
French:"Bonus de combat +15% pour les unités dans un rayon de 2 cases"
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Not in use now, but will be when we eventually add Great Admiral and split the job
|
||||||
|
"Bonus for land units in 2 tile radius 15%" :{
|
||||||
Italian:"15% Bonus per le unità terrestri nel raggio di 2 caselle"
|
Italian:"15% Bonus per le unità terrestri nel raggio di 2 caselle"
|
||||||
Simplified_Chinese:"周围两格地块内的我方所有陆军单位+15%战斗力"
|
Simplified_Chinese:"周围两格地块内的我方所有陆军单位+15%战斗力"
|
||||||
French:"Bonus de combat +15% pour les unités terrestres dans un rayon de 2 cases"
|
French:"Bonus de combat +15% pour les unités terrestres dans un rayon de 2 cases"
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
////// Unit Promotions
|
////// Unit Promotions
|
||||||
|
|
||||||
|
@ -1118,7 +1118,7 @@
|
|||||||
name:"Great General",
|
name:"Great General",
|
||||||
unbuildable:true,
|
unbuildable:true,
|
||||||
unitType:"Civilian",
|
unitType:"Civilian",
|
||||||
uniques:["Can start an 8-turn golden age","Bonus for land units in 2 radius 15%"] //to do : should be able to build mega-fort
|
uniques:["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%"] //to do : should be able to build mega-fort
|
||||||
movement:2
|
movement:2
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -67,15 +67,14 @@ class BattleDamage{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//todo : performance improvement
|
//todo : performance improvement
|
||||||
if (combatant.getUnitType().isLandUnit()) {
|
if (combatant.getUnitType()!=UnitType.City) {
|
||||||
val nearbyCivUnits = combatant.unit.getTile().getTilesInDistance(2)
|
val nearbyCivUnits = combatant.unit.getTile().getTilesInDistance(2)
|
||||||
.filter {it.civilianUnit?.civInfo == combatant.unit.civInfo}
|
.filter {it.civilianUnit?.civInfo == combatant.unit.civInfo}
|
||||||
.map {it.civilianUnit}
|
.map {it.civilianUnit}
|
||||||
if (nearbyCivUnits.any { it!!.hasUnique("Bonus for land units in 2 radius 15%") }) {
|
if (nearbyCivUnits.any { it!!.hasUnique("Bonus for units in 2 tile radius 15%") }) {
|
||||||
modifiers["Great general"]= when {
|
modifiers["Great General"]= if (combatant.unit.civInfo.getNation().unique ==
|
||||||
combatant.unit.civInfo.getNation().unique == "Great general provides double combat bonus, and spawns 50% faster" -> 0.3f
|
"Great general provides double combat bonus, and spawns 50% faster") 0.3f
|
||||||
else -> 0.15f
|
else 0.15f
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user