mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-31 07:09:26 +07:00
Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions (#1754)
* Implemented aircraft carrier "Flight Deck" and "Armor Plating" promotions * Template for the translation strings * New icons are added Co-authored-by: ltrcao <ltrcao@users.noreply.github.com>
This commit is contained in:

committed by
Yair Morgenstern

parent
b21fdc6c37
commit
e0a00eb9a5
@ -166,6 +166,9 @@ class BattleDamage{
|
||||
if (defenceVsRanged > 0) modifiers["defence vs ranged"] = defenceVsRanged
|
||||
}
|
||||
|
||||
val carrierDefenceBonus = 0.25f * defender.unit.getUniques().count { it == "+25% Combat Bonus when defending" }
|
||||
if (carrierDefenceBonus > 0) modifiers["Armor Plating"] = carrierDefenceBonus
|
||||
|
||||
|
||||
if (defender.unit.isFortified())
|
||||
modifiers["Fortification"] = 0.2f * defender.unit.getFortificationTurns()
|
||||
|
@ -297,7 +297,7 @@ class UnitMovementAlgorithms(val unit:MapUnit) {
|
||||
val unitAtDestination = tile.militaryUnit!!
|
||||
|
||||
var unitCapacity = if (unitAtDestination.getUniques().contains("Can carry 2 aircraft")) 2 else 0
|
||||
// unitCapacity += unitAtDestination.getUniques().count { it == "Can carry 1 extra air unit" }
|
||||
unitCapacity += unitAtDestination.getUniques().count { it == "Can carry 1 extra air unit" }
|
||||
|
||||
return ((unitAtDestination.type.isAircraftCarrierUnit() && !unit.type.isMissileUnit()) ||
|
||||
(unitAtDestination.type.isMissileCarrierUnit() && unit.type.isMissileUnit()))
|
||||
|
Reference in New Issue
Block a user